Skip to content

BethSequera/Python-api-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-API-Challenge

Weather Analysis and Vacation Planning

Introduction

This project aims to analyze weather data from various cities around the world and utilize this information to plan future vacations. It uses Python, APIs, and data visualization to explore the relationship between weather variables and latitude, as well as to create interactive maps for vacation planning.

Part 1: WeatherPy

In the WeatherPy section, we utilize the citipy library and the OpenWeatherMap API to gather weather data from over 500 randomly selected cities. We then create scatter plots to investigate the relationship between latitude and weather variables, such as temperature, humidity, cloudiness, and wind speed. Additionally, we perform linear regression analysis on these plots to further understand the correlation between latitude and weather conditions in the Northern and Southern Hemispheres.

Part 2: VacationPy

In the VacationPy section, we use the geoviews Python library and the Geoapify API to create interactive maps. The maps display cities with humidity data, helping us identify ideal vacation destinations based on our preferred weather conditions. We narrow down the list of cities based on specified criteria, including temperature, wind speed, and cloudiness. Finally, we find nearby hotels for each selected city and add this information to the map.

How to Use the Project

  1. Clone the repository to your local machine.
  2. Navigate to the WeatherPy directory and run the WeatherPy.ipynb Jupyter notebook to analyze weather data and create plots.
  3. Move to the VacationPy directory and run the VacationPy.ipynb notebook to plan your ideal vacation based on weather conditions and hotel availability.

Project Dependencies

Ensure you have the following Python libraries installed in your environment before running the notebooks:

  • geoviews
  • pyproj
  • cartopy
  • citipy

API Keys

To access the OpenWeatherMap API and the Geoapify API, you'll need to obtain API keys. Please follow the instructions provided in the notebooks to set up the necessary API keys.

Note: Make sure to keep your API keys secure and avoid sharing them publicly.

Important Note

The city data used in this project is generated randomly, so your results may differ slightly from the example outputs provided. Additionally, due to the use of APIs, internet connectivity is required to run the notebooks and retrieve live data.

Conclusion

This project demonstrates the power of Python and APIs in analyzing weather data and making informed decisions about future vacations. We hope you find this project informative and enjoyable as you explore the fascinating relationship between weather and geography. Happy analyzing and vacation planning!

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors