Simple GPT-4 Prompting For An Awesome Animated Streamlit App
Last Updated on December 17, 2024 by Editorial Team
Author(s): John Loewen, PhD
Originally published on Towards AI.
Visualizing alarming UNHCR displacement trends with Python
This member-only story is on us. Upgrade to access all of Medium.
Python Streamlit is an awesome framework for creating interactive web interfaces β and GPT-4 can whip up working Streamlit code in a flash.
Combine this with Python Plotly for your data visualizations and youβve got beautiful maps and charts that can be animated with Streamlit tools.
Like me, most of you need proof, so let me show you how.
The UNHCR refugee dataset contains recently updated data on global displacement.
Letβs get GPT-4 to help us visualize this through a custom Choropleth map and line chart animation. And letβs do it modularly.
The UN data sets on the displacement of people are well maintained and current. We can see a current representation of displacement HERE.
With the broadest of strokes, we can clearly see that the numbers on human displacement are trending upwards at quite an alarming rate.
We can find the raw data to download HERE.
For the purpose of this exercise, I have chosen 20 years of data (2004β2024) by country (for more detailed analysis).
Your spreadsheet filen should look similar to the following structure:
After you download the spreadsheet from the UNHCR site, you need to remove the excess rows from the top and you can… Read the full blog for free on Medium.
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming aΒ sponsor.
Published via Towards AI