Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Running Python Script from Plotly Dashboard

Hello all.

I’m trying to construct a GUI with Plotly, where the user would input variables through multiple dropdown menus or empty fields. I’d like to pipe these inputs into a pre-defined function, which returns a CSV file, which in turn would be used for visualization on Plotly. Basically I’d like the workflow to look like this:

User inputs variables --> pre-defined function generates CSV file based on inputs --> CSV is loaded into plotly, where the user can select what to visualize.

To this end, is there any way to run python code (i.e. import a pre-defined function or define a new function) within a plotly dashboard?

It sounds like you’re looking for Dash: