Skip to content

Used Python and SQLAlchemy to do basic climate analysis, data exploration, and data visualization of a provided Hawaii climate database. Then designed a Flask API based on the analysis to create my routes.

Notifications You must be signed in to change notification settings

saharalaei/Hawaii-Climate-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sqlalchemy-challenge

Precipitation Analysis

  • Design a query to retrieve the last 12 months of precipitation data.

  • Load the query results into a Pandas DataFrame

  • Plot the results.

Station Analysis

  • Design a query to calculate the total number of stations.

  • Design a query to find the most active stations.

  • Design a query to retrieve the last 12 months of temperature observation data (TOBS).

    • Filter by the station with the highest number of observations.

    • Plot the results as a histogram

Step 2 - Climate App

Routes

  • /

    • Home page.

    • List all routes that are available.

  • /api/v1.0/precipitation

    • Convert the query results to a dictionary using date as the key and prcp as the value.

    • Return the JSON representation of your dictionary.

  • /api/v1.0/stations

    • Return a JSON list of stations from the dataset.
  • /api/v1.0/<start> and /api/v1.0/<start>/<end>

    • Return a JSON list of the minimum temperature, the average temperature, and the max temperature for a given start or start-end range.

    • When given the start only, calculate TMIN, TAVG, and TMAX for all dates greater than and equal to the start date.

    • When given the start and the end date, calculate the TMIN, TAVG, and TMAX for dates between the start and end date inclusive.

Bonus: Other Recommended Analyses

Temperature Analysis I

  • Hawaii is reputed to enjoy mild weather all year. Is there a meaningful difference between the temperature in, for example, June and December?

  • You may either use SQLAlchemy or pandas's read_csv() to perform this portion.

  • Identify the average temperature in June at all stations across all available years in the dataset. Do the same for December temperature.

  • Use the t-test to determine whether the difference in the means, if any, is statistically significant. Will you use a paired t-test, or an unpaired t-test? Why?

Temperature Analysis II

  • The starter notebook contains a function called calc_temps that will accept a start date and end date in the format %Y-%m-%d. The function will return the minimum, average, and maximum temperatures for that range of dates.

  • Use the calc_temps function to calculate the min, avg, and max temperatures for your trip using the matching dates from the previous year (i.e., use "2017-01-01" if your trip start date was "2018-01-01").

  • Plot the min, avg, and max temperature from your previous query as a bar chart.

    • Use the average temperature as the bar height.

    • Use the peak-to-peak (TMAX-TMIN) value as the y error bar (YERR).

Copyright

Trilogy Education Services © 2019. All Rights Reserved.

About

Used Python and SQLAlchemy to do basic climate analysis, data exploration, and data visualization of a provided Hawaii climate database. Then designed a Flask API based on the analysis to create my routes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published