Simple web interface to visualize temperature and humidity data from a CSV file. Users can upload a CSV log file and get a rendered graph using matplotlib directly in their browser.
- Raspberry Pi (any model that can run a Python HTTP server)
- Generated CSV data from a DHT11 logger project for example
csvlog-web-visualizer/ .gitignore README.md requirements.txt data/ sensor_sample_data.csv docs/ output_web_page.png src/ web_visualizer.py
-
Clone the repository:
git clone https://github.com/olegku-dev/csvlog-web-visualizer.git cd csvlog-web-visualizer
-
Install Python dependencies (If not installed):
pip3 install -r requirements.txt
-
Install system-wide matplotlib (If not installed):
sudo apt install python3-matplotlib
From the root project folder:
cd src
chmod +x web_visualizer.py
python3 -m http.server 8080 --cgi
Open browser and visit:
http://localhost:8080/cgi-bin/web_visualizer.py
*Ensure web_visualizer.py
is in a cgi-bin/
folder to allow execution.
Expected CSV format:
YYYY-MM-DD HH:MM:SS, temperature, humidity
Example:
2024-10-29 18:07:12, 34.7, 45.0