Displaying Dimuon Events from the CMS Detector using D3.js

Physicists working on the CMS Detector
Physicists working on the CMS Detector

I became a Python geek and GnuPlot maniac since I joined CERN around three years ago. I have to admit, however, that I really enjoy the flexibility of D3.js, and its capability to render histograms directly in the web browser.

D3 is a JavaScript library for manipulating documents based on data. This library helps you to bring data to life leveraging HTML, CSS and SVG, and embed it in your website.

The following example loads a CSV file, which includes 10,000 dimuon events (i.e. events containing two muons) from the CMS detector, and displays the distribution of the invariant mass M (in GeV, in bins of size 0.1 GeV):

Feel free to download the sample CSV dataset here.

Further reading: D3 Cookbook

Datenvisualisierung mit Tableau (mitp Professional)
Alexander Loth - Publisher: mitp - Edition no. 2018 (31.07.2018) - Broschiert: 224 pages
29,99 EUR
Data Science mit Python: Das Handbuch für den Einsatz von IPython, Jupyter, NumPy, Pandas, Matplotlib und Scikit-Learn (mitp Professional))
Jake VanderPlas - Publisher: mitp - Edition no. 2018 (30.11.2017) - Broschiert: 552 pages
49,99 EUR
Data Science für Unternehmen: Data Mining und datenanalytisches Denken praktisch anwenden (mitp Business)
Foster Provost, Tom Fawcett - Publisher: mitp - Edition no. 12017 (30.10.2017) - Taschenbuch: 432 pages
34,99 EUR