top of page

Create Your First Project

Start adding your projects to your portfolio. Click on "Manage Projects" to get started

Climate Analysis on Honolulu, Hawaii

Project Type

Climate Analysis & Data Exploration

Skills & Tools Used:

● Python
● SQLAlchemy
● Flask API
● Pandas
● NumPy
● Matplotlib

Climate Analysis and Flask API Development Project Summary:

Part 1: Analyze and Explore Climate Data
● Used Python and SQLAlchemy for a comprehensive climate analysis and data exploration.
● Connected to an SQLite database using SQLAlchemy's create_engine() function.
● Employed SQLAlchemy's automap_base() function to reflect tables into classes (station and measurement).
● Linked Python to the database through a SQLAlchemy session, ensuring proper closure at the end.

Precipitation Analysis:
● Identified the most recent date in the dataset.
● Queried and extracted the previous 12 months of precipitation data.
● Loaded the query results into a Pandas DataFrame with specified column names.
● Plotted the precipitation data using Matplotlib.
● Printed summary statistics for the precipitation data.

Station Analysis:
● Calculated the total number of stations in the dataset.
● Identified the most-active stations based on observation counts.
● Designed a query to calculate the lowest, highest, and average temperatures for the most-active station.
● Queried the previous 12 months of temperature observation (TOBS) data for the most-active station.
● Plotted the TOBS data as a histogram with 12 bins.

Part 2: Design Your Climate App (Flask API)
● Created Flask API routes to serve the following endpoints:
- /: Homepage listing all available routes.
- /api/v1.0/precipitation: JSON representation of the last 12 months of precipitation data.
- /api/v1.0/stations: JSON list of stations from the dataset.
- /api/v1.0/tobs: JSON list of temperature observations for the previous year for the most-active station.
- /api/v1.0/<start>: JSON list of TMIN, TAVG, and TMAX for dates greater than or equal to the start date.
- /api/v1.0/<start>/<end>: JSON list of TMIN, TAVG, and TMAX for dates between the start and end dates (inclusive).
● Used Flask jsonify function to convert API data to valid JSON response objects.
● Developed a Flask app to provide climate analysis results through a user-friendly API.

Conclusion:
● Successfully conducted a thorough climate analysis using Python, SQLAlchemy, Pandas, and Matplotlib.
● Demonstrated the ability to design and implement a Flask API based on the analysis results.
● Strengthened skills in querying databases, data manipulation, and API development.
● Enhanced problem-solving capabilities by addressing specific analysis requirements.
● Produced a comprehensive and interactive API for future users to explore climate data related to Honolulu, Hawaii.

bottom of page