This repository hosts tools and data for monitoring air quality in Brazil. The dashboard serves as a visualization hub by aggregating data from various air quality networks, supporting research and increasing public awareness of air pollution trends and solutions.
The Air Quality Brazil Dashboard is an interactive and dynamic platform built using Streamlit and Plotly. It provides visualizations such as graphs, maps, and filters to explore air quality data from different regions of Brazil.
This dashboard currently features real data from Fortaleza, CearΓ‘, provided by the MOQA Network β a collaboration between:
- TRAMA (Transport and Environment Laboratory) β UFC (Federal University of CearΓ‘)
- CITINOVA β Foundation for Science, Technology, and Innovation of Fortaleza
- Fortaleza City Hall
The data includes air quality records from August 1, 2024, to August 6, 2024. Future releases will include extended datasets and other regions of Brazil.
- Initial Dashboard: Interactive and user-friendly interface
- Data Import: SQLite databases can be loaded dynamically
- Graphs: Line charts for temperature, humidity, and particulate matter
- Map: Devices displayed on a map with geolocations
- Filters: Time range, device selection, and data thresholds
- New Visualizations: Heatmaps, scatter plots, and advanced charts
- Import Additional Sources: Integrate other air quality networks
- Enhance Statistical Analysis: Add in-depth statistics and summary insights
- Calculate AQI (Air Quality Index): Automatic AQI calculations in the dashboard
A sample SQLite database is available in the folder data/air-quality-data
. It contains real air quality data from the MOQA Network, recorded in Fortaleza, CearΓ‘, between August 1, 2024, and August 6, 2024. This database is for demonstration and development purposes.
To use this dashboard with your data:
- Place your SQLite database files in the folder:
data/air-quality-data/
- Ensure the database contains the necessary fields:
date
β Date of recordinghour
β Time of recording (optional)temperature
β Air temperaturehumidity
β Relative humidityparticulate_matter
β PM (Β΅g/mΒ³)latitude
andlongitude
β Device geolocation coordinates
More datasets will be added in future releases.
- Python 3.9+
- Required Python libraries:
streamlit
pandas
plotly
sqlite3
-
Clone the repository:
git clone https://github.com/xToshiro/air-quality-dashboard.git cd air-quality-dashboard
-
Install the dependencies:
pip install -r requirements.txt
-
Run the Streamlit application:
streamlit run dashboardv2.py
-
Clone the repository:
git clone https://github.com/xToshiro/air-quality-dashboard.git cd air-quality-dashboard
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- Windows:
venv\Scripts\activate
- Linux/Mac:
source venv/bin/activate
- Windows:
-
Install the dependencies:
pip install -r requirements.txt
-
Run the Streamlit application:
streamlit run dashboardv2.py
-
(Optional) Deactivate the virtual environment after use:
deactivate
- Main Dashboard with graphs and device maps.
- Filters for time ranges, devices, and measurement thresholds.
- Interactive Heatmap Visualize spatial distribution of measurements like Temperature, Humidity, or Particulate Matter.
-
Correlation Matrix and Scatter Plot
-
Analyze relationships between variables using an interactive correlation matrix and scatter plot matrix.
-
Easily identify strong correlations or patterns.
-
-
Advanced Statistical Summary
-
Summarize key statistics (mean, median, etc.) for selected variables.
-
Visualize distributions using side-by-side boxplots for better insights.
-
Contributions are welcome! If you would like to:
- Add new features
- Fix bugs
- Improve documentation
Please fork the repository, make changes, and submit a pull request.
This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3, June 29, 2007.
For more details, see the LICENSE file.
Developed by Jairo Ivo Castro Brito
TRAMA β Laboratory of Transport and Environment
Federal University of CearΓ‘ (UFC)
π GitHub Profile
This project is supported by:
- TRAMA Laboratory β Transport and Environment Laboratory at UFC
For inquiries or support, please contact:
π§ jairoivo.brito@det.ufc.br
Stay tuned for upcoming features such as automatic AQI calculations, extended datasets, and integration with real-time air quality networks.