Giter VIP home page Giter VIP logo

weather-vs-latitude's Introduction

Weather of 500+ cities across the world

Python API project for Monash Data Analytics Boot Camp

The purpose of this project was to analyse how weather changes as you get closer to the equator. To accomplish this analysis, we first pull data from the OpenWeatherMap API to assemble a dataset on over 500 cities. After assembling the dataset, we use Matplotlib to plot various aspects of the weather vs. latitude. Factors looked at included: temperature, cloudiness, wind speed, and humidity. Then we applied custom filters in order to find cities which meet the specified weather requirements and used Google Places API in order to find the first hotel for each city located within 5000 meters of each city coordinates.

WeatherPy

Data

There are two key sources of data used:

  • citipy Python library - python library which allows to look up the nearest city given a set of geo coordinates

  • OpenWeatherMap API - OpenWeatherMap API which contains weather data for any location including over 200,000 cities

Analysis

  • Generate random list of cities using citipy Python library

  • Perform OpenWeatherMap API call and retrive information about weather for each city

  • Save the data as csv file

  • Create a series of scatter plots to showcase the following relationships:

    • Temperature (F) vs. Latitude
    • Humidity (%) vs. Latitude
    • Cloudiness (%) vs. Latitude
    • Wind Speed (mph) vs. Latitude

TemperatureVsLatitude

HumidityVsLatitude

CloudinessVsLatitude

WindSpeedVsLatitude

  • Run linear regression on each relationship for cities located on the Northern Hemisphere

  • Run linear regression on each relationship for cities located on the Southern Hemisphere

VacationPy

Data

There are two key sources of data used:

  • cities.csv - .csv file with weather data

  • Google Places API - OpenWeatherMap API which contains weather data for any location including over 200,000 cities

Analysis

  • Create a heat map that displays the humidity for every city from the cities.csv dataset:

Heatmap

  • Filter the cities.csv dataset based on the specified weather requirements:

    • zero cloudiness
    • humidity higher than 50%
    • wind speed lower than 5 km/h
    • max temperature higher than 15 deg C but lower than 25 deg C
  • Perform Google Places API call to find the first hotel for each city located within 5000 meters of city's coordinates

  • Plot the hotels on top of the humidity heatmap with each pin containing the Hotel Name, City, and Country:

Hotel_map

Demo

To run the example locally run WeatherPy.ipynb and VacationPy.ipynb files in Jupyter Notebook.

NOTE: both files require api keys for OpenWeatherMap API and Google Places API.

Used Tools

  • Jupyter Notebook
  • Pandas
  • Matplotlib
  • numpy
  • gmaps
  • citipy

weather-vs-latitude's People

Contributors

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