📣 Holiday Season App Challenge - NYC MTA

:rocket: We’re excited to announce a collaboration between Plotly and Maven Analytics on the Holiday Season App Challenge: exploring data on daily ridership for the Metropolitan Transportation Authority (MTA)!

We challenge the community to create a Dash app that illustrates post-pandemic ridership recovery trends across the MTA’s services.

To learn more about the data and get the most recent daily ridership activity, see NYC.Data.Gov

The winning apps will be judged according to the following categories:

  • Illustration of post-pandemic ridership recovery trends across the MTA’s services
  • App UI/UX Design
  • Creative usage of Plotly graphs
  • Bonus points for integration of LLMs to gain more data insight

Please submit your app as a new post in this thread. Please include a link to the app if possible, code on GitHub, and a short description of the app. We encourage you to also submit your Dash app to the Maven Analytics challenge because they are offering a prize for the best entry that uses Dash.

The submission deadline is the end of the day Sunday, December 1, 2024.

The winners will be announced in December and will receive a reward of: $125 for first place, $75 for second, and $50 for third place.

Let’s show the world the power of Plotly!

Sample app to help you get started:

Code for sample app:
from dash import Dash, dcc, callback, Output, Input
import plotly.express as px
import pandas as pd

df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/refs/heads/master/MTA_Ridership_by_DATA_NY_GOV.csv")

app = Dash()
app.layout = [
    dcc.Dropdown(options=[{'label':'Subway %', 'value':'Subways: % of Comparable Pre-Pandemic Day'},
                          {'label':'Bus %', 'value': 'Buses: % of Comparable Pre-Pandemic Day'}],
                 value='Subways: % of Comparable Pre-Pandemic Day',
                 clearable=False,
                 id='column-selected'
                 ),
    dcc.Graph(id='my-graph')
]

@callback(
    Output('my-graph','figure'),
    Input('column-selected', 'value')
)
def update_graph(col_slctd):
    fig = px.bar(df, x="Date", y=col_slctd)
    fig.update_layout(xaxis_title=None)
    fig.update_traces(marker_color="green")
    fig.add_vline(x="03/11/2020", line_width=1, line_dash="dash", line_color="blue")
    fig.add_annotation(x="03/11/2020", y=100,
                       text="<--- World Health Organization declares a global COVID-19 pandemic.",
                       showarrow=False,
                       xshift=220)
    return fig


if __name__ == '__main__':
    app.run_server(debug=True)

wow, this collaboration was an unexpected one!!! Really looking forward to putting my plotly & dash skills in action for this challenge! Can’t wait to see what others got too!!
Thanks to Plotly and maven analytics for creating this challenge :slight_smile:

3 Likes

:wave: Welcome to the community @Parimala . Looking forward to seeing what kind of app you create :slight_smile:

3 Likes

Hello everyone! I’m new here and just wanted to say how impressed I am with Dash Plotly. These tools are absolutely amazing! I recently started exploring them, and I’m truly fascinated by how powerful and easy they are for building interactive dashboards and visualizations.

Thank you to the developers and contributors for creating such a great resource for data visualization and making it accessible for everyone. I’m looking forward to learning more and contributing to this wonderful community!

1 Like

Thank you for your kind words, @Rufyda . I hope you enjoy your Dash learning journey. Let us know if you have any questions.

Hey @adamschroeder , this seems interesting. Soon will share something interesting. Cheers.

1 Like

Hey @adamschroeder here’s my submission. I am still making a few changes to make it better, but it would be great if you or the community could share feedback too. :slight_smile:

Here’s the dockerhub url for the dash app: Dash app

  • You would need to add your OPENAI_API_KEY though when you pull :money_mouth_face:

General flow and details:
Based on the selected service type and date range, the app filters the MTA ridership dataset. Provides visualizations for post- and pre-pandemic ridership, and integrates OpenAI’s API to answer user queries with insights based on selected data and saved graphs.

Flow:

  • Select the service
  • Pick a date range
  • Click to capture the graph
  • Ask query for assistance

Cheers,
Rishi

2 Likes

Hi Rishi,
Thank you for building and submitting your app. Is there any chance you could deploy the app to the web and share a direct link to the app itself?

I"m almost done and asked already a question about deployment to the web. The version that not takes days, because it would be my first deployment and have I really have no idea about pythonanywhere free, would it be to limited etc. I also saw githubpages as an option (with explanation). Otherwise I’ll create a video and post it on YT.

1 Like

I completely understand, @marieanne . In case you’re still interested, here’s a video about deploying to pythonanywhere. Also Render.com is an option.

But it’s not mandatory. If you share you code and GitHub repo with a video about the app, that works as well.

1 Like

Thank you. I will most certainly have a look at the video of pythonanywhere. You never know if it will be a breeze. :sweat:

Hey Adam, here’s my deployment at Render. (This is my first deployment too at Render) :slight_smile:

NYC-MTA-Ridership-Challenge-Dash-App

2 Likes

Congratulations on deploying your app, @rishinigam . It’s working great.

After I click the button Download graph with image, I don’t see it on my computer. Instead, I get a message below the button that says: Images saved for referencing with LLM.

This button is strictly for assisting the LLM?

1 Like

Thanks for the video on deployment Adam. And yup, the download button will capture image and the LLM will use take it for further analysis. I will soon make the code at github public too. (link to the repo will share soon too) :slight_smile:

1 Like

Here’s the link to the repo too:
NYC-MTA-Ridership-Challenge-Dash-App(github)
Let me know your thoughts and suggestions too. :smiley:

1 Like

Hi @adamschroeder and the Plotly Community!

Here is my submission for the Holiday Challenge: mta-data-challenge. I hope it works fine :stuck_out_tongue:

Here is also the GitHub repo.

It was fun to get back into it, thanks to your tutorials @adamschroeder!

Looking forward to seeing the other submissions.
I removed my social media ccounts a while ago now so unfortunately I won’t be submitting it to Maven Analytics.

3 Likes

Hi @adamschroeder,

Your video tutorial on pythonanywhere deployment is perfect. I managed to deploy my app, it’s here:
https://pukkieboop.pythonanywhere.com/

Maybe I’m going to fix the Legend = True, Automargin=True for the plots.
Messes up title , margin title and legends.
Works fine without errors or warnings local, gave errors on pythonanywhere. Made me a bit sad :-).

The code is here:

After the dataprocessing, I exported the four dataframes with results to .csv and used those on pythonanywhere.

My write up about this project on Maven: https://mavenanalytics.io/project/22439

It’s fun, thank you for the cooperation with Maven!, Marie-Anne

4 Likes

Wow, @jhupiterz I love the colors you chose for the app :muscle:

And that animated line chart was a pleasure to watch. Great choice :slight_smile:

What model did you use for the line hover that creates the jokes through ChatGPT? It’s such an interesting implementation of LLMs.

1 Like

That’s a beautiful app, @marieanne . Greate job.
The information in the Accordion Divs on the right is a good addition to the app.

I also like how you added the trend line :chart_with_upwards_trend:

2 Likes