towardsai.net
How To Prompt GPT-4 For Super Streamlit Death Penalty Data Visuals 0 like March 4, 2025Share this postAuthor(s): John Loewen, PhD Originally published on Towards AI. Interactive Data Visuals with Python Streamlit, Plotly and GPT-4This member-only story is on us. Upgrade to access all of Medium.With Python data visual design, there is a rapidly growing list of awesome tools that create wicked graphs and charts in record time.For example, by combining Pythons Streamlit and Plotly libraries you can easily design a simple prototype interface to explore shifts in global issues by country.To make it even easier, with now near-ubiquitous use of LLMs such as GPT-4, data scientists can simply prompt to generate working Python code for building these dashboards directly.Never has it been easier to create rapid prototypes to express data in deep and granular ways.Bringing death penalty data to life shows us where the world stands on one of the most controversial practices in the legal system. What are some of the trends over the years?Using this recently compiled dataset, lets prompt GPT-4 to create a multi-visual Streamlit app that tells us a story about global death penalty trends.NOTE: all files used in this article are on my Github: HERETo build our interactive dashboard, lets work with two primary datasets: the death penalty dataset and the COW-to-ISO mapping dataset.Together, these datasets combine the death penalty data and country boundaries, allowing us to represent 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 asponsor. Published via Towards AITowards AI - Medium Share this post