JMRI Visualisations
JMRI Code Visualisations
Get a view on the party that make up JMRI
JMRI Clinics
Archived JMRI presentations on NMRA National Conventions and elsewhere
JMRI User Gallery
People have used JMRI to do some great things for the model railroad community.
Our Gallery page highlights some of these.
Apps using JMRI
Showcase of third party apps that connect to JMRI
JMRI Code Visualisation
Get an impression of the parts that make up JMRI Code
Applications
By the community of JMRI.org:

JMRI Help:

Contents Index
Glossary FAQ

Donate to JMRI.org

JMRI CodeFlower 2022

Introduction

The JMRI CodeFlower animation gives a lively perspective on the JMRI structure and how incredibly diverse the current state of work is.
Choose from a subset or let your browser crunch on the full JMRI repo using the drop down over the image.
Enjoy!

 

Source code visualization

CodeFlower visualizes source repositories using an interactive tree. Each disc represents a file, with a radius proportional to the number of lines of code (loc).
All rendering is done client-side, in JavaScript. Try hovering on nodes to see the loc number, clicking on directory nodes to fold them and dragging nodes to rearrange the layout.

Compare with the 2017 JMRI CodeFlower.

CodeFlower was built with d3.js, inspired by Code Swarm and Gource. It was published as open-source by François Zaninotto under the MIT license.

Also view our 2009 JMRI CodeSwarm.

Technical Details

This CodeFlower was created using:

How To

Download the cloc script (Count Lines Of Code, cloc) from github.com/AlDanial/cloc and save it somewhere close to your local GitHub folder.
Make the following adjustment to the script, using a suitable editor:

Next, in Terminal, cd to the folder containing cloc and your JMRI repo and type for example:
perl cloc.pl JMRI/java --csv --by-file --report-file=java.cloc
to get the "cloc" for the JMRI/java folder. (JMRI/java is the path to start analysing; java.cloc is the file name)
See progress, resulting in:
[counting]
12546 text files.
11295 unique files.
3803 files ignored.
Wrote java.cloc

Repeat for the following paths: JMRI (all, too large for the script?), JMRI/java, JMRI/xml and JMRI/help

In a browser open http://www.redotheweb.com/CodeFlower/

Next, open the output file java.cloc and copy its contents into the field below [Origins: clog] on http://www.redotheweb.com/CodeFlower/.
Click the [Convert] button (and optionally, click [Update] to see the new data displayed on the page).
Copy the generated JSON data from the Input Data Format field into a separate file and save it to the codeflower_js folder, together with the d3 JavaScript files. Further instructions are on the CodeFlower web page.

I had to trick a bit on the relative size of each element, as 3 files overshadowed the others: decoderIndex.xml, RR-CirKits-TC-64-basic.xml and functionGenerator.xml all containing over 25k lines of code (loc) while other files contain just 200 loc.
Open CodeFlower.js and make the following changes to show the full current code set of JMRI inside a reasonable square:

Source Data

Take a look at the data inside jmri.json.