This project conducts a climate analysis on weather data in Hawaii and builds a simple Flask-based API to deliver the results. Using Python and SQLAlchemy, the project interacts with a SQLite database containing weather station data and temperature measurements. A Jupyter Notebook is used for exploratory data analysis and visualizations.
The project includes the following files:
| File Name | Description |
|---|---|
hawaii_measurements.csv |
Contains weather measurements like precipitation and temperature. |
hawaii_stations.csv |
Contains information about weather stations in Hawaii. |
hawaii.sqlite |
SQLite database file containing weather data. |
climate_starter.ipynb |
Jupyter Notebook for data exploration and analysis. |
app.py |
Flask application to set up weather data API routes. |
-
Exploratory Data Analysis:
- Analyze weather data (precipitation, temperatures) in Hawaii.
- Visualize trends using Matplotlib.
-
Database Interaction:
- Use SQLAlchemy to query the SQLite database for climate data.
- Perform data retrievals for weather stations and measurements.
-
Flask Weather API:
- Create API routes to query weather information:
/api/v1.0/precipitation- Precipitation data./api/v1.0/stations- List of weather stations./api/v1.0/tobs- Temperature observations for the most active station./api/v1.0/<start>and/api/v1.0/<start>/<end>- Min, average, and max temperatures for a date range.
- Create API routes to query weather information:
-
Prerequisites:
- Python 3.x
- SQLite
- Flask
- Jupyter Notebook
-
Setup:
-
Clone this repository or download the project files.
-
Install dependencies (if needed):
-
pip install -r requirements.txt- Precipitation Trends:
- Analysis shows seasonal precipitation patterns in Hawaii.
- Temperature Observations:
- Temperature observations indicate consistent warmth, with peak observations in the most active weather station.
Example Outputs:
- Visualization: Line charts for precipitation trends over time.
- Flask API: JSON responses with climate data for specific routes.