Displaying UN human rights data with Voila, GitHub, and myBinder.org
Author: John Loewen, PhD
Originally published on Towards AI
Sharing data visualizations from Jupyter Notebooks can be challenging, especially for non-technical users who struggle with running Python code.
The combination of GPT-4’s coding capabilities and Voila’s ability to convert Jupyter Notebooks into interactive dashboards opens up a useful workflow for creating and sharing data visualizations — even for users with limited coding experience.
How it works
By prompting GPT-4 to generate complete, working Python code, you can skip manual setup and jump straight to customizing and deploying interactive data visualizations. With GPT-4 handling the code, your focus can stay on the data.
Pairing Voila with GitHub and MyBinder.org allows you to publicly host and share these dashboards with only a few clicks.
Creating a data visualization
Let me walk you through using GPT-4 prompts to create a fully functional interactive data visualization from the CIRIGHTS Human Rights dataset, powered by Plotly for visualizations and Voila for sharing the final product through GitHub and MyBinder.org.
Getting started
Before we begin, you need to have Jupyter Notebook and Voila installed. You can install Jupyter from a command (terminal) prompt using "pip install jupyter".
Once installed, you can create a new notebook within your Jupyter environment, and then add the Voila library.
Conclusion
In this article, we have explored how to use GPT-4 and Voila to create and share interactive data visualizations. By pairing these tools with GitHub and MyBinder.org, you can publicly host and share your dashboards with ease.
FAQs
- Q: What is GPT-4?
A: GPT-4 is a coding AI model that can generate complete, working Python code. - Q: What is Voila?
A: Voila is a library that converts Jupyter Notebooks into interactive dashboards. - Q: How do I install Jupyter and Voila?
A: You can install Jupyter using "pip install jupyter" and Voila is included with Jupyter.