📌 Want to learn how to use Dash for Julia to build high-performance dashboards? Check out our recorded webinar!
Today, we’re excited to officially welcome Dash for Julia. By adding Julia to Dash’s Python and R back ends, the Jupyter trinity is complete again.
Today, we’re excited to officially welcome the third Dash back end, Dash for Julia. The Jupyter trinity is complete again!
From the beginning, Dash for Julia has been a community effort. Barely a year ago, Alexandr Romanenko was interested in Dash but preferred working in Julia. Recognizing the flexible architecture, he started building his own Julia back end as the package, Dashboards.jl. At Plotly, we had been discussing a Julia version of Dash for some time, so we were intrigued to hear about this project in the spring and were impressed at how far Alexandr had come in just a few months. Together with some of the world’s leading Julia experts at Julia Computing, Plotly partnered with Alexandr to turn Dashboards.jl into Dash.jl, the official Plotly-supported Julia version of Dash.
Julia users are at the forefront of high-performance computing, from basic research to financial modeling, from pharmaceuticals to energy to aerospace. Julia’s combination of clear and expressive syntax and its relentless focus on performance and scalability make it an ideal platform for our era of exponential growth in data volume. We’re thrilled to be able to offer the same flexible, interactive Dash experience that Python and R users know and love to this new community. If you’re a Julia user looking to take your data exploration to the next level, head on over to our docs, install Dash, and start creating!
pkg> add Dash DashCoreComponents DashHTMLComponents DashTable
Let’s make a Dash for Julia app!
To illustrate just how easy it is to build a Dash for Julia app, Director of Applications Engineering at Julia Computing, Dr. Matt Bauman, created an app that visualizes COVID-19 data from The New York Times, based on state and local health reports in the United States. The Dash for Julia app features dropdown options for state and county, with radio button options for confirmed positive cases, confirmed deaths, cumulative cases, and new daily cases. This app makes it easy to compare records across different datasets, in a fully interactive fashion.
In less than a day, he learned the basics of Dash and created the minimum viable dashboard. Perhaps more importantly, the reactive structure of Dash combined with Julia’s efficient and expressive syntax allowed for easy continued iteration and improvement. The final product is hosted as a highly limited (free tier) Heroku app. It has been running without intervention for the past five months, automatically downloading the new data on-demand and seamlessly handling the ever-growing dataset (now approaching a million rows).
In the open-source repo, you can see how the combination of Julia’s powerful syntaxes and data handling libraries interface with Dash’s reactive structure. We first download the data and join it against the 2019 US Census estimates, storing the resulting DataFrame as df:
df = download_add_preprocess("data/pop2019.csv")
We can then use the very simple template-like pseudo-HTML syntax to define the structure and elements of our dashboard. For example, a key feature of the dashboard is dynamically populating the available counties for a given state. We can reproduce that small section of the website with the table:
Finally, a callback connects the options of the county’s dropdown to the currently selected state name, and we start the app locally:
The complete application is of course more complicated than those 12 lines of code, but the basics are all the same: define a structure with interactive elements and then connect those elements together, linked by arbitrary Julia code. Some key Julia syntaxes like array comprehensions, named tuples, and terse anonymous functions make the developers’ experience smoother. All told, the final product looks something like this:
Take the sample Dash for Julia app for a spin or make your own app! Dash component authors can also easily add a single flag in the build command to include Julia support. Join the Dash Community of over 2M users and share what you make in our Show & Tell!
What about using Dash for Julia in your everyday workflow?
Dash Enterprise for Julia delivers faster and more impactful business outcomes on AI and data science initiatives. It expands upon Dash Open Source. Dash Enterprise is already available in Python and R, and with the expansion of Dash OSS into Julia, Dash Enterprise will be available for Julia users in an upcoming release. It offers a suite of features for ML Ops, Low-Code needs, and Enterprise AI that make it easier to operationalize Dash apps for business value. Through Dash, the world’s largest companies like Tesla and NVIDIA productionize AI initiatives 21x faster than full-stack development teams. If you want to learn more about Dash Enterprise for Julia, contact us!