Master LLMs with our FREE course in collaboration with Activeloop & Intel Disruptor Initiative. Join now!

Publication

My StreamLit Sprint: Precise GPT-4 Prompting For Dashboard Visuals
Data Visualization   Latest   Machine Learning

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

Feedback ↓