Giter Site home page Giter Site logo

sql_alchemy-challenge's Introduction

SQL_Alchemy-Challenge

Holiday vacation in Honolulu, Hawaii! Trip planning! Let's start a climate analysis about the area.

Precipitation Analysis

Find the most recent date in the dataset.

Using that date, get the previous 12 months of precipitation data by querying the previous 12 months of data.
hint

Select only the "date" and "prcp" values.

Load the query results into a Pandas DataFrame. Explicitly set the column names.

Sort the DataFrame values by "date".

Plot the results by using the DataFrame plot method, as the following image shows:

A screenshot depicts the plot.

Use Pandas to print the summary statistics for the precipitation data.

Station Analysis

Design a query to calculate the total number of stations in the dataset.

Design a query to find the most-active stations (that is, the stations that have the most rows). To do so, complete the following steps:

    List the stations and observation counts in descending order.
hint
    Answer the following question: which station id has the greatest number of observations?

Design a query that calculates the lowest, highest, and average temperatures that filters on the most-active station id found in the previous query.
hint

Design a query to get the previous 12 months of temperature observation (TOBS) data. To do so, complete the following steps:

    Filter by the station that has the greatest number of observations.

    Query the previous 12 months of TOBS data for that station.

    Plot the results as a histogram with bins=12, as the following image shows:

    A screenshot depicts the histogram.

Close your session.

Part 2: Design Your Climate App

Now that you’ve completed your initial analysis, you’ll design a Flask API based on the queries that you just developed. To do so, use Flask to create your routes as follows:

/

    Start at the homepage.

    List all the available routes.

/api/v1.0/precipitation

    Convert the query results from your precipitation analysis (i.e. retrieve only the last 12 months of data) 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/tobs

    Query the dates and temperature observations of the most-active station for the previous year of data.

    Return a JSON list of temperature observations for the previous year.

/api/v1.0/<start> and /api/v1.0/<start>/<end>

    Return a JSON list of the minimum temperature, the average temperature, and the maximum temperature for a specified start or start-end range.

    For a specified start, calculate TMIN, TAVG, and TMAX for all the dates greater than or equal to the start date.

    For a specified start date and end date, calculate TMIN, TAVG, and TMAX for the dates from the start date to the end date, inclusive.

sql_alchemy-challenge's People

Contributors

t800-101a avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.