My StreamLit Sprint: Precise GPT-4 Prompting For Dashboard Visuals
Last Updated on January 29, 2024 by Editorial Team
Author(s): John Loewen, PhD
Originally published on Towards AI.
Medal-worthy Olympic data visuals with modular prompting
Dall-E image: thick dripping oil painting of the (inaccurate) dashboard displayed on a computer screen
With GPT-4, even a complete Streamlit beginner can use the Python StreamLit library to create a data visualization masterpiece.
How do I know this? I am a decent Python coder with ZERO experience using Streamlit β and I conjured up in minutes what would have taken me hours, or even days, without the help of GPT-4 prompting.
In a short span of time, I was able to create:
a StreamLit map showing data counts by countrya StreamLit bar chart showing the top 10 amounts by countrya StreamLit line chart showing trends from year to year for the top 10 countries
How? Using well-formulated modular prompts.
Let me show the four easy steps to a StreamLit dashboard showcasing Olympic medal winners.
The data used to accomplish this task is the βOlympic Medals by Countryβ dataset. It is available on Kaggle, HERE.
In this dataset, the data is organized by year, country, and a count of βGoldβ, βSilverβ and βBronzeβ medals. For the sake of a more βcompleteβ set of data points, we will just extract the totals since 1992 (when all Eastern European countries joined independently).
First, we need to load the dataset from the… 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