Skip to content

The Air Quality Analysis in Lima project aims to collect, analyze and visualize air quality data in the city of Lima, Peru. We will use API to obtain real-time data from https://waqi.info/

License

Notifications You must be signed in to change notification settings

haroldeustaquio/Air-Quality-Analysis-in-Lima

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Air Quality Analysis in Lima

Overview

The Lima Air Quality project is designed to collect, process, store, and analyze air quality data in Lima, Peru. By leveraging AWS cloud services, the system ensures scalability, reliability, and real-time monitoring.

This project consists of three main components:

  1. Database: Stores structured air quality data collected from various sensors.
  2. Data Pipeline: Automates the collection, formatting, and storage of air quality data.
  3. Dashboard: Provides visual insights into air quality trends and historical data.

Content


Dashboard

The dashboard provides interactive visualizations into the air quality trends in Lima. It connects to the database and displays metrics such as historical trends, real-time sensor information.

You can access the live dashboard here.

Dashboard Screenshot


Architecture

Database

The database is hosted on AWS RDS (MySQL) and is responsible for storing all air quality data. It consists of tables that keep track of sensor locations and recorded measurements.

Database Architecture

Key Tables:

  • Places: Stores information about the locations where air quality sensors are placed. Each entry includes details such as country, city, sensor ID, district, URL, geographical coordinates, and data source.
  • Air: Records air quality measurements collected by the sensors. Each entry includes the sensor ID, date, and various pollutant levels such as CO, NO₂, O₃, PM10, PM2.5, SO₂, humidity, pressure, and temperature.
  • Metric Description: Provides descriptions for the various metrics recorded in the air quality measurements, detailing what each metric represents.

Data Pipeline

The data pipeline is responsible for automating data ingestion, formatting, and storage. It retrieves air quality data from the World Air Quality Index (WAQI) API, formats it, and inserts it into the database.

Data Pipeline Architecture

Key Functions:

  • Data Retrieval: Fetches real-time air quality data via API.
  • Data Formatting: Structures and formatting the data.
  • Data Storage: Inserts formatted data into the database.

Usage

Clone the Repository

git clone https://github.com/haroldeustaquio/Air-Quality-Lima
cd lima-air-quality

Install Dependencies

pip install -r requirements.txt

Configure Environment Variables

Create a .env file in the root directory and add the following credentials:

DB_HOST=your-db-host
DB_NAME=your-db-name
DB_USER=your-db-user
DB_PASSWORD=your-db-password
API_KEY=your-waqi-api-key

About

The Air Quality Analysis in Lima project aims to collect, analyze and visualize air quality data in the city of Lima, Peru. We will use API to obtain real-time data from https://waqi.info/

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages