Skip to content

Projects analyzing and visualizing data retrieved from varied APIs

Notifications You must be signed in to change notification settings

SurabhiSood/Python_API_Visualizations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BankingDesertHeatMap-

Goal

To analyse "What is the relationship between poverty, age, and population with the number of banks in a given area?"

###Process the first step was to generate the census data using Census API and a help from [Github guide](https://github.com/CommerceDataService/census-wrapper for library documentation). I ran census to retrieve data on all zip codes (2013 ACS5 Census). Then I created a dataframe containing columns [ZipCode,Population,Poverty Rate].I also stored this dataframe as csv.

Then I read in another csv containing data of bank locations in terms of latitude and longitude.Furthemore, I merged the two csvs post checking the merge on key, data type.

The final step was to create the map. I created one map layer by configuring gmaps with API key and creating a heat map based on poverty rate of the region.PovertyMap

Another layer consists of the bank details.bank

The final Map was created by merging the two layers together.Final

WeatherPy-

Goal

Analyze at least 500 randomly selected cities around the world to prove that the weather gets hotter as one approaches the equator using the Open Weather Map API.

Process

The first step was to generate a random list of at least 500 cities around the world for an unbiased sampling. Random latitudes and longitudes were created using the NumPy library and the city nearest those coordinates were found using citipy and stored in a list.

An empty data frame was then created to store data pulled from the Open Weather Map API. Using df.iterrows(), the API was pinged and information on cloudiness, country name, date, humidity, latitude, longitude, max temperatures, and wind speed were pulled. The data was stored in the empty data frame and exported as a csv file.

Next was to create scatter plots for four comparisons:

  • Latitude vs. Temperature Plot1
  • Latitude vs. Humidity Plot2
  • Latitude vs. Cloudiness Plot3
  • Latitude vs. Wind Speed Plot4

Because all four charts would share similar attributes, I created a function to plot each chart, so that I would only have to input the y-values and labels. However, the data types in the data frame were all strings, so I used pd.to_numeric() on all relevant columns in order to plot the data.

VacationPy-

Goal

Using WeatherPy narrow down cities on selective weather conditions

Process

After reading the csv created during WeatherPy.I created a Humidity HeatMap using google places API.I wrote the code to list the first hotel for each city located within 5000 meters of the coordinates.

Next step was to plot the hotels on gmap using markers and create another heat map layer based on Humidity. Once I obtained all the information.I narrowed down my search based on my ideal weather conditions.Map

About

Projects analyzing and visualizing data retrieved from varied APIs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published