Giter VIP home page Giter VIP logo

python_api_weather_analysis's Introduction

python-api-challenge

This script uses Open Weather API and Google Places API to randomly sample 500+ cities around the world and pulls weather data for analysis. In VacationPy, the same cities are narrowed down by weather conditions and Google Places API is used to search for nearby hotels, then create a heatmap using gmaps with compiled data. In order to run, you will need to configure your own api keys for both and import from a config.py file

Part I - WeatherPy

Summary Plots

lat_vs_temp_chart.png

This plot illustrates that as latitude approaches the equator (latitude of 0 degrees), temperature increases. As latitudes increase into the northern hemisphere, specifically (denoted by a positive value of latitude), temperatures decrease. Especially as the northern hemisphere is currently experience winter, this makes logical sense.

lat_vs_humidity_chart.png

This plot illustrates that there are a wide range of humidities at any given latitude. Other factors (such as latitude, cloudiness, or max temp) may be more beneficial in predicting humidity of a specific location.

lat_vs_cloud_chart.png

This plot is similar to latitude vs. humidity in that there is a wide range of cloudiness at any given latitude.

lat_vs_wind_chart.png

This plot shows a wide range of wind speeds at any given latitude, but the majority of the wind speeds fall between 0 and 15 mph. Wind speeds above 15 mph are more rare, and these locations could be analyzed to be outliers or compared using other factors.

Plots by Hemisphere

Temperature

Northern Hemisphere Southern Hemisphere
north_lat_temp_regression.png south_lat_temp_regression.png

In both hemispheres, as latitudes approach the equator (latitude value of 0), max temperature increases.

Humidity

Northern Hemisphere Southern Hemisphere
north_lat_hum_regression.png south_lat_hum_regression.png

In the northern hemisphere, as latitude increases, humidity increases but not with a strong correlation. In the southern hemisphere, the closer to the equator a location, the highter the humidity. Intuitively, one would think that that humidity increases with proximity to the equator. The high humidity in the northern hemisphere at greater latitudes is counterintuitive. This could be baesd on seasons and a higher deal of moisture in the air due to cloud cover, rain, or snowfall weather patterns during the winter months.

Cloudiness

Northern Hemisphere Southern Hemisphere
north_lat_cloud_regression.png south_lat_cloud_regression.png

Based on these figures, cloudiness (%) has a similar relationship to latitude as that of humidity and latitude. Further analysis and understanding of differences between and interconnectedness of cloud cover and humidity would be warranted.

Wind Speed

Northern Hemisphere Southern Hemisphere
north_lat_wind_regression.png south_lat_wind_regression.png

There appears to be a slight correlation between latitude and wind speed. In general, as latitudes approach the equator, wind speed decreases.

Additional Analysis

  • As mentioned above, latitudes closer to the equator in this model tend to have lower wind speeds. It would be an interesting analysis to compare wind speed with other values such as cloudiness, humidity, or minimum temperatures to find any possible correlation. One thing to note is that latitudes closer to the equator would tend to have smaller swings in temperature on any given day. Wind speeds increase with greater temperature differences, so it makes sense that cities farther from the equator would have a greater swing in teperature as well as wind speed. Further analysis could give more detail.

  • In both hemispheres, as latitudes approach the equator (latitude value of 0), max temperature increases. There is a strong correlation between latitude and temperature in the southern hemisphere, and a slightly stronger correlation in the northern hemisphere. The sharper decrease in maximum temperature in the northern hemisphere could be due to the fact that it is currently winter in the north and summer in the south.

  • The data denoting latitude vs humidity shows a great number of cities in this sample being at a relatively high humidity, but with more clustering of data in the northern hemisphere. This could be affected by the number of cities in this sample in the northern hemisphere, by the time of year, or there could be less cities populating the southern hemisphere overall, based on loctation of inhabitable land.

Part II - VacationPy

heatmap.png

hotel_map_final.png This map displays search results for hotels in locations with weather between 68.0-78.0 (degrees F), between 10-25% cloudiness, and less than 6.00 mph wind speed. Book your vacation soon!

python_api_weather_analysis's People

Contributors

acsours 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.