This simple Python tool lets you quickly visualize any CSV file as a beautiful interactive HTML chart or table. No coding required!
- Automatically detects the best way to visualize your data (bar chart, scatter plot, heatmap, and table preview)
- Pie chart is only shown if a categorical column has repeated values (e.g., a column with categories that occur more than once)
- If no such column exists, a note is added to the HTML and the pie chart is skipped
- Works with any CSV file
- Generates an HTML file you can open in your web browser
- Python 3.7 or newer
- Internet connection (for first-time installation of dependencies)
- Install dependencies with:
pip install -r requirements.txt
-
Download your CSV file (e.g.,
input.csv
) and place it in this folder. -
Install Python
- If you don't have Python, download it from python.org.
-
Install required packages
- Open a terminal (Command Prompt on Windows, Terminal on Mac/Linux)
- Navigate to this folder (where
visualize_csv.py
andrequirements.txt
are) - Run:
pip install -r requirements.txt
-
Run the script
- In the terminal, run:
python visualize_csv.py input.csv
- Replace
input.csv
with your own CSV file name if different.
- In the terminal, run:
-
View your visualization
- After running, you'll see a message like:
[INFO] Visualization saved as: input_visualization.html [INFO] Please open 'input_visualization.html' in your browser to view the visualization.
- Open the generated
.html
file in your web browser to explore your data interactively!
- After running, you'll see a message like:
- The script will only show a pie chart if there is a categorical column with repeated values (i.e., a real distribution).
- If all categorical columns are unique (like a list of country names), the pie chart is skipped and a note is added to the HTML output.
- If you see an error about missing packages, make sure you ran the
pip install -r requirements.txt
step. - If your CSV is empty or incorrectly formatted, the script will let you know.
This repository includes a sample input.csv
you can try out right away.
Enjoy exploring your data visually!