Member-only story
Streamlining Interactive Maps with ChatGPT, Python and Plotly Dash
Prompt engineering interactive Python data visualizations
In the recent past, creating data visualizations, particularly in Python, was a finicky affair.
Not anymore.
In this article, two datasets, each organized by country and year, are compared to draw meaningful insights. A solution to display the data on two maps side-by-side, to allow comparison by year, is proposed. To solve this problem, prompt engineering with ChatGPT is used to efficiently generate interactive Python data visualizations in just 4 steps:
- Find, clean, and convert the datasets
- Generate a folium map
- Generate dash App with dropdown menu to display folium map (by time period)
- Generate a second map to display and hook it in to the Dropdown, update both maps with one selection
A modular approach like this is recommended as it gives us a return point to go back to if there are any problems.
So let’s get started…
STEP 1. Find, clean, convert.
What dataset should we use today? I don’t know about you, but I think coffee is awesome. It is warm, soothing, tasty…