SlideShare a Scribd company logo
ORNL is managed by UT-Battelle
for the US Department of Energy
Web Data Analysis
at the Spallation
Neutron Source
Ricardo M. Ferraz Leal
Neutron Data Analysis and
Visualization Group
rhf@ornl.gov
2
Motivation: why not?
• SNS has several Web Applications:
– People DO use them!
• Clusters available to process data.
• ICAT:
– REST API provides experiment information
• Data files path, metadata, IPTS
• ICAT + LDAP:
– Authentication + Permissions
• No need to download Data Analysis Software
• Developer: End of cross compilation!
• People love Facebook!
Building a Web
Reduction platform
A Small Angle Neutron
Scattering prototype…
8
Requirements
• Run from a desktop computer, tablet or phone!
• Two user modes:
– Expert (beamline scientists, advanced users)
– Regular users
• Data access permissions
• Spreadsheet style input
– Some scientists use openpyxl to read excel
spreadsheets!
• Script generation (and tweaking) from the user input
• Parallel job execution
• Preliminary analysis (e.g. simple fittings)
9
• Responsive Web Design Template:
– Google “responsive web design template dashboard”
• About 565.000 results
– AdminLTE:
• https://almsaeedstudio.com/themes/AdminLTE/index2.html
• https://github.com/almasaeed2010/AdminLTE
“Shopping for free…”
Web Data Analysis at the Spallation Neutron Source
11
Bootstrap
12
Datatables SearchSort
Pagination
13
Handsontable : spreadsheet
14
Highlight.js
15
• Json visualization grammar
– Vega + VegaLite:
• https://vega.github.io/vega-lite/
• New Future standard for json plot format (?)
• Python backend with HTML/JS rendering.
– Altair:
• https://github.com/altair-viz/altair
• Uses VegaLite
• New!
– Bokeh:
• http://bokeh.pydata.org/en/latest/
• Still in development…
– Plotly Offline:
• https://plot.ly/python/offline/
• Now free and stable
Plotting: D3 & friends
16
Django
*/models.py
*/views.py
*/url.pytemplates/*.html
http://<server hostname>/<app>/<view>/<param1>/<param2>
ORM
Object-relational
mapping
17
• Model Based Views:
– Generic Views: List, Create, Update, Delete, etc..
– Model Based Forms
• Admin Interface
• Initial release: 21 July 2005; 11 years ago
– Out of the box Django is a little outdated:
• Server side template system
• Every request / action loads a full page.
• Django Channels (2016):
– WebSockets and HTTP2
– Will ship (?) with Django 1.11 (2017)
Django
18
Web based Data Reduction:
Putting the shopping cart
together…
Small Angle Neutron
Scattering Data Reduction
& Analysis
20
• Configuration:
– Advanced parameters
• Masks, calibration, etc…
– Can access files from any experiment (e.g mask file):
• Server side file browser
– A configuration can be assigned to other users
• Reduction:
– Uses a Configuration
– Minimal user input
• Uses as much metadata as possible
• Form contents can be inferred from the metadata
Configuration vs Reduction
21
22
23
24
25
26
27
28
Web Data Analysis at the Spallation Neutron Source
30
New Version:
2016 Web Development
Standards
32
• Goal:
– To provide a UX similar to that of a desktop application.
A single-page application (SPA)
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<div id="app"></div>
<script src="/dist/build.js"></script>
</body>
</html>
See tips: “I am a fast webpage, kneel before my greatness”
https://varvy.com/pagespeed/wicked-fast.html
33
• Effortless integration with Electron
• Cross platform desktop apps with JavaScript, HTML, and CSS
Cross platform desktop app
http://electron.atom.io/apps/
34
• JavaScript Framework:
– Vue.js
– Webpack, node.js & friends…
• REST API
– Django + REST Framework
• Postgres >= 9.4 jsonb (Django >= 1.9 JSONField):
– Allows storing form content in JSON format
• NoSQL Functionality
• Docker containers
Tools…
35
Static
Content:
SPA
Debug
36
37
Wanna play?
Let me know:
rhf@ornl.gov
Acknowledgements:
– Tanner Hobson
– Shelly Ren
– Peter Parker
– Ray Gregory
– NDAV Group
– EQSANS, BioSANS, GPSANS teams
Web Data Analysis at the Spallation Neutron Source

More Related Content

PPTX
Introduction to NoSQL and MongoDB
PDF
The databases in SSDT: A work with project and best practices
PDF
Build Applications without Pipelines: Shortest path from complex data to live...
PPTX
NoSql Data Management
PPTX
No SQL- The Future Of Data Storage
PDF
Apache Arrow Flight: A New Gold Standard for Data Transport
PDF
Apache Arrow: Leveling Up the Analytics Stack
Introduction to NoSQL and MongoDB
The databases in SSDT: A work with project and best practices
Build Applications without Pipelines: Shortest path from complex data to live...
NoSql Data Management
No SQL- The Future Of Data Storage
Apache Arrow Flight: A New Gold Standard for Data Transport
Apache Arrow: Leveling Up the Analytics Stack

What's hot (20)

PPTX
SQL vs. NoSQL. It's always a hard choice.
PDF
SQL vs NoSQL: Big Data Adoption & Success in the Enterprise
PDF
Trivadis TechEvent 2017 Tools and Methods for DB Migrations by Kim Berg Hansen
PPTX
U-SQL Learning Resources (SQLBits 2016)
PPTX
3. ADO.NET
ODP
An Introduction to Pentaho Kettle
PPTX
U-SQL Federated Distributed Queries (SQLBits 2016)
PDF
Amundsen at Brex and Looker integration
PDF
App301 Implement a Data Access Layer with Ent Lib
PDF
DMann-SQLDeveloper4Reporting
PPTX
Rdbms vs. no sql
PDF
Extensible Database APIs and their role in Software Architecture
PDF
NoSQL Databases
PDF
Massively scalable ETL in real world applications: the hard way
PPTX
Characteristics of no sql databases
PPTX
NOSQL Databases types and Uses
PPTX
Boston Future of Data Meetup: May 2017: Spark Introduction with Credit Card F...
PPT
NoSQL Options Compared
PDF
PPTX
Real World Sql Azure
SQL vs. NoSQL. It's always a hard choice.
SQL vs NoSQL: Big Data Adoption & Success in the Enterprise
Trivadis TechEvent 2017 Tools and Methods for DB Migrations by Kim Berg Hansen
U-SQL Learning Resources (SQLBits 2016)
3. ADO.NET
An Introduction to Pentaho Kettle
U-SQL Federated Distributed Queries (SQLBits 2016)
Amundsen at Brex and Looker integration
App301 Implement a Data Access Layer with Ent Lib
DMann-SQLDeveloper4Reporting
Rdbms vs. no sql
Extensible Database APIs and their role in Software Architecture
NoSQL Databases
Massively scalable ETL in real world applications: the hard way
Characteristics of no sql databases
NOSQL Databases types and Uses
Boston Future of Data Meetup: May 2017: Spark Introduction with Credit Card F...
NoSQL Options Compared
Real World Sql Azure
Ad

Similar to Web Data Analysis at the Spallation Neutron Source (20)

PDF
Cytoscape: Now and Future
PPTX
Google appenginejava.ppt
PDF
Tiny Batches, in the wine: Shiny New Bits in Spark Streaming
PPTX
SQL to NoSQL: Top 6 Questions
PDF
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
PPTX
redpill Mobile Case Study (Salvation Army)
PPTX
PPTX
Oracle OpenWorld 2016 Review - Focus on Data, BigData, Streaming Data, Machin...
DOC
Mihai_Nuta
PDF
Enterprise guide to building a Data Mesh
PDF
Access Data from XPages with the Relational Controls
PDF
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
PDF
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
PDF
Architecture Patterns - Open Discussion
PPTX
Webinar: Enterprise Data Management in the Era of MongoDB and Data Lakes
PPT
Interactive publication platform
PPT
AWS (Hadoop) Meetup 30.04.09
PDF
SDCSB CYTOSCAPE AND NETWORK ANALYSIS WORKSHOP at Sanford Consortium
PDF
What to Expect for Big Data and Apache Spark in 2017
PPTX
The Enterprise Guide to Building a Data Mesh - Introducing SpecMesh
Cytoscape: Now and Future
Google appenginejava.ppt
Tiny Batches, in the wine: Shiny New Bits in Spark Streaming
SQL to NoSQL: Top 6 Questions
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
redpill Mobile Case Study (Salvation Army)
Oracle OpenWorld 2016 Review - Focus on Data, BigData, Streaming Data, Machin...
Mihai_Nuta
Enterprise guide to building a Data Mesh
Access Data from XPages with the Relational Controls
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Architecture Patterns - Open Discussion
Webinar: Enterprise Data Management in the Era of MongoDB and Data Lakes
Interactive publication platform
AWS (Hadoop) Meetup 30.04.09
SDCSB CYTOSCAPE AND NETWORK ANALYSIS WORKSHOP at Sanford Consortium
What to Expect for Big Data and Apache Spark in 2017
The Enterprise Guide to Building a Data Mesh - Introducing SpecMesh
Ad

Recently uploaded (20)

PDF
Introduction to the IoT system, how the IoT system works
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PPT
250152213-Excitation-SystemWERRT (1).ppt
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PPTX
SAP Ariba Sourcing PPT for learning material
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPTX
artificial intelligence overview of it and more
DOC
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PPT
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
PPTX
Digital Literacy And Online Safety on internet
PPT
Ethics in Information System - Management Information System
PPTX
Database Information System - Management Information System
PPTX
Funds Management Learning Material for Beg
PDF
Sims 4 Historia para lo sims 4 para jugar
Introduction to the IoT system, how the IoT system works
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Mathew Digital SEO Checklist Guidlines 2025
250152213-Excitation-SystemWERRT (1).ppt
SASE Traffic Flow - ZTNA Connector-1.pdf
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
SAP Ariba Sourcing PPT for learning material
Design_with_Watersergyerge45hrbgre4top (1).ppt
artificial intelligence overview of it and more
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
Module 1 - Cyber Law and Ethics 101.pptx
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
Digital Literacy And Online Safety on internet
Ethics in Information System - Management Information System
Database Information System - Management Information System
Funds Management Learning Material for Beg
Sims 4 Historia para lo sims 4 para jugar

Web Data Analysis at the Spallation Neutron Source

  • 1. ORNL is managed by UT-Battelle for the US Department of Energy Web Data Analysis at the Spallation Neutron Source Ricardo M. Ferraz Leal Neutron Data Analysis and Visualization Group rhf@ornl.gov
  • 2. 2 Motivation: why not? • SNS has several Web Applications: – People DO use them! • Clusters available to process data. • ICAT: – REST API provides experiment information • Data files path, metadata, IPTS • ICAT + LDAP: – Authentication + Permissions • No need to download Data Analysis Software • Developer: End of cross compilation! • People love Facebook!
  • 3. Building a Web Reduction platform A Small Angle Neutron Scattering prototype…
  • 4. 8 Requirements • Run from a desktop computer, tablet or phone! • Two user modes: – Expert (beamline scientists, advanced users) – Regular users • Data access permissions • Spreadsheet style input – Some scientists use openpyxl to read excel spreadsheets! • Script generation (and tweaking) from the user input • Parallel job execution • Preliminary analysis (e.g. simple fittings)
  • 5. 9 • Responsive Web Design Template: – Google “responsive web design template dashboard” • About 565.000 results – AdminLTE: • https://almsaeedstudio.com/themes/AdminLTE/index2.html • https://github.com/almasaeed2010/AdminLTE “Shopping for free…”
  • 11. 15 • Json visualization grammar – Vega + VegaLite: • https://vega.github.io/vega-lite/ • New Future standard for json plot format (?) • Python backend with HTML/JS rendering. – Altair: • https://github.com/altair-viz/altair • Uses VegaLite • New! – Bokeh: • http://bokeh.pydata.org/en/latest/ • Still in development… – Plotly Offline: • https://plot.ly/python/offline/ • Now free and stable Plotting: D3 & friends
  • 13. 17 • Model Based Views: – Generic Views: List, Create, Update, Delete, etc.. – Model Based Forms • Admin Interface • Initial release: 21 July 2005; 11 years ago – Out of the box Django is a little outdated: • Server side template system • Every request / action loads a full page. • Django Channels (2016): – WebSockets and HTTP2 – Will ship (?) with Django 1.11 (2017) Django
  • 14. 18
  • 15. Web based Data Reduction: Putting the shopping cart together… Small Angle Neutron Scattering Data Reduction & Analysis
  • 16. 20 • Configuration: – Advanced parameters • Masks, calibration, etc… – Can access files from any experiment (e.g mask file): • Server side file browser – A configuration can be assigned to other users • Reduction: – Uses a Configuration – Minimal user input • Uses as much metadata as possible • Form contents can be inferred from the metadata Configuration vs Reduction
  • 17. 21
  • 18. 22
  • 19. 23
  • 20. 24
  • 21. 25
  • 22. 26
  • 23. 27
  • 24. 28
  • 26. 30
  • 27. New Version: 2016 Web Development Standards
  • 28. 32 • Goal: – To provide a UX similar to that of a desktop application. A single-page application (SPA) <!DOCTYPE html> <html lang="en"> <head> </head> <body> <div id="app"></div> <script src="/dist/build.js"></script> </body> </html> See tips: “I am a fast webpage, kneel before my greatness” https://varvy.com/pagespeed/wicked-fast.html
  • 29. 33 • Effortless integration with Electron • Cross platform desktop apps with JavaScript, HTML, and CSS Cross platform desktop app http://electron.atom.io/apps/
  • 30. 34 • JavaScript Framework: – Vue.js – Webpack, node.js & friends… • REST API – Django + REST Framework • Postgres >= 9.4 jsonb (Django >= 1.9 JSONField): – Allows storing form content in JSON format • NoSQL Functionality • Docker containers Tools…
  • 32. 36
  • 33. 37 Wanna play? Let me know: rhf@ornl.gov Acknowledgements: – Tanner Hobson – Shelly Ren – Peter Parker – Ray Gregory – NDAV Group – EQSANS, BioSANS, GPSANS teams

Editor's Notes

  • #2: Web data analysis: Data analysis on the web The user doesn’t need to download any dedicated data analysis software! Finished the code that runs on your local machine, but doesn’t build on windows or osx
  • #9: Went around and asked BL scientists and users what were their requirements Script generation : reduction software independent, facility independent
  • #10: Github was a great contribution to the open source community People like to show off
  • #17: Because we were already using Django… Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Fast Secure: Forgives some programmers mistakes,,,, Cross-Site Request Forgery (CSRF), cleans forms (SQL injection) Beauty of Django consists in the models: - Simple python classes that map to tables in the database. Objects are entries in that table.
  • #26: Table populated by the users but will be automatically populated by ICAT with the new experiment planning and tagging.
  • #33: SPA: - One Single HTTP request - Stile sheets + images in base 64 in the single JS file
  • #35: Vue.js : - New kid on the block similar to Angular, React, Ember, Backbone Django does not provide HTML any longer. Now provides JSON!
  • #36: Images are inlined in base64 to decrease the number of HTTP requests