Skip to content

MarcoN16/python-api-Project

Repository files navigation

python-api-Project

This activity is broken down into two deliverables, WeatherPy and VacationPy.

Part 1: WeatherPy

For WeatherPy, I employed Python scripts in a Jupyter notebook to visualize weather patterns across 500 cities at varying distances from the equator. Utilizing Citipy, I determined city locations based on latitude and longitude, and the OpenWeatherMap API for importing weather information.

  • Started by generating random geographic coordinates and finding the nearest cities.

  • Fetched weather data using the OpenWeatherMap API for these cities.

  • Created scatter plots showing relationships like Latitude vs. Temperature, Humidity, Cloudiness, and Wind Speed. Example:

ScatterPlot_1

  • Conducted linear regression analysis for each relationship. Splitting plots into Northern and Southern Hemispheres for better analysis.

  • Explored relationships like Temperature, Humidity, Cloudiness, and Wind Speed against Latitude in both hemispheres. Example:

ScatterPlot_2n

ScatterPlot_2s

Part 2: VacationPy

In VacationPy, I developed a code using Jupyter notebooks, the geoViews Python library, and the Geoapify API to analyze weather data and plan vacations based on specific weather characteristics.

  • Loaded weather and coordinates data for cities from a CSV file.

  • Utilized the Geoapify API and geoViews Python library to create map visualizations, with the point sizes indicating humidity levels. GeoView1

  • Narrowed down the DataFrame to identify ideal weather conditions: temperature between 21 and 28 degrees, low wind speed, and zero cloud cover.

  • Created a new DataFrame, 'hotel_df,' to store city, country, coordinates, and humidity information.

  • Leveraged the Geoapify API to find the closest hotel within 10,000 meters for each city's coordinates and added this information to the map's hover message. GeoView2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors