Use Jupyter Notebook Python 3 and save the file in .ipynb Please comment the code thoroughly as I will be explaining it Part I - WeatherPy In this example, you’ll be creating a Python script to...

1 answer below »
Please see attached instructions and starter code. It requires using Python to create an API.




Use Jupyter Notebook Python 3 and save the file in .ipynb Please comment the code thoroughly as I will be explaining it Part I - WeatherPy In this example, you’ll be creating a Python script to visualize the weather of 500+ cities across the world of varying distance from the equator. To accomplish this, you’ll be utilizing a simple Python library, the OpenWeatherMap API, and a little common sense to create a representative model of weather across world cities. Your first objective is to build 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 After each plot add a sentence or too explaining what the code is and analyzing. Your next objective is to run linear regression on each relationship, only this time separating them into Northern Hemisphere (greater than or equal to 0 degrees latitude) and Southern Hemisphere (less than 0 degrees latitude): · Northern Hemisphere - Temperature (F) vs. Latitude · Southern Hemisphere - Temperature (F) vs. Latitude · Northern Hemisphere - Humidity (%) vs. Latitude · Southern Hemisphere - Humidity (%) vs. Latitude · Northern Hemisphere - Cloudiness (%) vs. Latitude · Southern Hemisphere - Cloudiness (%) vs. Latitude · Northern Hemisphere - Wind Speed (mph) vs. Latitude · Southern Hemisphere - Wind Speed (mph) vs. Latitude After each pair of plots explain what the linear regression is modelling such as any relationships you notice and any other analysis you may have. Your final notebook must: · Randomly select at least 500 unique (non-repeat) cities based on latitude and longitude. · Perform a weather check on each of the cities using a series of successive API calls. · Include a print log of each city as it’s being processed with the city number and city name. · Save a CSV of all retrieved data and a PNG image for each scatter plot. Part II - VacationPy Use jupyter-gmaps and the Google Places API for this part of the assignment. · Note: if you having trouble displaying the maps try running jupyter nbextension enable --py gmaps in your environment and retry. · Create a heat map that displays the humidity for every city from the part I of the homework. · Narrow down the DataFrame to find your ideal weather condition. For example: · A max temperature lower than 80 degrees but higher than 70. · Wind speed less than 10 mph. · Zero cloudiness. · Drop any rows that don’t contain all three conditions. You want to be sure the weather is ideal. · Note: Feel free to adjust to your specifications but be sure to limit the number of rows returned by your API requests to a reasonable number. · Using Google Places API to find the first hotel for each city located within 5000 meters of your coordinates. · Plot the hotels on top of the humidity heatmap with each pin containing the Hotel Name, City, and Country. { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# VacationPy\n", "----\n", "\n", "#### Note\n", "* Instructions have been included for each segment. You do not have to follow them exactly, but they are included to help you think through the steps." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Dependencies and Setup\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "import numpy as np\n", "import requests\n", "import gmaps\n", "import os\n", "\n", "# Import API key\n", "from api_keys import g_key\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Store Part I results into DataFrame\n", "* Load the csv exported in Part I to a DataFrame" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Humidity Heatmap\n", "* Configure gmaps.\n", "* Use the Lat and Lng as locations and Humidity as the weight.\n", "* Add Heatmap layer to map." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Create new DataFrame fitting weather criteria\n", "* Narrow down the cities to fit weather conditions.\n", "* Drop any rows will null values." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Hotel Map\n", "* Store into variable named `hotel_df`.\n", "* Add a \"Hotel Name\" column to the DataFrame.\n", "* Set parameters to search for hotels with 5000 meters.\n", "* Hit the Google Places API for each city's coordinates.\n", "* Store the first Hotel result into the DataFrame.\n", "* Plot markers on top of the heatmap." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# NOTE: Do not change any of the code in this cell\n", "\n", "# Using the template add the hotel marks to the heatmap\n", "info_box_template = \"\"\"\n", "
\n", "
Name

{Hotel Name}
\n", "
City

{City}
\n", "
Country

{Country}
\n", "
\n", "\"\"\"\n", "# Store the DataFrame Row\n", "# NOTE: be sure to update with your DataFrame name\n", "hotel_info = [info_box_template.format(**row) for index, row in narrowed_city_df.iterrows()]\n", "locations = hotel_df[[\"Lat\", \"Lng\"]]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Add marker layer ontop of heat map\n", "\n", "\n", "# Display Map" ] } ], "metadata": { "kernelspec": { "display_name": "pydev", "language": "python", "name": "pydev" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.4" }, "latex_envs": { "LaTeX_envs_menu_present": true, "autoclose": false, "autocomplete": true, "bibliofile": "biblio.bib", "cite_by": "apalike", "current_citInitial": 1, "eqLabelWithNumbers": true, "eqNumInitial": 1, "hotkeys": { "equation": "Ctrl-E", "itemize": "Ctrl-I" }, "labels_anchors": false, "latex_user_defs": false, "report_style_numbering": false, "user_envs_cfg": false } }, "nbformat": 4, "nbformat_minor": 2 }
Answered Same DayOct 14, 2021

Answer To: Use Jupyter Notebook Python 3 and save the file in .ipynb Please comment the code thoroughly as I...

Ishvina answered on Oct 16 2021
147 Votes
Solution_Weather_Vacation/api_keys.py
# OpenWeatherMap API Key
weather_api_key = "7e900d25018901ccf59f706eb24f49b7"
# Google API Key
g_key = "AIzaSyCKx-tYithgjqcbdm9FQYjK-VJSP1Prz8c"
Solution_Weather_Vacation/cities.csv
City,Cloudiness,Country,Date,Humidity,Lat,Lng,Max Temp,Wind Speed
Vaini,90,TO,1602836083,88,-21.2,-175.2,75.2,8.05
Ust-Maya,0,RU,1602836084,90,60.42,134.53,19.06,3.33
Jamestown,90,US,1602836084,100,42.1,-79.24,46.0,5.82
Skibbereen,75,IE,1602836085,87,51.55,-9.27,44.6,6.93
Ushuaia,90,AR,1602836085,86,-54.8,-68.3,39.2,13.87
Bengkulu,65,ID,1602835883,71,-3.8,102.27,84.33,9.46
Port Alfred,39,ZA,1602836085,66,-33.59,26.89,69.04,10.89
Atuona,2,PF,1602836086,76,-9.8,-139.03,78.57,19.95
Chokurdakh,100,RU,1602836086,99,70.63,147.92,31.75,11.41
New Richmond,1,US,1602836087,81,45.12,-92.54,33.8,5.82
Bandundu Province,62,CD,1602836087,69,-3.32,17.37,83.48,3.09
Kuito,96,AO,1602836087,64,-12.38,16.93,69.8,8.46
Fortuna,1,US,1602836087,93,40.6,-124.16,50.0,9.17
Chui,0,UY,1602836087,95,-33.7,-53.46,56.43,6.73
Wenceslau Braz,94,BR,1602836088,99,-23.87,-49.8,59.0,4.0
Samarai,4,PG,1602836088,84,-10.62,150.67,78.6,11.77
Mercedes,49,AR,1602836088,55,-34.65,-59.43,60.01,3.0
Kapaa,1,US,1602836088,88,22.08,-159.32,75.2,4.7
Mokhsogollokh,100,RU,1602836089,98,61.47,128.92,25.95,6.04
Homer,1,US,1602836089,86,59.64,-151.55,41.0,6.71
Faya,0,SA,1602836089,16,18.39,42.45,71.6,9.17
Busselton,0,AU,1602836089,32,-33.65,115.33,70.0,11.01
Berdigestyakh,100,RU,1602836090,98,62.1,126.7,26.73,7.52
Mount Darwin,9,ZW,1602836090,36,-16.77,31.58,77.11,7.0
Shimoda,40,JP,1602835877,67,34.67,138.95,68.0,18.34
Dunedin,100,NZ,1602835809,87,-45.87,170.5,46.0,14.76
Launceston,90,AU,1602836090,54,-41.45,147.17,53.6,3.98
Gachsaran,0,IR,1602836091,18,30.36,50.8,87.8,4.97
New Norfolk,7,AU,1602836091,57,-42.78,147.06,52.0,1.99
Hermanus,99,ZA,1602836091,63,-34.42,19.23,69.01,5.01
San Patricio,75,US,1602836091,88,28.02,-97.52,78.8,8.05
Avera,1,US,1602836091,91,33.19,-82.53,69.8,3.36
Samarkand,0,UZ,1602836087,24,39.65,66.96,71.6,4.7
Tura,25,IN,1602836092,77,25.52,90.22,85.59,3.18
Porto Velho,20,BR,1602836092,94,-8.76,-63.9,73.4,2.98
Albany,100,US,1602836092,70,42.6,-73.97,55.99,1.81
Grenville,30,GD,1602836092,75,12.12,-61.62,83.16,14.72
Rikitea,100,PF,1602836093,77,-23.12,-134.97,73.99,17.65
Teya,100,RU,1602836093,92,60.38,92.63,31.21,10.56
Hobart,20,AU,1602835949,60,-42.88,147.33,52.0,16.11
Mataura,100,NZ,1602836093,77,-46.19,168.86,46.99,5.99
Lorengau,100,PG,1602836093,73,-2.02,147.27,82.33,3.91
Lovozero,100,RU,1602836080,95,68.0,35.01,32.45,11.39
George Town,40,MY,1602835878,79,5.41,100.34,87.8,6.93
Yellowknife,90,CA,1602836094,73,62.46,-114.35,25.0,18.34
Nome,90,US,1602836094,86,64.5,-165.41,39.2,20.8
Longyearbyen,75,SJ,1602836094,63,78.22,15.64,28.4,27.51
Husavik,70,IS,1602836094,92,66.04,-17.34,23.0,4.7
Te Anau,100,NZ,1602836094,92,-45.42,167.72,41.63,4.34
Sumbe,90,AO,1602836095,80,-11.21,13.84,77.0,9.17
Mankono,74,CI,1602836095,92,8.06,-6.19,73.71,4.59
Tuktoyaktuk,100,CA,1602836095,96,69.45,-133.04,21.49,17.94
Nanortalik,100,GL,1602836095,71,60.14,-45.24,41.13,10.4
Ajdabiya,0,LY,1602836095,19,30.76,20.23,88.43,20.74
Sorokino,0,RU,1602836096,63,53.75,84.92,48.76,3.56
Fes,75,MA,1602836096,81,34.04,-5.0,53.6,5.82
Lumberton,90,US,1602836064,100,34.62,-79.01,71.6,7.34
Hong Kong,53,HK,1602836027,66,22.29,114.16,84.99,5.01
Punta Arenas,99,CL,1602836097,70,-53.15,-70.92,46.0,25.28
Qaqortoq,100,GL,1602836097,30,60.72,-46.03,53.6,20.8
Sos'va,32,RU,1602836097,70,59.18,61.86,54.79,14.45
Belaya Gora,100,RU,1602836035,98,68.53,146.42,24.96,15.93
Avarua,82,CK,1602836098,72,-21.21,-159.78,66.2,2.24
Philadelphia,75,US,1602836098,93,39.95,-75.16,66.0,6.93
Bedelē,4,ET,1602836098,87,8.46,36.35,66.61,3.53
Mar del Plata,90,AR,1602836098,100,-38.0,-57.56,57.2,6.93
Arraial do Cabo,100,BR,1602836098,81,-22.97,-42.03,70.75,13.09
Puerto Ayora,85,EC,1602836098,91,-0.74,-90.35,69.01,8.01
Geraldton,100,AU,1602835943,60,-28.77,114.6,71.6,24.16
Huaidian,100,CN,1602835852,50,33.43,115.03,68.95,8.21
Kentau,0,KZ,1602836099,19,43.52,68.51,72.88,13.24
Naryan-Mar,100,RU,1602836099,92,67.67,53.09,31.14,2.06
Makakilo City,1,US,1602836099,83,21.35,-158.09,78.8,3.04
Klaksvík,95,FO,1602836100,87,62.23,-6.59,42.8,2.24
Oleksandrivka,99,UA,1602836100,67,48.96,32.23,65.86,11.03
Seoul,90,KR,1602835921,54,37.57,126.98,60.8,0.96
Bay Roberts,0,CA,1602836100,1,47.6,-53.26,54.0,1.57
Broken Hill,100,AU,1602836100,34,-31.95,141.43,78.8,17.22
Dubbo,76,AU,1602836100,46,-32.25,148.62,71.6,8.05
Hilo,1,US,1602836101,78,19.73,-155.09,75.2,3.36
Diofior,20,SN,1602836101,94,14.18,-16.67,77.0,3.36
Puerto Escondido,42,MX,1602836101,77,15.85,-97.07,78.67,4.0
Imbituba,75,BR,1602836101,68,-28.24,-48.67,68.0,6.93
Belogorsk,16,RU,1602836085,69,50.92,128.46,39.06,10.56
Ilulissat,100,GL,1602836102,80,69.22,-51.1,35.6,3.36
Grande Prairie,90,CA,1602836102,87,55.17,-118.8,32.0,2.24
Abaeté,79,BR,1602836102,87,-19.16,-45.45,70.0,2.82
Clyde River,90,CA,1602836102,95,70.47,-68.59,32.0,21.92
Cherskiy,27,RU,1602836103,93,68.75,161.3,29.59,4.29
Killybegs,2,IE,1602836104,100,54.63,-8.45,44.6,8.05
Goderich,2,CA,1602836104,84,43.75,-81.72,46.99,5.01
Mariestad,90,SE,1602836104,100,58.71,13.82,44.6,3.36
Bilibino,66,RU,1602836081,94,68.05,166.44,26.47,3.42
Tynda,100,RU,1602836084,91,55.17,124.72,32.05,6.67
Pandamatenga,0,BW,1602836102,32,-18.53,25.63,84.04,8.1
Bethel,90,US,1602836105,93,41.37,-73.41,63.0,5.82
Bluff,76,NZ,1602836105,77,-46.6,168.33,46.99,5.99
Deputatsky,100,RU,1602836105,98,69.3,139.9,15.17,6.8
Birao,100,CF,1602836105,63,10.28,22.79,84.02,5.08
Bredasdorp,100,ZA,1602836105,64,-34.53,20.04,69.8,16.11
Carauari,55,BR,1602836106,97,-4.88,-66.9,71.82,1.68
Taoudenni,5,ML,1602836107,16,22.68,-3.98,88.16,11.27
Butaritari,55,KI,1602836107,75,3.07,172.79,82.54,14.67
Khatanga,0,RU,1602836108,93,71.97,102.5,1.63,5.93
Talnakh,40,RU,1602836108,92,69.49,88.4,21.2,11.18
Carnarvon,0,AU,1602836109,65,-24.87,113.63,77.0,28.86
Saint-Philippe,5,RE,1602836109,61,-21.36,55.77,80.6,8.05
Lingao,100,CN,1602836109,83,19.91,109.69,77.94,25.88
Lebu,0,CL,1602836110,87,-37.62,-73.65,49.96,11.74
Kempsey,44,AU,1602836110,84,-31.08,152.83,68.0,3.0
Portland,1,US,1602836110,81,45.52,-122.68,51.01,2.26
Cape Town,91,ZA,1602836111,46,-33.93,18.42,71.6,3.36
São Miguel do Araguaia,0,BR,1602836111,70,-13.28,-50.16,74.84,8.1
Champerico,59,GT,1602836111,97,14.3,-91.92,64.99,5.68
Mandalgovi,0,MN,1602836091,34,45.76,106.27,50.67,17.43
Kieta,99,PG,1602836112,75,-6.22,155.63,81.18,4.85
Lompoc,1,US,1602836112,71,34.64,-120.46,62.6,5.82
Chervona Sloboda,49,UA,1602836112,71,49.38,32.15,64.36,8.81
Yulara,0,AU,1602836112,8,-25.24,130.99,96.8,10.29
Saint Anthony,1,US,1602836112,64,45.02,-93.22,39.2,6.93
Bac Lieu,100,VN,1602836000,85,9.29,105.72,79.09,14.41
Rocha,24,UY,1602836113,94,-34.48,-54.33,52.2,5.08
Nikolskoye,75,RU,1602836113,75,59.7,30.79,41.0,8.95
Camabatela,100,AO,1602836113,80,-8.19,15.38,73.89,1.41
Makurdi,54,NG,1602836113,84,7.74,8.51,79.36,3.47
Faanui,3,PF,1602836114,81,-16.48,-151.75,78.73,11.86
Hamilton,90,US,1602836114,81,39.18,-84.53,46.99,8.05
Hithadhoo,21,MV,1602836114,72,-0.6,73.08,83.19,20.71
Tuatapere,99,NZ,1602836114,77,-46.13,167.68,46.99,7.0
Pisco,34,PE,1602836114,88,-13.7,-76.22,64.4,3.36
Vanimo,100,PG,1602836115,84,-2.67,141.3,78.55,5.32
Beringovskiy,18,RU,1602836082,88,63.05,179.32,39.67,10.76
East London,20,ZA,1602836116,73,-33.02,27.91,69.8,10.29
Alice Springs,73,AU,1602836109,11,-23.7,133.88,95.0,5.82
Saint Paul Harbor,1,US,1602836116,80,57.79,-152.41,33.8,5.82
Troitsko-Pechorsk,100,RU,1602836081,98,62.71,56.2,31.51,11.97
Birjand,0,IR,1602836117,4,32.87,59.22,68.0,5.84
Hoquiam,90,US,1602836117,62,46.98,-123.89,54.0,4.7
Zwedru,62,LR,1602836117,93,6.07,-8.13,74.75,1.05
Sain Alto,12,MX,1602836117,60,23.58,-103.25,56.61,1.86
Taltal,45,CL,1602836118,78,-25.4,-70.48,54.91,1.5
Mackay,0,AU,1602835902,57,-21.15,149.2,75.2,16.11
Acapulco de Juárez,81,MX,1602836016,85,16.86,-99.89,79.09,4.43
Coquimbo,99,CL,1602836118,93,-29.95,-71.34,53.6,3.36
Pingliang,0,CN,1602835819,37,35.54,106.69,54.32,6.33
Port Blair,94,IN,1602836119,76,11.67,92.75,82.81,12.19
Acaraú,57,BR,1602836119,82,-2.89,-40.12,78.53,13.89
Taksimo,67,RU,1602836119,81,56.34,114.88,35.26,0.6
Fare,22,PF,1602836119,78,-16.7,-151.02,79.45,13.91
Batman,0,TR,1602836119,32,37.89,41.13,68.0,4.7
Vostok,0,RU,1602836119,90,46.49,135.88,30.42,3.76
Port Elizabeth,40,ZA,1602836120,77,-33.92,25.57,68.0,9.17
Iqaluit,90,CA,1602836120,100,63.75,-68.51,33.8,6.93
Hualmay,76,PE,1602836120,85,-11.1,-77.61,61.5,6.93
Dikson,83,RU,1602836120,95,73.51,80.55,28.42,9.86
Mahébourg,40,MU,1602836100,65,-20.41,57.7,80.6,11.41
Lufilufi,75,WS,1602836121,94,-13.87,-171.6,78.8,6.93
Leningradskiy,100,RU,1602836121,90,69.38,178.42,35.89,17.47
Quatre Cocos,40,MU,1602836121,65,-20.21,57.76,81.0,11.41
Ribeira Grande,40,PT,1602836121,82,38.52,-28.7,66.2,11.41
Severo-Kuril'sk,55,RU,1602836122,68,50.68,156.12,41.14,23.33
Celestún,0,MX,1602836122,83,20.87,-90.4,76.23,7.83
Laguna,1,US,1602836122,52,38.42,-121.42,66.0,6.15
Guerrero Negro,21,MX,1602836122,70,27.98,-114.06,73.6,10.54
Okhotsk,33,RU,1602836122,85,59.38,143.3,27.66,6.89
Cidreira,90,BR,1602836122,81,-30.18,-50.21,64.81,13.18
Mayo,75,US,1602836123,93,38.89,-76.51,66.0,5.82
Kamyshlov,47,RU,1602835874,64,56.84,62.71,57.72,18.75
Touros,40,BR,1602836123,94,-5.2,-35.46,71.6,4.7
Ahipara,6,NZ,1602836123,81,-35.17,173.17,51.8,4.99
Hirara,40,JP,1602835863,65,24.8,125.28,82.4,11.41
Iroquois Falls,75,CA,1602836124,100,48.77,-80.68,28.4,4.43
Harper,75,LR,1602836124,87,4.38,-7.72,78.66,8.08
Malanje,83,AO,1602836124,72,-9.54,16.34,75.88,3.78
Arua,20,UG,1602836124,66,3.02,30.91,77.88,4.23
Salalah,20,OM,1602836039,58,17.02,54.09,86.0,6.93
Fukuechō,75,JP,1602835837,77,32.69,128.84,66.2,10.29
Tungor,83,RU,1602836125,84,53.38,142.96,32.05,12.12
Jiuquan,0,CN,1602836095,29,39.74,98.52,57.16,5.59
Illela,1,NG,1602836125,40,13.73,5.3,89.47,6.53
Pauini,95,BR,1602836125,83,-7.71,-66.98,71.51,1.23
Sambava,0,MG,1602836102,54,-14.27,50.17,80.49,12.44
Provideniya,100,RU,1602836082,95,64.38,-173.3,38.93,15.84
Kaitangata,100,NZ,1602836126,82,-46.28,169.85,46.99,3.0
Japura,100,ID,1602836126,45,-0.32,102.35,94.23,1.81
Khovd,100,MN,1602836091,36,48.01,91.64,48.27,3.06
Dauriya,100,RU,1602836126,56,49.93,116.87,44.08,11.63
Shenkursk,99,RU,1602836081,85,62.11,42.9,35.85,8.28
Līsakovsk,100,KZ,1602836127,28,52.54,62.49,65.07,19.75
Grindavik,90,IS,1602836127,81,63.84,-22.43,46.4,2.24
Cayenne,0,GF,1602836127,100,4.93,-52.33,71.6,8.55
San Mateo del Mar,94,MX,1602836127,77,16.2,-95.0,80.98,20.85
Tiksi,65,RU,1602836128,97,71.69,128.87,20.21,1.99
Tessalit,0,ML,1602836128,11,20.2,1.01,91.67,7.29
Ballina,14,AU,1602836128,64,-28.87,153.57,77.0,13.87
San Miguel de Tucumán,75,AR,1602836093,55,-26.82,-65.22,66.2,5.82
Erzin,42,TR,1602836128,75,36.96,36.2,78.01,3.76
Bandarbeyla,0,SO,1602836129,46,9.49,50.81,89.51,11.99
Agüimes,75,ES,1602836129,78,27.91,-15.45,71.6,6.93
Umm Hājar,84,TD,1602836129,30,13.3,19.7,90.66,4.74
Shenzhen,40,CN,1602835904,46,22.55,114.07,90.0,15.66
Phulbāni,13,IN,1602835991,84,20.47,84.23,81.88,7.45
Sangar,100,RU,1602836129,92,63.92,127.47,20.39,14.97
Maniitsoq,100,GL,1602836130,92,65.42,-52.9,37.83,15.95
Danville,90,US,1602836130,93,36.59,-79.39,66.2,3.36
Angoche,88,MZ,1602835857,67,-16.23,39.91,79.99,9.57
Qaanaaq,0,GL,1602836130,81,77.48,-69.36,23.47,6.62
Adré,0,TD,1602836130,17,13.47,22.2,88.02,14.18
Jutaí,86,BR,1602836131,95,-5.18,-68.9,70.57,1.74
Peterhead,90,GB,1602836131,93,57.51,-1.8,46.4,9.17
Kruisfontein,1,ZA,1602836131,59,-34.0,24.73,73.99,7.0
Tiznit Province,0,MA,1602836131,73,29.58,-9.5,58.33,4.03
Moose Factory,75,CA,1602836131,92,51.26,-80.61,30.2,12.75
Esperance,40,AU,1602836132,67,-33.87,121.9,60.8,14.99
Sitka,40,US,1602836132,81,57.05,-135.33,42.8,5.59
Victor Harbor,65,AU,1602836132,84,-35.57,138.62,60.01,7.49
Prince Rupert,90,CA,1602836132,100,54.32,-130.32,50.0,12.75
Chapada dos Guimarães,20,BR,1602836132,78,-15.46,-55.75,77.0,4.7
Waipawa,0,NZ,1602836133,57,-41.41,175.52,51.8,17.22
Qasigiannguit,100,GL,1602836133,80,68.82,-51.19,35.6,3.36
Ures,65,MX,1602836133,40,29.43,-110.4,79.0,5.99
Lamar,90,US,1602836133,47,33.67,-95.58,57.99,8.05
Anchorage,1,US,1602836133,85,61.22,-149.9,35.6,6.35
Malko Tarnovo,0,BG,1602836134,77,41.98,27.53,68.0,6.93
Kumul,0,CN,1602836095,24,42.8,93.45,62.37,7.72
Juneau,20,US,1602836134,93,58.3,-134.42,43.0,3.91
Borås,20,SE,1602836134,93,57.72,12.94,44.01,10.29
Kinango,40,KE,1602836134,58,-4.14,39.32,86.0,11.41
Nabire,100,ID,1602836135,83,-3.37,135.4
8,79.68,1.92
Bukachacha,100,RU,1602836135,91,52.98,116.92,33.96,7.56
San Quintín,0,MX,1602836135,57,30.48,-115.95,70.36,4.92
Barrow,90,US,1602836135,73,71.29,-156.79,19.4,21.92
Torbay,90,CA,1602836135,100,47.67,-52.73,55.0,2.24
Campbell River,90,CA,1602836135,87,50.02,-125.24,51.8,17.22
Muscat,0,OM,1602835996,38,23.61,58.59,87.8,10.29
Fonte Boa,95,BR,1602836136,96,-2.5,-66.27,73.13,1.88
Tasiilaq,98,GL,1602836136,93,65.61,-37.64,39.2,2.57
Ancud,9,CL,1602836136,87,-41.87,-73.82,44.01,4.7
Kavieng,83,PG,1602836137,73,-2.57,150.8,82.8,11.7
Emmett,1,US,1602836137,80,43.87,-116.5,42.01,3.91
Upernavik,98,GL,1602836137,86,72.79,-56.15,31.98,4.76
Nakhon Sawan,75,TH,1602836137,81,15.7,100.08,80.01,6.64
Castro,100,BR,1602836137,92,-24.79,-50.01,53.53,8.68
Uglich,100,RU,1602836137,74,57.53,38.33,41.27,5.64
Magadan,18,RU,1602836018,90,59.57,150.8,31.62,5.03
Thompson,90,CA,1602836138,92,55.74,-97.86,24.8,12.75
Dudinka,40,RU,1602836138,92,69.41,86.18,21.2,11.18
Paamiut,100,GL,1602836138,74,61.99,-49.67,41.76,24.43
Safaga,0,EG,1602836138,58,26.73,33.94,82.4,13.87
Poum,100,NC,1602836139,80,-20.23,164.02,73.78,11.21
Sittwe,3,MM,1602836139,72,20.15,92.9,87.08,11.21
Pevek,100,RU,1602836139,87,69.7,170.31,37.51,15.23
Bela,0,IN,1602836139,42,25.93,81.98,94.8,5.1
Kichera,89,RU,1602836139,82,55.94,110.1,35.28,9.22
Cañita,20,PA,1602836140,94,9.21,-78.88,75.2,0.56
Los Llanos de Aridane,75,ES,1602836140,69,28.66,-17.92,73.4,3.36
Kahului,1,US,1602836140,65,20.89,-156.47,78.8,4.7
Huilong,100,CN,1602836140,83,31.81,121.66,63.0,1.01
Sault Ste. Marie,40,CA,1602836140,86,46.52,-84.33,35.6,5.82
Iquique,50,CL,1602836141,82,-20.22,-70.14,59.0,10.29
Chokwé,0,MZ,1602836141,34,-24.53,32.98,88.95,4.25
Trat,90,TH,1602836141,74,12.5,102.5,84.2,3.36
‘Ewa Beach,1,US,1602836141,83,21.32,-158.01,78.8,2.01
Quaraí,3,BR,1602836141,94,-30.39,-56.45,56.05,13.27
Alaşehir,0,TR,1602836142,36,38.35,28.52,73.83,2.48
Santa Maria,5,BR,1602836142,90,-29.68,-53.81,58.05,9.48
Sechura,100,PE,1602836142,83,-5.56,-80.82,63.81,9.15
Nantucket,1,US,1602836142,85,41.28,-70.1,61.0,14.99
Linares,0,CL,1602836142,89,-35.85,-71.6,53.87,0.38
Qeshm,0,IR,1602836143,5,26.96,56.27,95.0,9.17
Jos,98,NG,1602836143,60,9.92,8.9,76.21,0.89
Kungurtug,100,RU,1602836143,61,50.6,97.52,42.8,9.46
Meulaboh,99,ID,1602836144,63,4.14,96.13,85.98,6.13
Flinders,98,AU,1602836144,72,-34.58,150.86,63.0,1.99
Shingū,75,JP,1602835927,60,33.73,135.98,69.8,2.24
Wanning,100,CN,1602836144,88,18.8,110.4,78.93,22.5
Jiaocheng,98,CN,1602836145,58,24.68,116.14,81.63,5.88
Marks,100,RU,1602836145,62,51.71,46.75,59.0,1.99
Jacmel,4,HT,1602836145,88,18.23,-72.53,78.8,3.36
Bulgan,100,MN,1602836091,56,48.81,103.53,44.44,8.52
Varhaug,0,NO,1602836146,100,58.61,5.65,42.01,2.24
Linhares,79,BR,1602836146,76,-19.39,-40.07,71.17,5.19
Barcelos,9,PT,1602836146,62,41.54,-8.62,54.0,5.82
Besançon,63,FR,1602836146,100,47.25,6.02,48.99,4.99
Rawson,34,AR,1602836146,46,-43.3,-65.1,67.62,18.59
Aklavik,90,CA,1602836147,85,68.22,-135.01,17.6,8.05
Chumikan,100,RU,1602836147,69,54.72,135.31,38.71,24.54
Kommunisticheskiy,100,RU,1602836147,78,61.68,64.48,44.47,10.89
Isangel,99,VU,1602836147,85,-19.55,169.27,71.78,19.24
Okha,77,RU,1602836147,80,53.57,142.95,33.84,16.46
San Felipe,0,VE,1602836147,91,10.34,-68.74,70.83,2.66
Broome,90,US,1602836148,93,42.25,-75.83,52.0,6.93
Keti Bandar,99,PK,1602836148,14,24.14,67.45,99.27,15.17
Hambantota,40,LK,1602836148,56,6.12,81.12,93.2,19.46
Olinda,40,BR,1602836148,74,-8.01,-34.86,78.8,6.93
Anadyr,40,RU,1602836148,81,64.75,177.48,42.8,17.9
Hunchun,100,CN,1602836149,76,42.87,130.36,48.36,6.11
Lavrentiya,100,RU,1602836149,93,65.58,-171.0,38.55,26.64
Ust-Tsilma,100,RU,1602836149,91,65.44,52.15,31.98,3.51
Bowen,0,AU,1602836149,57,-20.02,148.23,75.2,18.34
Bulungu,99,CD,1602836149,74,-4.55,18.6,80.89,3.33
Juegang,100,CN,1602836150,75,32.32,121.19,60.46,5.39
Westport,75,US,1602836150,88,41.14,-73.36,66.2,13.87
Brandon,1,US,1602835928,94,27.94,-82.29,75.99,4.14
Hasaki,75,JP,1602836030,82,35.73,140.83,62.01,12.75
Hobyo,10,SO,1602836151,67,5.35,48.53,84.45,17.9
Iraquara,45,BR,1602836151,82,-12.25,-41.62,62.6,2.51
Ternate,100,ID,1602835955,72,0.8,127.4,83.3,4.85
Tototlán,95,MX,1602836151,100,20.55,-102.8,64.0,4.07
Airai,96,TL,1602836151,60,-8.93,125.41,72.55,2.44
Bonavista,0,CA,1602836104,83,48.65,-53.11,50.47,3.49
Seymchan,100,RU,1602836152,96,62.88,152.43,28.47,2.75
Aden,0,YE,1602836152,56,12.78,45.04,87.12,8.43
Palencia,0,ES,1602836152,83,42.42,-4.5,44.01,1.99
Coyhaique,88,CL,1602836152,81,-45.58,-72.07,46.4,4.7
Mocuba,100,MZ,1602836152,57,-16.84,36.99,78.04,4.94
Agadez,0,NE,1602836093,12,19.75,10.25,89.69,4.85
Poronaysk,0,RU,1602836085,71,49.22,143.12,38.37,11.54
Parnarama,56,BR,1602836153,85,-5.68,-43.09,74.43,3.85
Mount Gambier,90,AU,1602836153,67,-37.83,140.77,60.8,11.41
Verāval,100,IN,1602836090,59,20.9,70.37,91.29,14.18
Lagoa,39,PT,1602836153,87,39.05,-27.98,67.14,16.71
Port-Cartier,90,CA,1602836154,87,50.03,-66.87,46.4,11.41
Puro,100,PH,1602836154,74,12.48,123.38,83.43,2.33
Fairbanks,75,US,1602836154,85,64.84,-147.72,12.99,1.79
Peniche,0,PT,1602836155,99,39.36,-9.38,55.99,1.01
Mwense,0,ZM,1602836155,35,-10.38,28.7,84.67,7.9
Sisimiut,100,GL,1602836155,73,66.94,-53.67,39.47,11.54
Aykhal,0,RU,1602836155,67,66.0,111.5,17.6,8.95
Moranbah,0,AU,1602836156,33,-22.0,148.05,76.98,18.72
San Andrés,40,CO,1602836156,78,12.58,-81.7,82.4,8.05
Willowmore,2,ZA,1602836156,44,-33.29,23.49,65.43,12.59
Gillette,75,US,1602836156,95,44.29,-105.5,32.0,11.41
Guapó,40,BR,1602836156,61,-16.83,-49.53,77.0,9.17
Adolfo López Mateos,68,MX,1602836157,44,28.47,-107.3,51.64,5.21
Savonlinna,90,FI,1602836157,78,61.87,28.88,37.4,10.29
Kula,0,TR,1602836157,43,38.55,28.65,67.86,2.62
Lüderitz,0,NA,1602836157,42,-26.65,15.16,71.91,4.47
Posse,15,BR,1602836158,33,-14.09,-46.37,72.93,3.15
Louis Trichardt,0,ZA,1602836158,24,-23.04,29.9,88.68,3.87
Mossamedes,40,AO,1602836158,78,-15.2,12.15,71.6,9.17
Saldanha,30,ZA,1602836102,52,-33.01,17.94,73.4,5.82
Zambezi,0,ZM,1602836158,33,-13.54,23.1,86.11,9.15
Syracuse,0,IT,1602836159,63,37.09,15.28,66.99,9.17
Shimanovsk,11,RU,1602836159,72,52.0,127.7,37.99,8.46
Yantal',71,RU,1602836159,90,56.85,105.25,29.12,11.41
George,20,ZA,1602836159,72,-33.96,22.46,66.2,11.41
Ishigaki,20,JP,1602835917,69,24.34,124.16,82.4,12.75
Souillac,40,MU,1602836159,65,-20.52,57.52,80.6,11.41
Gouré,66,NE,1602836160,48,13.98,10.27,89.01,3.0
Stornoway,90,GB,1602836160,81,58.21,-6.39,48.0,4.7
Businga,100,CD,1602836160,70,3.33,20.88,81.63,3.04
Praia da Vitória,75,PT,1602836160,93,38.73,-27.07,66.99,11.41
Kroya,76,ID,1602836160,77,-7.63,109.25,80.92,10.6
Woodward,90,US,1602836161,65,36.43,-99.39,44.6,3.0
Kiryat Gat,0,IL,1602836161,61,31.61,34.76,79.0,6.89
Kallithea,40,GR,1602836161,73,37.95,23.7,77.0,5.82
Vila Franca do Campo,40,PT,1602836161,82,37.72,-25.43,64.4,4.7
Tanout,0,NE,1602836161,15,14.97,8.89,91.29,8.01
Labuhan,53,ID,1602836162,62,-6.88,112.21,86.79,9.89
Yuzhne,75,UA,1602836162,73,46.62,31.1,71.6,15.66
Hulan Ergi,0,CN,1602836070,50,47.2,123.63,47.37,8.52
São Filipe,1,CV,1602836163,81,14.9,-24.5,80.38,6.73
Cabo San Lucas,6,MX,1602836163,84,22.89,-109.91,79.0,1.99
Balaipungut,20,ID,1602836163,46,1.05,101.28,93.2,3.24
Oriximiná,2,BR,1602836163,70,-1.77,-55.87,76.37,3.56
Mezen',97,RU,1602836163,77,65.85,44.24,37.69,7.11
Abu Samrah,0,SY,1602836163,43,35.3,37.18,76.66,4.7
Auki,3,SB,1602836114,82,-8.77,160.7,79.83,2.62
Madang,100,PG,1602836164,85,-5.22,145.8,79.63,7.4
Saskylakh,83,RU,1602836164,96,71.92,114.08,13.3,6.51
Tautira,75,PF,1602836164,78,-17.73,-149.15,75.2,10.29
Bathsheba,40,BB,1602836165,78,13.22,-59.52,82.4,14.99
Kalmunai,75,LK,1602836165,45,7.42,81.82,92.07,3.87
La Ronge,90,CA,1602836165,58,55.1,-105.28,24.8,12.75
Tsuruoka,75,JP,1602836102,55,38.72,139.82,60.8,3.36
Bambous Virieux,40,MU,1602836166,65,-20.34,57.76,81.0,11.41
Los Pozos,4,VE,1602836166,87,8.45,-62.73,75.61,5.23
Washington,100,US,1602836166,69,47.5,-120.5,46.99,1.99
Mataram,40,ID,1602836166,58,-8.58,116.12,87.8,12.75
Amga,98,RU,1602836167,95,60.9,131.96,21.34,3.91
Porto-Vecchio,75,FR,1602836167,67,41.59,9.28,62.6,11.41
Cabrobó,0,BR,1602836167,93,-8.51,-39.31,66.56,9.08
Srandakan,36,ID,1602836167,71,-7.94,110.25,82.06,11.45
Chiredzi,0,ZW,1602836167,32,-21.05,31.67,87.57,2.66
Padang,100,ID,1602835940,63,-0.95,100.35,84.99,5.28
Merauke,100,ID,1602836168,63,-8.47,140.33,83.16,23.38
Fort Nelson,75,CA,1602836108,92,58.81,-122.7,17.6,3.36
Luorong,39,CN,1602836168,72,24.41,109.61,71.56,17.34
Necochea,0,AR,1602836168,96,-38.55,-58.74,55.0,8.99
Innisfail,5,AU,1602836169,77,-17.53,146.03,73.13,6.89
Klyuchevskiy,100,RU,1602836169,91,53.53,119.45,33.37,10.56
Merrill,90,US,1602836169,93,45.18,-89.68,35.6,3.36
Atambua,68,ID,1602836154,58,-9.11,124.89,83.03,2.71
Tilichiki,100,RU,1602836169,90,60.47,166.1,32.74,14.05
Griffith,1,US,1602836170,50,41.53,-87.42,35.01,3.36
Río Gallegos,87,AR,1602836170,49,-51.62,-69.22,46.4,9.17
Port Lincoln,80,AU,1602836170,81,-34.73,135.87,58.01,14.9
Houma,1,US,1602836170,100,29.6,-90.72,69.01,3.36
Constantine,40,DZ,1602836083,76,36.37,6.61,48.2,2.24
La Asuncion,7,VE,1602836171,81,11.03,-63.86,80.47,13.44
Manaure,0,CO,1602836171,79,11.78,-72.44,81.36,11.65
Flin Flon,100,CA,1602836171,88,54.77,-101.86,23.2,14.0
Mandiana,51,GN,1602836171,80,10.63,-8.68,76.12,1.77
Nacala,75,MZ,1602836171,52,-14.54,40.67,87.8,13.87
Katsuura,99,JP,1602836172,54,35.13,140.3,62.01,1.99
Ostrovnoy,100,RU,1602836172,93,68.05,39.51,34.63,12.01
Cururupu,8,BR,1602836172,86,-1.83,-44.87,77.0,4.61
Tezu,0,IN,1602836173,41,27.92,96.17,91.49,2.35
Vila Velha,19,BR,1602836173,83,-20.33,-40.29,73.4,9.17
Half Moon Bay,1,US,1602836168,36,37.46,-122.43,73.4,3.36
Karratha,0,AU,1602836173,25,-20.74,116.85,89.55,23.71
Dwārka,1,IN,1602836173,46,22.24,68.97,93.92,18.14
Ciudad Real,0,ES,1602836173,64,39.0,-4.0,48.0,1.01
Comodoro Rivadavia,100,AR,1602836114,41,-45.87,-67.5,60.8,8.05
Ponta do Sol,40,PT,1602836174,72,32.67,-17.1,68.0,5.82
Guaporé,4,BR,1602836174,100,-28.85,-51.89,55.0,1.99
Kovdor,99,RU,1602836174,93,67.57,30.48,32.23,12.97
Macusani,59,PE,1602836175,95,-14.08,-70.43,31.8,2.53
Sakakah,0,SA,1602836175,21,29.97,40.21,80.6,3.36
Daru,100,PG,1602836175,77,-9.08,143.21,78.13,12.03
Nyagan,100,RU,1602836175,77,62.14,65.39,44.11,10.96
Pocatello,1,US,1602836175,41,42.87,-112.45,42.8,11.41
Havre-St-Pierre,40,CA,1602836176,93,50.23,-63.6,41.0,10.29
Saint-Augustin,55,CA,1602836176,93,51.23,-58.65,44.47,8.34
Nampula,75,MZ,1602836177,57,-15.12,39.27,78.8,9.17
Coromandel,100,BR,1602836177,87,-18.47,-47.2,67.28,3.83
Aswān,0,EG,1602836177,16,24.09,32.91,96.01,11.01
Rabo de Peixe,40,PT,1602836177,82,37.8,-25.58,64.4,4.7
Maragogi,40,BR,1602836177,82,-9.01,-35.22,72.36,2.51
Riyadh,0,SA,1602836102,26,24.69,46.72,82.4,2.24
Caravelas,91,BR,1602836178,90,-17.71,-39.25,73.45,1.66
Umluj,0,SA,1602836178,23,25.02,37.27,97.07,9.46
Markala,97,ML,1602836178,55,13.7,-6.07,82.96,6.93
Ambon City,93,ID,1602835905,12,-3.7,128.18,82.99,10.83
Chapais,90,CA,1602836107,93,49.78,-74.85,39.2,10.29
Mbandaka,15,CD,1602836179,64,0.05,18.26,82.33,2.73
Itarema,57,BR,1602836179,81,-2.92,-39.92,78.78,14.18
Richards Bay,80,ZA,1602836179,65,-28.78,32.04,74.48,18.19
Borovskoy,78,KZ,1602836179,30,53.8,64.15,63.14,21.7
Palembang,40,ID,1602835880,44,-2.92,104.75,93.2,5.82
Lagos,40,NG,1602835927,94,6.58,3.75,77.0,4.7
Banjar,20,ID,1602836180,58,-8.19,114.97,86.0,11.41
Codrington,100,AU,1602836181,94,-38.27,141.97,54.64,8.32
Entre Rios,25,BR,1602836181,98,-11.94,-38.08,66.02,2.44
Kloulklubed,75,PW,1602836182,79,7.04,134.26,84.2,6.93
Saquena,87,PE,1602836182,96,-4.67,-73.52,71.49,0.74
Xining,12,CN,1602836182,42,36.62,101.77,50.68,4.03
Eyl,0,SO,1602836183,48,7.98,49.82,90.12,12.82
Galle,39,LK,1602836183,74,6.04,80.22,83.86,16.33
Xiantao,99,CN,1602836183,85,30.38,113.4,60.94,6.11
Kisangani,86,CD,1602836184,77,0.52,25.2,79.34,4.03
Andra,100,RU,1602836184,83,62.51,65.89,42.24,9.75
Cocobeach,75,GA,1602836184,83,1.0,9.58,78.8,9.17
Bushehr,0,IR,1602836185,33,28.97,50.84,89.6,6.93
Hay River,75,CA,1602836108,68,60.82,-115.8,24.8,17.22
Belmonte,40,BR,1602836185,94,-15.86,-38.88,71.6,4.7
Alta Floresta,48,BR,1602836185,61,-9.88,-56.09,75.24,2.04
Thinadhoo,100,MV,1602836102,76,0.53,72.93,83.53,20.62
Calabozo,2,VE,1602836186,95,8.92,-67.43,72.19,3.0
Athabasca,100,CA,1602836186,91,54.72,-113.29,26.78,4.18
Hinche,2,HT,1602836186,88,19.15,-72.02,78.8,3.36
Moses Lake,75,US,1602836187,57,47.13,-119.28,50.0,3.36
Beyneu,4,KZ,1602836187,23,45.32,55.2,71.19,12.19
Kumbo,100,CM,1602836187,73,6.2,10.67,66.58,4.61
Inverell,49,AU,1602836187,53,-29.78,151.12,67.12,3.85
Great Yarmouth,100,GB,1602836187,71,52.61,1.73,54.0,4.0
Campo Maior,0,BR,1602836187,92,-4.83,-42.17,70.92,3.96
Wenling,97,CN,1602836188,77,28.37,121.36,73.0,13.11
Nhulunbuy,75,AU,1602836115,65,-12.23,136.77,82.4,12.75
San Rafael,0,AR,1602836188,50,-34.62,-68.33,64.04,9.42
Mānsa,84,IN,1602836113,10,29.98,75.38,95.22,5.06
Zhigalovo,3,RU,1602836084,84,54.81,105.16,33.51,11.74
Mayumba,93,GA,1602836189,76,-3.43,10.66,77.34,5.1
Cabedelo,40,BR,1602836189,94,-6.98,-34.83,71.6,3.36
Chulym,85,RU,1602836189,70,55.1,80.96,44.64,7.92
Novyy Svit,39,UA,1602836189,43,47.81,38.02,69.58,8.28
Nyurba,100,RU,1602836190,90,63.28,118.33,27.81,13.47
Sarab,0,IR,1602836190,30,38.61,44.99,70.0,2.82
Guánica,3,PR,1602836190,93,17.97,-66.91,78.01,6.38
Cortes,0,ES,1602836190,66,41.94,-1.44,51.8,17.22
Margate,100,GB,1602836191,78,51.38,1.39,52.0,10.87
Esim,90,GH,1602836191,84,4.87,-2.24,78.82,8.61
Pemangkat,100,ID,1602836116,72,1.17,108.97,84.04,14.16
Sioux Lookout,75,CA,1602836191,86,50.1,-91.92,28.4,3.36
Örnsköldsvik,6,SE,1602836191,100,63.29,18.72,35.6,3.36
Pangnirtung,94,CA,1602836191,78,66.15,-65.71,36.82,7.2
Drovyanaya,40,RU,1602836192,48,51.58,113.03,44.6,17.9
Saint George,1,US,1602836192,15,37.1,-113.58,64.4,5.59
Abadan,0,TM,1602836192,14,38.05,58.21,75.2,4.7
Pamplona,40,ES,1602836192,76,42.82,-1.64,50.0,3.36
Atar,0,MR,1602836192,22,20.52,-13.05,85.23,9.48
Bangui,20,CF,1602836193,78,4.36,18.55,78.8,4.7
Ulaanbaatar,75,MN,1602836022,23,47.91,106.88,48.2,13.42
Wuda,0,CN,1602836193,29,39.5,106.71,55.51,6.51
Luganville,26,VU,1602836193,81,-15.53,167.17,78.28,3.65
Malibu,1,US,1602836194,63,34.01,-118.81,72.0,6.93
Port Hedland,0,AU,1602836194,25,-20.32,118.57,96.8,20.8
Winnemucca,1,US,1602836195,24,40.97,-117.74,42.8,5.82
Port Augusta,90,AU,1602836195,82,-32.5,137.77,66.2,8.05
Kropotkin,0,RU,1602836196,43,45.44,40.58,74.34,4.14
La Rioja,75,ES,1602836196,87,42.25,-2.5,46.99,6.93
Hofn,20,IS,1602836197,62,64.25,-15.21,32.0,4.7
Tazovsky,100,RU,1602836197,97,67.47,78.7,31.17,9.62
Kiruna,88,SE,1602836198,86,67.86,20.23,33.8,4.25
Wangqing,19,CN,1602835919,57,43.32,129.76,47.57,6.11
Manchester,100,GB,1602836172,93,53.48,-2.24,46.99,6.93
Neyshabur,0,IR,1602836001,25,36.21,58.8,62.2,3.22
Calvinia,0,ZA,1602836199,21,-31.47,19.78,80.6,11.41
Iralaya,95,HN,1602836199,83,15.0,-83.23,80.35,7.76
Kananga,94,CD,1602836199,71,-5.9,22.42,81.23,3.38
Port Hope,72,US,1602836199,60,43.94,-82.71,42.8,14.99
Kyra,90,RU,1602836199,59,49.58,111.98,44.11,9.51
Buraidah,0,SA,1602836200,23,26.33,43.98,84.2,2.24
Manakara,60,MG,1602836200,70,-22.13,48.02,78.22,5.21
Constitución,0,CL,1602836113,87,-35.33,-72.42,54.59,2.21
Manokwari,100,ID,1602835961,77,-0.87,134.08,82.47,1.77
Marsala,20,IT,1602836201,82,37.8,12.44,70.0,4.7
Boussé,0,BF,1602836201,88,12.66,-1.89,78.8,8.05
Narsaq,100,GL,1602836201,30,60.92,-46.05,53.6,20.8
Ribeira Brava,40,PT,1602836201,72,32.65,-17.07,68.0,5.82
Laas,75,IT,1602836194,61,46.62,10.7,48.0,6.93
Bella Vista,1,US,1602836201,52,36.43,-94.23,42.8,3.36
South Kazakhstan Region,0,KZ,1602836202,19,43.0,68.0,74.97,21.21
Deming,1,US,1602836202,33,32.27,-107.76,57.2,8.05
Cockburn Town,13,TC,1602836202,80,21.46,-71.14,83.17,16.37
Rey Bouba,27,CM,1602836202,68,8.67,14.18,83.05,3.74
Kavaratti,40,IN,1602836202,74,10.57,72.64,86.0,13.87
Poya,100,NC,1602836202,85,-21.35,165.15,70.39,4.63
Dingle,100,PH,1602836203,81,11.0,122.67,83.12,4.94
Havøysund,75,NO,1602836069,86,71.0,24.66,37.4,20.8
Bilma,0,NE,1602836099,13,18.69,12.92,92.79,4.94
Meadow Lake,0,US,1602836128,30,34.8,-106.54,57.2,7.25
Sukumo,92,JP,1602836203,79,32.93,132.73,66.94,1.36
Butzbach,100,DE,1602836203,87,50.43,8.67,48.99,8.57
Camacha,20,PT,1602836204,77,33.08,-16.33,64.4,6.93
Potosí,100,BO,1602836204,87,-19.58,-65.75,39.94,5.57
Bafra,0,TR,1602836204,68,41.57,35.91,69.8,5.82
Tiarei,75,PF,1602836204,78,-17.53,-149.33,75.2,10.29
Sistranda,40,NO,1602836204,93,63.73,8.83,46.4,12.75
Roseburg,1,US,1602836205,87,43.22,-123.34,48.2,0.67
Namtsy,75,RU,1602836081,79,62.72,129.67,24.8,8.95
Bosaso,0,SO,1602836205,79,11.28,49.18,86.0,7.76
Mogwase,0,ZA,1602836205,30,-25.18,27.27,81.34,4.41
De Aar,0,ZA,1602836102,22,-30.65,24.01,75.2,11.41
Yangi Marg`ilon,0,UZ,1602836205,37,40.43,71.72,68.0,4.7
Badiraguato,7,MX,1602836206,89,25.37,-107.52,78.01,4.99
Slave Lake,75,CA,1602836206,64,55.28,-114.77,33.8,8.05
Baisha,100,CN,1602836206,88,26.52,110.93,57.27,5.03
Luena,37,AO,1602836206,78,-11.78,19.92,71.6,5.82
Turukhansk,99,RU,1602836206,96,65.82,87.98,30.06,12.95
Warangal,74,IN,1602835998,66,18.0,79.58,86.04,4.92
Creel,1,MX,1602836207,44,27.75,-107.63,52.27,4.5
Tabira,42,BR,1602836207,92,-7.59,-37.54,63.41,7.52
São João da Barra,60,BR,1602836207,88,-21.64,-41.05,70.3,8.77
Pochutla,45,MX,1602836207,85,15.74,-96.47,75.99,3.91
Kuytun,0,RU,1602836208,74,54.34,101.5,36.55,10.94
Pecica,40,RO,1602836208,100,46.17,21.07,57.2,6.93
Puno,100,PE,1602836208,69,-15.83,-70.03,43.72,5.64
Parakou,24,BJ,1602836209,87,9.34,2.63,76.37,4.03
Bodden Town,12,KY,1602836209,85,19.28,-81.25,82.99,5.01
Khorixas,91,NA,1602836210,22,-20.37,14.97,93.09,13.04
Dingzhou,0,CN,1602835936,15,38.51,115.0,71.6,6.71
Mendi,100,PG,1602836210,100,-6.18,143.65,56.44,0.22
Ignatovka,39,RU,1602836210,41,53.95,47.65,60.35,16.13
Mbaïki,100,CF,1602836210,67,3.87,17.99,81.21,2.66
Denizli Province,0,TR,1602836211,58,37.84,29.07,57.2,1.12
Solution_Weather_Vacation/Cloudiness_vs_Latitude.png
Solution_Weather_Vacation/emp_vs_Latitude.png
Solution_Weather_Vacation/Heatmap.PNG
Solution_Weather_Vacation/Latitude_vs_Humidity.png
Solution_Weather_Vacation/Northern Hemisphere - Cloudiness (%) vs. Latitude Linear Regression.png
Solution_Weather_Vacation/Northern Hemisphere - Humidity (%) vs. Latitude Linear Regression.png
Solution_Weather_Vacation/Northern Hemisphere - Wind Speed vs. Latitude Linear Regression.png
Solution_Weather_Vacation/Northern Hemisphere-TemperaturevsLatitude.png
Solution_Weather_Vacation/Southern Hemisphere - Cloudiness (%) vs. Latitude Linear Regression.png
Solution_Weather_Vacation/Southern Hemisphere - Humidity (%) vs. Latitude Linear Regression.png
Solution_Weather_Vacation/Southern Hemisphere - Max Temp vs. Latitude Linear Regression.png
Solution_Weather_Vacation/Southern Hemisphere - Wind Speed vs. Latitude Linear Regression.png
Solution_Weather_Vacation/VacationPy_Part2.ipynb
{
"cells": [
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [],
"source": [
"#Importing the required libraries\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"import numpy as np\n",
"import requests\n",
"import gmaps\n",
"import os\n",
"import json\n",
"import time"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [],
"source": [
"# Importing API key\n",
"from api_keys import g_key\n",
"gmaps.configure(api_key=g_key)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Use jupyter-gmaps and the Google Places API for this part of the assignment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Storing the Part I(WeatherPy_Part1) results into DataFrame \n",
"# Loading the csv exported in Part I(WeatherPy_Part1) to a DataFrame"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
CityCloudinessCountryDateHumidityLatLngMax TempWind Speed
0Vaini90TO160283608388-21.20-175.2075.208.05
1Ust-Maya0RU16028360849060.42134.5319.063.33
2Jamestown90US160283608410042.10-79.2446.005.82
3Skibbereen75IE16028360858751.55-9.2744.606.93
4Ushuaia90AR160283608586-54.80-68.3039.2013.87
\n",
"
"
],
"text/plain": [
" City Cloudiness Country Date Humidity Lat Lng \\\n",
"0 Vaini 90 TO 1602836083 88 -21.20 -175.20 \n",
"1 Ust-Maya 0 RU 1602836084 90 60.42 134.53 \n",
"2 Jamestown 90 US 1602836084 100 42.10 -79.24 \n",
"3 Skibbereen 75 IE 1602836085 87 51.55 -9.27 \n",
"4 Ushuaia 90 AR 1602836085 86 -54.80 -68.30 \n",
"\n",
" Max Temp Wind Speed \n",
"0 75.20 8.05 \n",
"1 19.06 3.33 \n",
"2 46.00 5.82 \n",
"3 44.60 6.93 \n",
"4 39.20 13.87 "
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# read the cities.csv to create dataframe, previous cells are not needed to be executed as long as cities.csv was created\n",
"cities = pd.read_csv(\"cities.csv\", encoding=\"utf-8\")\n",
"cities.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Humidity Heatmap"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Configure gmaps.\n",
"\n",
"Use the Lat and Lng as locations and Humidity as the weight.\n",
"\n",
"Add Heatmap layer to map."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [],
"source": [
"humidity = cities[\"Humidity\"].astype(float)\n",
"maxhumidity = humidity.max()\n",
"locations = cities[[\"Lat\", \"Lng\"]]"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b26974d7f8964e5a9b0ceecb37c61bef",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Figure(layout=FigureLayout(height='420px'))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig = gmaps.figure()\n",
"heat_layer = gmaps.heatmap_layer(locations, weights=humidity,dissipating=False, max_intensity=maxhumidity,point_radius=3)\n",
"fig.add_layer(heat_layer)\n",
"fig"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"# Configuring gmaps.\n"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [],
"source": [
"#Configuring gmaps\n",
"gmaps.configure(api_key=g_key)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Using the Latitude and Longitude as locations and Humidity as the weight."
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [],
"source": [
"#Storing latitude and longitude in locations\n",
"locations = weather_data[[\"Lat\", \"Lng\"]]"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [],
"source": [
"#Storing Humidity in humidity\n",
"humidity = weather_data[\"Humidity\"]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Humidity Heatmap"
]
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {},
"outputs": [],
"source": [
"#Plotting Heatmap\n",
"fig = gmaps.figure(center=(46.0, -5.0), zoom_level=2)\n",
"max_intensity = np.max(humidity)"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [],
"source": [
"#Creating heat layer\n",
"heat_layer = gmaps.heatmap_layer(locations, weights = humidity, dissipating=False, max_intensity=100, point_radius=3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Adding Heatmap layer to map."
]
},
{
"cell_type": "code",
"execution_count": 59,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "765d00ae972f408fb74733ebb04412f4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Figure(layout=FigureLayout(height='420px'))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#Adding layer\n",
"fig.add_layer(heat_layer)\n",
"#Displaying figure\n",
"fig"
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"100"
]
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"max_intensity"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Narrow down the DataFrame to find your ideal weather condition. For example:\n",
"\n",
"A max temperature lower than 80 degrees but higher than 70.\n",
"\n",
"Wind speed less than 10 mph.\n",
"\n",
"Zero cloudiness.\n",
"\n",
"Drop any rows that don’t contain all three conditions. You want to be sure the weather is ideal."
]
},
{
"cell_type": "code",
"execution_count": 61,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
CityCloudinessCountryDateHumidityLatLngMax TempWind Speed
61Kruisfontein0ZA160274745142-34.0024.7379.003.00
99Nuevitas0CU16027474659421.55-77.2673.404.70
105Sakakah0SA16027474681929.9740.2178.805.82
118East London0ZA160274747347-33.0227.9175.203.36
120Gold Coast0AU160274747353-28.00153.4373.408.05
158Bagotville0AU160274748868-28.98153.4273.409.17
181Manbij0SY16027474964736.5337.9577.006.98
258Durban0ZA160274741160-29.8631.0373.409.17
285Soavinandriana0MG160274753535-19.1746.7378.288.28
352Eskil0TR16027475624138.4033.4170.432.68
374Ginir0ET1602747570547.1340.7071.736.42
470Diré0ML16027476058412.28-10.9775.331.54
477Calamar0CO16027476089110.25-74.9174.502.75
490Nurota0UZ16027476132140.5665.6971.609.17
534São João de Pirabas0BR160274762980-0.77-47.1877.978.79
535Poputnaya0RU16027476294244.5141.4474.127.05
566Byron Bay0AU160274764068-28.65153.6273.409.17
568De Aar0ZA160274764114-30.6524.0177.001.12
\n",
"
"
],
"text/plain": [
" City Cloudiness Country Date Humidity Lat \\\n",
"61 Kruisfontein 0 ZA 1602747451 42 -34.00 \n",
"99 Nuevitas 0 CU 1602747465 94 21.55 \n",
"105 Sakakah 0 SA 1602747468 19 29.97 \n",
"118 East London 0 ZA 1602747473 47 -33.02 \n",
"120 Gold Coast 0 AU 1602747473 53 -28.00 \n",
"158 Bagotville 0 AU 1602747488 68 -28.98 \n",
"181 Manbij 0 SY 1602747496 47 36.53 \n",
"258 Durban 0 ZA 1602747411 60 -29.86 \n",
"285 Soavinandriana 0 MG 1602747535 35 -19.17 \n",
"352 Eskil 0 TR 1602747562 41 38.40 \n",
"374 Ginir 0 ET 1602747570 54 7.13 \n",
"470 Diré 0 ML 1602747605 84 12.28 \n",
"477 Calamar 0 CO 1602747608 91 10.25 \n",
"490 Nurota 0 UZ 1602747613 21 40.56 \n",
"534 São João de Pirabas 0 BR 1602747629 80 -0.77 \n",
"535 Poputnaya 0 RU 1602747629 42 44.51 \n",
"566 Byron Bay 0 AU 1602747640 68 -28.65 \n",
"568 De Aar 0 ZA 1602747641 14 -30.65 \n",
"\n",
" Lng Max Temp Wind Speed \n",
"61 24.73 79.00 3.00 \n",
"99 -77.26 73.40 4.70 \n",
"105 40.21 78.80 5.82 \n",
"118 27.91 75.20 3.36 \n",
"120 153.43 73.40 8.05 \n",
"158 153.42 73.40 9.17 \n",
"181 37.95 77.00 6.98 \n",
"258 31.03 73.40 9.17 \n",
"285 46.73 78.28 8.28 \n",
"352 33.41 70.43 2.68 \n",
"374 40.70 71.73 6.42 \n",
"470 -10.97 75.33 1.54 \n",
"477 -74.91 74.50 2.75 \n",
"490 65.69 71.60 9.17 \n",
"534 -47.18 77.97 8.79 \n",
"535 41.44 74.12 7.05 \n",
"566 153.62 73.40 9.17 \n",
"568 24.01 77.00 1.12 "
]
},
"execution_count": 61,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Narrowing down the cities with wind speed less than 10 mph, cloudiness equals to 0 and max temp between 70 and 80\n",
"narrowed_city_df = weather_data.loc[(weather_data[\"Wind Speed\"] <= 10) & (weather_data[\"Cloudiness\"] == 0) & \\\n",
" (weather_data[\"Max Temp\"] >= 70) & (weather_data[\"Max Temp\"] <= 80)].dropna()\n",
"\n",
"narrowed_city_df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Hotel Map\n",
"\n",
"Store into variable named hotel_df.\n",
"\n",
"Add a \"Hotel Name\" column to the DataFrame.\n",
"\n",
"Set parameters to search for hotels with 5000 meters.\n",
"\n",
"Hit the Google Places API for each city's coordinates.\n",
"\n",
"Store the first Hotel result into the DataFrame.\n",
"\n",
"Plot markers on top of the heatmap."
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
CityCountryLatLngHotel Name
61KruisfonteinZA-34.0024.73
99NuevitasCU21.55-77.26
105SakakahSA29.9740.21
118East LondonZA-33.0227.91
120Gold CoastAU-28.00153.43
158BagotvilleAU-28.98153.42
181ManbijSY36.5337.95
258DurbanZA-29.8631.03
285SoavinandrianaMG-19.1746.73
352EskilTR38.4033.41
374GinirET7.1340.70
470DiréML12.28-10.97
477CalamarCO10.25-74.91
490NurotaUZ40.5665.69
534São João de PirabasBR-0.77-47.18
535PoputnayaRU44.5141.44
566Byron BayAU-28.65153.62
568De AarZA-30.6524.01
\n",
"
"
],
"text/plain": [
" City Country Lat Lng Hotel Name\n",
"61 Kruisfontein ZA -34.00 24.73 \n",
"99 Nuevitas CU 21.55 -77.26 \n",
"105 Sakakah SA 29.97 40.21 \n",
"118 East London ZA -33.02 27.91 \n",
"120 Gold Coast AU -28.00 153.43 \n",
"158 Bagotville AU -28.98 153.42 \n",
"181 Manbij SY 36.53 37.95 \n",
"258 Durban ZA -29.86 31.03 \n",
"285 Soavinandriana MG -19.17 46.73 \n",
"352 Eskil TR 38.40 33.41 \n",
"374 Ginir ET 7.13 40.70 \n",
"470 Diré ML 12.28 -10.97 \n",
"477 Calamar CO 10.25 -74.91 \n",
"490 Nurota UZ 40.56 65.69 \n",
"534 São João de Pirabas BR -0.77 -47.18 \n",
"535 Poputnaya RU 44.51 41.44 \n",
"566 Byron Bay AU -28.65 153.62 \n",
"568 De Aar ZA -30.65 24.01 "
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Creating a hotel dataframe - hotel_df\n",
"hotel_df = narrowed_city_df.loc[:,[\"City\",\"Country\", \"Lat\", \"Lng\"]]\n",
"# Adding a \"Hotel Name\" column to the DataFrame.\n",
"hotel_df[\"Hotel Name\"] = \"\"\n",
"\n",
"# Displaying the result\n",
"hotel_df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Using Google Places API to find the first hotel for each city located within 5000 meters of your coordinates."
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {},
"outputs": [],
"source": [
"base_url = \"https://maps.googleapis.com/maps/api/place/nearbysearch/json\"\n",
"\n",
"params = {\"type\" : \"hotel\",\n",
" \"keyword\" : \"hotel\",\n",
" \"radius\" : 5000,\n",
" \"key\" : g_key}"
]
},
{
"cell_type": "code",
"execution_count": 64,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Retrieving Results for Index 61: Kruisfontein.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 99: Nuevitas.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 105: Sakakah.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 118: East London.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 120: Gold Coast.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 158: Bagotville.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 181: Manbij.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 258: Durban.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 285: Soavinandriana.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 352: Eskil.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 374: Ginir.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 470: Diré.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 477: Calamar.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 490: Nurota.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 534: São João de Pirabas.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 535: Poputnaya.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 566: Byron Bay.\n",
"Missing field/result... skipping.\n",
"------------\n",
"Retrieving Results for Index 568: De Aar.\n",
"Missing field/result... skipping.\n",
"------------\n",
"-------End of Search-------\n"
]
}
],
"source": [
"for index, row in hotel_df.iterrows():\n",
" # get city name, lat, lnt from df\n",
" lat = row[\"Lat\"]\n",
" lng = row[\"Lng\"]\n",
" city_name = row[\"City\"]\n",
" \n",
" # add keyword to params dict\n",
" params[\"location\"] = f\"{lat},{lng}\"\n",
"\n",
" # assemble url and make API request\n",
" print(f\"Retrieving Results for Index {index}: {city_name}.\")\n",
" response = requests.get(base_url, params=params).json()\n",
" \n",
" # extract results\n",
" results = response['results']\n",
" \n",
" # save the hotel name to dataframe\n",
" try:\n",
" print(f\"Closest hotel in {city_name} is {results[0]['name']}.\")\n",
" hotel_df.loc[index, \"Hotel Name\"] = results[0]['name']\n",
"\n",
" # if there is no hotel available, show missing field\n",
" except (KeyError, IndexError):\n",
" print(\"Missing field/result... skipping.\")\n",
" \n",
" print(\"------------\")\n",
" \n",
" # Wait 1 sec to make another api request to avoid SSL Error\n",
" time.sleep(1)\n",
"\n",
"# Print end of search once searching is completed\n",
"print(\"-------End of Search-------\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Plot the hotels on top of the humidity heatmap with each pin containing the Hotel Name, City, and Country."
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
CityCountryLatLngHotel Name
61KruisfonteinZA-34.0024.73
99NuevitasCU21.55-77.26
105SakakahSA29.9740.21
118East LondonZA-33.0227.91
120Gold CoastAU-28.00153.43
158BagotvilleAU-28.98153.42
181ManbijSY36.5337.95
258DurbanZA-29.8631.03
285SoavinandrianaMG-19.1746.73
352EskilTR38.4033.41
374GinirET7.1340.70
470DiréML12.28-10.97
477CalamarCO10.25-74.91
490NurotaUZ40.5665.69
534São João de PirabasBR-0.77-47.18
535PoputnayaRU44.5141.44
566Byron BayAU-28.65153.62
568De AarZA-30.6524.01
\n",
"
"
],
"text/plain": [
" City Country Lat Lng Hotel Name\n",
"61 Kruisfontein ZA -34.00 24.73 \n",
"99 Nuevitas CU 21.55 -77.26 \n",
"105 Sakakah SA 29.97 40.21 \n",
"118 East London ZA -33.02 27.91 \n",
"120 Gold Coast AU -28.00 153.43 \n",
"158 Bagotville AU -28.98 153.42 \n",
"181 Manbij SY 36.53 37.95 \n",
"258 Durban ZA -29.86 31.03 \n",
"285 Soavinandriana MG -19.17 46.73 \n",
"352 Eskil TR 38.40 33.41 \n",
"374 Ginir ET 7.13 40.70 \n",
"470 Diré ML 12.28 -10.97 \n",
"477 Calamar CO 10.25 -74.91 \n",
"490 Nurota UZ 40.56 65.69 \n",
"534 São João de Pirabas BR -0.77 -47.18 \n",
"535 Poputnaya RU 44.51 41.44 \n",
"566 Byron Bay AU -28.65 153.62 \n",
"568 De Aar ZA -30.65 24.01 "
]
},
"execution_count": 65,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Displaying the hotel dataframe\n",
"hotel_df"
]
},
{
"cell_type": "code",
"execution_count": 66,
"metadata": {},
"outputs": [],
"source": [
"# Using the template to add the hotel marks to the heatmap\n",
"info_box_template = \"\"\"\n",
"
\n",
"
Name
{Hotel Name}
\n",
"
City
{City}
\n",
"
Country
{Country}
\n",
"
\n",
"\"\"\"\n",
"# Store the DataFrame Row\n",
"# NOTE: be sure to update with your DataFrame name\n",
"#hotel_info = [info_box_template.format(**row) for index, row in narrowed_city_df.iterrows()]\n",
"hotel_info = [info_box_template.format(**row) for index, row in hotel_df.iterrows()]\n",
"locations = hotel_df[[\"Lat\", \"Lng\"]]"
]
},
{
"cell_type": "code",
"execution_count": 67,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "765d00ae972f408fb74733ebb04412f4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Figure(layout=FigureLayout(height='420px'))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Add marker layer and info box content ontop of heat map\n",
"markers = gmaps.marker_layer(locations, info_box_content = hotel_info)\n",
"\n",
"# Add the layer to the map\n",
"fig.add_layer(markers)\n",
"\n",
"# Display Map\n",
"fig"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Solution_Weather_Vacation/WeatherPy_Part1.ipynb
{
"cells": [
{
"cell_type": "code",
"execution_count": 67,
"metadata": {},
"outputs": [],
"source": [
"#Importing the required libraries\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"import numpy as np\n",
"import requests\n",
"import time\n",
"import json\n",
"import scipy.stats as st\n",
"from scipy.stats import linregress"
]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {},
"outputs": [],
"source": [
"#Importing the API key\n",
"from api_keys import weather_api_key"
]
},
{
"cell_type": "code",
"execution_count": 69,
"metadata": {},
"outputs": [],
"source": [
"#Incorporating citipy to determine city based on latitude and longitude\n",
"from citipy import citipy"
]
},
{
"cell_type": "code",
"execution_count": 70,
"metadata": {},
"outputs": [],
"source": [
"#Output File (CSV format)\n",
"output_data_file = \"cities.csv\""
]
},
{
"cell_type": "code",
"execution_count": 71,
"metadata": {},
"outputs": [],
"source": [
"#Range of latitudes and longitudes\n",
"lat_range = (-90, 90)\n",
"lng_range = (-180, 180)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Generating the list of cities"
]
},
{
"cell_type": "code",
"execution_count": 72,
"metadata": {},
"outputs": [],
"source": [
"#List for holding lat_lngs and cities\n",
"lat_lngs = []\n",
"cities = []"
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {},
"outputs": [],
"source": [
"#Creating a set of random latitudes and longitudes combinations\n",
"lats = np.random.uniform(low=-90.000, high=90.000, size=1500)\n",
"lngs = np.random.uniform(low=-180.000, high=180.000, size=1500)\n",
"lat_lngs = zip(lats, lngs)"
]
},
{
"cell_type": "code",
"execution_count": 74,
"metadata": {},
"outputs": [],
"source": [
"#Identifying nearest city for each latitude and longitude combination\n",
"for lat_lng in lat_lngs:\n",
" city = citipy.nearest_city(lat_lng[0], lat_lng[1]).city_name\n",
" \n",
" # If the city is unique, then add it to a our cities list\n",
" if city not in cities:\n",
" cities.append(city)\n"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"620"
]
},
"execution_count": 75,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Printing the city count to confirm sufficient count\n",
"len(cities)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 76,
"metadata": {},
"outputs": [],
"source": [
"city_name_list = []\n",
"cloudiness_list = []\n",
"country_list = []\n",
"date_list = []\n",
"humidity_list = []\n",
"lat_list = []\n",
"lng_list = []\n",
"max_temp_list = []\n",
"wind_speed_list = []\n",
"index_counter = 0\n",
"set_counter = 1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Performing API Calls"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Performing a weather check on each city using a series of successive API calls.\n",
"\n",
"Including a print log of each city as it'sbeing processed (with the city number and city name"
]
},
{
"cell_type": "code",
"execution_count": 77,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Beginning Data Retrieval \n",
"-----------------------------\n",
"Processing Record 1 of Set 1 : vaini\n",
"Processing Record 2 of Set 1 : ust-maya\n",
"Processing Record 3 of Set 1 : jamestown\n",
"Processing Record 4 of Set 1 : skibbereen\n",
"Processing Record 5 of Set 1 : ushuaia\n",
"Processing Record 6 of Set 1 : bengkulu\n",
"Processing Record 7 of Set 1 : port alfred\n",
"City not found. Skipping...\n",
"Processing Record 8 of Set 1 : atuona\n",
"City not found. Skipping...\n",
"City not found. Skipping...\n",
"Processing Record 9 of Set 1 : chokurdakh\n",
"Processing Record 10 of Set 1 : new richmond\n",
"Processing Record 11 of Set 1 : bandundu\n",
"Processing Record 12 of Set 1 : kuito\n",
"Processing Record 13 of Set 1 : fortuna\n",
"Processing Record 14 of Set 1 : chuy\n",
"City not found. Skipping...\n",
"Processing Record 15 of Set 1 : wenceslau braz\n",
"Processing Record 16 of Set 1 : samarai\n",
"Processing Record 17 of Set 1 : mercedes\n",
"Processing Record 18 of Set 1 : kapaa\n",
"City not found. Skipping...\n",
"Processing Record 19 of Set 1 : mokhsogollokh\n",
"Processing Record 20 of Set 1 : homer\n",
"Processing Record 21 of Set 1 : faya\n",
"Processing Record 22 of Set 1 : busselton\n",
"Processing Record 23 of Set 1 : berdigestyakh\n",
"Processing Record 24 of Set 1 : mount darwin\n",
"Processing Record 25 of Set 1 : shimoda\n",
"Processing Record 26 of Set 1 : dunedin\n",
"Processing Record 27 of Set 1 : launceston\n",
"City not found. Skipping...\n",
"Processing Record 28 of Set 1 : do gonbadan\n",
"Processing Record 29 of Set 1 : new norfolk\n",
"Processing Record 30 of Set 1 : hermanus\n",
"Processing Record 31 of Set 1 : san patricio\n",
"Processing Record 32 of Set 1 : avera\n",
"Processing Record 33 of Set 1 : samarkand\n",
"Processing Record 34 of Set 1 : tura\n",
"Processing Record 35 of Set 1 : porto velho\n",
"Processing Record 36 of Set 1 : albany\n",
"Processing Record 37 of Set 1 : grenville\n",
"Processing Record 38 of Set 1 : rikitea\n",
"Processing Record 39 of Set 1 : teya\n",
"Processing Record 40 of Set 1 : hobart\n",
"Processing Record 41 of Set 1 : mataura\n",
"Processing Record 42 of Set 1 : lorengau\n",
"Processing Record 43 of Set 1 : lovozero\n",
"Processing Record 44 of Set 1 : georgetown\n",
"Processing Record 45 of Set 1 : yellowknife\n",
"Processing Record 46 of Set 1 : nome\n",
"Processing Record 47 of Set 1 : longyearbyen\n",
"Processing Record 48 of Set 1 : husavik\n",
"Processing Record 49 of Set 1 : te anau\n",
"Processing Record 50 of Set 1 : sumbe\n",
"Processing Record 0 of Set 2 : mankono\n",
"Processing Record 1 of Set 2 : tuktoyaktuk\n",
"Processing Record 2 of Set 2 : nanortalik\n",
"Processing Record 3 of Set 2 : ajdabiya\n",
"City not found. Skipping...\n",
"City not found. Skipping...\n",
"City not found. Skipping...\n",
"Processing Record 4 of Set 2 : sorokino\n",
"Processing Record 5 of Set 2 : fez\n",
"Processing Record 6 of Set 2 : lumberton\n",
"Processing Record 7 of Set 2 : victoria\n",
"Processing Record 8 of Set 2 : punta arenas\n",
"Processing Record 9 of Set 2 : qaqortoq\n",
"Processing Record 10 of Set 2 : sosva\n",
"Processing Record 11 of Set 2 : belaya gora\n",
"Processing Record 12 of Set 2 : avarua\n",
"Processing Record 13 of Set 2 : filadelfia\n",
"Processing Record 14 of Set 2 : bedele\n",
"Processing Record 15 of Set 2 : mar del plata\n",
"Processing Record 16 of Set 2 : arraial do cabo\n",
"Processing Record 17 of Set 2 : puerto ayora\n",
"Processing Record 18 of Set 2 : geraldton\n",
"Processing Record 19 of Set 2 : huaidian\n",
"Processing Record 20 of Set 2 : kentau\n",
"Processing Record 21 of Set 2 : naryan-mar\n",
"Processing Record 22 of Set 2 : makakilo city\n",
"Processing Record 23 of Set 2 : klaksvik\n",
"Processing Record 24 of Set 2 : oleksandrivka\n",
"Processing Record 25 of Set 2 : seoul\n",
"Processing Record 26 of Set 2 : bay roberts\n",
"Processing Record 27 of Set 2 : broken hill\n",
"Processing Record 28 of Set 2 : dubbo\n",
"Processing Record 29 of Set 2 : hilo\n",
"Processing Record 30 of Set 2 : diofior\n",
"Processing Record 31 of Set 2 : puerto escondido\n",
"Processing Record 32 of Set 2 : imbituba\n",
"Processing Record 33 of Set 2 : belogorsk\n",
"Processing Record 34 of Set 2 : ilulissat\n",
"Processing Record 35 of Set 2 : grande prairie\n",
"Processing Record 36 of Set 2 : abaete\n",
"Processing Record 37 of Set 2 : clyde river\n",
"Processing Record 38 of Set 2 : cherskiy\n",
"City not found. Skipping...\n",
"Processing Record 39 of Set 2 : killybegs\n",
"Processing Record 40 of Set 2 : goderich\n",
"Processing Record 41 of Set 2 : mariestad\n",
"Processing Record 42 of Set 2 : bilibino\n",
"Processing Record 43 of Set 2 : tynda\n",
"Processing Record 44 of Set 2 : pandamatenga\n",
"Processing Record 45 of Set 2 : bethel\n",
"Processing Record 46 of Set 2 : bluff\n",
"Processing Record 47 of Set 2 : deputatskiy\n",
"Processing Record 48 of Set 2 : birao\n",
"City not found. Skipping...\n",
"Processing Record 49 of Set 2 : bredasdorp\n",
"Processing Record 50 of Set 2 : carauari\n",
"Processing Record 0 of Set 3 : taoudenni\n",
"Processing Record 1 of Set 3 : butaritari\n",
"City not found. Skipping...\n",
"Processing Record 2 of Set 3 : khatanga\n",
"City not found. Skipping...\n",
"Processing Record 3 of Set 3 : talnakh\n",
"Processing Record 4 of Set 3 : carnarvon\n",
"Processing Record 5 of Set 3 : saint-philippe\n",
"Processing Record 6 of Set 3 : lingao\n",
"Processing Record 7 of Set 3 : lebu\n",
"Processing Record 8 of Set 3 : kempsey\n",
"Processing Record 9 of Set 3 : portland\n",
"Processing Record 10 of Set 3 : cape town\n",
"Processing Record 11 of Set 3 : sao miguel do araguaia\n",
"Processing Record 12 of Set 3 : champerico\n",
"Processing Record 13 of Set 3 : mandalgovi\n",
"Processing Record 14 of Set 3 : kieta\n",
"Processing Record 15 of Set 3 : lompoc\n",
"City not found. Skipping...\n",
"Processing Record 16 of Set 3 : chervona sloboda\n",
"Processing Record 17 of Set 3 : yulara\n",
"Processing Record 18 of Set 3 : saint anthony\n",
"Processing Record 19 of Set 3 : bac lieu\n",
"Processing Record 20 of Set 3 : rocha\n",
"Processing Record 21 of Set 3 : nikolskoye\n",
"Processing Record 22 of Set 3 : camabatela\n",
"Processing Record 23 of Set 3 : makurdi\n",
"Processing Record 24 of Set 3 : faanui\n",
"Processing Record 25 of Set 3 : hamilton\n",
"Processing Record 26 of Set 3 : hithadhoo\n",
"Processing Record 27 of Set 3 : tuatapere\n",
"Processing Record 28 of Set 3 : pisco\n",
"City not found. Skipping...\n",
"Processing Record 29 of Set 3 : vanimo\n",
"Processing Record 30 of Set 3 : beringovskiy\n",
"City not found. Skipping...\n",
"City not found. Skipping...\n",
"Processing Record 31 of Set 3 : east london\n",
"Processing Record 32 of Set 3 : alice springs\n",
"Processing Record 33 of Set 3 : kodiak\n",
"City not found. Skipping...\n",
"Processing Record 34 of Set 3 : troitsko-pechorsk\n",
"Processing Record 35 of Set 3 : birjand\n",
"City not found. Skipping...\n",
"Processing Record 36 of Set 3 : hoquiam\n",
"Processing Record 37 of Set 3 : zwedru\n",
"Processing Record 38 of Set 3 : sain alto\n",
"Processing Record 39 of Set 3 : taltal\n",
"Processing Record 40 of Set 3 : mackay\n",
"Processing Record 41 of Set 3 : acapulco\n",
"Processing Record 42 of Set 3 : coquimbo\n",
"Processing Record 43 of Set 3 : pingliang\n",
"Processing Record 44 of Set 3 : port blair\n",
"Processing Record 45 of Set 3 : acarau\n",
"Processing Record 46 of Set 3 : taksimo\n",
"Processing Record 47 of Set 3 : fare\n",
"Processing Record 48 of Set 3 : batman\n",
"Processing Record 49 of Set 3 : vostok\n",
"Processing Record 50 of Set 3 : port elizabeth\n",
"City not found. Skipping...\n",
"Processing Record 0 of Set 4 : iqaluit\n",
"Processing Record 1 of Set 4 : hualmay\n",
"Processing Record 2 of Set 4 : dikson\n",
"Processing Record 3 of Set 4 : mahebourg\n",
"Processing Record 4 of Set 4 : lufilufi\n",
"Processing Record 5 of Set 4 : leningradskiy\n",
"City not found. Skipping...\n",
"Processing Record 6 of Set 4 : quatre cocos\n",
"Processing Record 7 of Set 4 : ribeira grande\n",
"Processing Record 8 of Set 4 : severo-kurilsk\n",
"Processing Record 9 of Set 4 : celestun\n",
"Processing Record 10 of Set 4 : laguna\n",
"Processing Record 11 of Set 4 : guerrero negro\n",
"Processing Record 12 of Set 4 : okhotsk\n",
"Processing Record 13 of Set 4 : cidreira\n",
"Processing Record 14 of Set 4 : mayo\n",
"City not found. Skipping...\n",
"Processing Record 15 of Set 4 : kamyshlov\n",
"Processing Record 16 of Set 4 : touros\n",
"Processing Record 17 of Set 4 : ahipara\n",
"Processing Record 18 of Set 4 : hirara\n",
"Processing Record 19 of Set 4 : iroquois falls\n",
"Processing Record 20 of Set 4 : harper\n",
"Processing Record 21 of Set 4 : malanje\n",
"Processing Record 22 of Set 4 : arua\n",
"Processing Record 23 of Set 4 : salalah\n",
"Processing Record 24 of Set 4 : fukue\n",
"Processing Record 25 of Set 4 : tungor\n",
"Processing Record 26 of Set 4 : jiuquan\n",
"Processing Record 27 of Set 4 : illela\n",
"Processing Record 28 of Set 4 : pauini\n",
"Processing Record 29 of Set 4 : sambava\n",
"Processing Record 30 of Set 4 : provideniya\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Processing Record 31 of Set 4 : kaitangata\n",
"Processing Record 32 of Set 4 : japura\n",
"Processing Record 33 of Set 4 : hovd\n",
"Processing Record 34 of Set 4 : dauriya\n",
"Processing Record 35 of Set 4 : shenkursk\n",
"Processing Record 36 of Set 4 : lisakovsk\n",
"Processing Record 37 of Set 4 : grindavik\n",
"Processing Record 38 of Set 4 : cayenne\n",
"Processing Record 39 of Set 4 : san mateo del mar\n",
"Processing Record 40 of Set 4 : tiksi\n",
"Processing Record 41 of Set 4 : tessalit\n",
"Processing Record 42 of Set 4 : ballina\n",
"Processing Record 43 of Set 4 : tucuman\n",
"Processing Record 44 of Set 4 : erzin\n",
"Processing Record 45 of Set 4 : bandarbeyla\n",
"Processing Record 46 of Set 4 : aguimes\n",
"Processing Record 47 of Set 4 : oum hadjer\n",
"Processing Record 48 of Set 4 : shenzhen\n",
"Processing Record 49 of Set 4 : phulabani\n",
"Processing Record 50 of Set 4 : sangar\n",
"Processing Record 0 of Set 5 : maniitsoq\n",
"Processing Record 1 of Set 5 : danville\n",
"Processing Record 2 of Set 5 : angoche\n",
"Processing Record 3 of Set 5 : qaanaaq\n",
"Processing Record 4 of Set 5 : adre\n",
"Processing Record 5 of Set 5 : jutai\n",
"Processing Record 6 of Set 5 : peterhead\n",
"City not found. Skipping...\n",
"Processing Record 7 of Set 5 : kruisfontein\n",
"Processing Record 8 of Set 5 : tiznit\n",
"Processing Record 9 of Set 5 : moose factory\n",
"Processing Record 10 of Set 5 : esperance\n",
"Processing Record 11 of Set 5 : sitka\n",
"Processing Record 12 of Set 5 : victor harbor\n",
"Processing Record 13 of Set 5 : prince rupert\n",
"Processing Record 14 of Set 5 : chapada dos guimaraes\n",
"Processing Record 15 of Set 5 : waipawa\n",
"Processing Record 16 of Set 5 : qasigiannguit\n",
"Processing Record 17 of Set 5 : ures\n",
"Processing Record 18 of Set 5 : lamar\n",
"Processing Record 19 of Set 5 : anchorage\n",
"City not found. Skipping...\n",
"Processing Record 20 of Set 5 : malko tarnovo\n",
"Processing Record 21 of Set 5 : hami\n",
"Processing Record 22 of Set 5 : juneau\n",
"Processing Record 23 of Set 5 : boras\n",
"Processing Record 24 of Set 5 : kinango\n",
"Processing Record 25 of Set 5 : nabire\n",
"Processing Record 26 of Set 5 : bukachacha\n",
"Processing Record 27 of Set 5 : san quintin\n",
"Processing Record 28 of Set 5 : barrow\n",
"Processing Record 29 of Set 5 : torbay\n",
"Processing Record 30 of Set 5 : campbell river\n",
"Processing Record 31 of Set 5 : muscat\n",
"Processing Record 32 of Set 5 : fonte boa\n",
"Processing Record 33 of Set 5 : tasiilaq\n",
"Processing Record 34 of Set 5 : ancud\n",
"Processing Record 35 of Set 5 : kavieng\n",
"Processing Record 36 of Set 5 : emmett\n",
"Processing Record 37 of Set 5 : upernavik\n",
"Processing Record 38 of Set 5 : nakhon sawan\n",
"Processing Record 39 of Set 5 : castro\n",
"Processing Record 40 of Set 5 : uglich\n",
"Processing Record 41 of Set 5 : magadan\n",
"City not found. Skipping...\n",
"Processing Record 42 of Set 5 : thompson\n",
"Processing Record 43 of Set 5 : dudinka\n",
"Processing Record 44 of Set 5 : paamiut\n",
"Processing Record 45 of Set 5 : safaga\n",
"Processing Record 46 of Set 5 : poum\n",
"Processing Record 47 of Set 5 : akyab\n",
"Processing Record 48 of Set 5 : pevek\n",
"Processing Record 49 of Set 5 : bela\n",
"Processing Record 50 of Set 5 : kichera\n",
"Processing Record 0 of Set 6 : canita\n",
"City not found. Skipping...\n",
"Processing Record 1 of Set 6 : los llanos de aridane\n",
"Processing Record 2 of Set 6 : kahului\n",
"Processing Record 3 of Set 6 : huilong\n",
"Processing Record 4 of Set 6 : sault sainte marie\n",
"Processing Record 5 of Set 6 : iquique\n",
"Processing Record 6 of Set 6 : chokwe\n",
"Processing Record 7 of Set 6 : trat\n",
"Processing Record 8 of Set 6 : ewa beach\n",
"Processing Record 9 of Set 6 : quarai\n",
"Processing Record 10 of Set 6 : alasehir\n",
"Processing Record 11 of Set 6 : santa maria\n",
"Processing Record 12 of Set 6 : sechura\n",
"Processing Record 13 of Set 6 : nantucket\n",
"Processing Record 14 of Set 6 : linares\n",
"Processing Record 15 of Set 6 : qeshm\n",
"Processing Record 16 of Set 6 : jos\n",
"Processing Record 17 of Set 6 : kungurtug\n",
"Processing Record 18 of Set 6 : meulaboh\n",
"Processing Record 19 of Set 6 : flinders\n",
"Processing Record 20 of Set 6 : shingu\n",
"Processing Record 21 of Set 6 : wanning\n",
"City not found. Skipping...\n",
"City not found. Skipping...\n",
"Processing Record 22 of Set 6 : jiaocheng\n",
"Processing Record 23 of Set 6 : marks\n",
"Processing Record 24 of Set 6 : jacmel\n",
"Processing Record 25 of Set 6 : bulgan\n",
"Processing Record 26 of Set 6 : varhaug\n",
"Processing Record 27 of Set 6 : linhares\n",
"Processing Record 28 of Set 6 : barcelos\n",
"Processing Record 29 of Set 6 : besancon\n",
"Processing Record 30 of Set 6 : rawson\n",
"Processing Record 31 of Set 6 : aklavik\n",
"Processing Record 32 of Set 6 : chumikan\n",
"Processing Record 33 of Set 6 : kommunisticheskiy\n",
"Processing Record 34 of Set 6 : isangel\n",
"Processing Record 35 of Set 6 : okha\n",
"Processing Record 36 of Set 6 : san felipe\n",
"Processing Record 37 of Set 6 : broome\n",
"Processing Record 38 of Set 6 : keti bandar\n",
"Processing Record 39 of Set 6 : hambantota\n",
"Processing Record 40 of Set 6 : olinda\n",
"Processing Record 41 of Set 6 : anadyr\n",
"Processing Record 42 of Set 6 : hunchun\n",
"Processing Record 43 of Set 6 : lavrentiya\n",
"Processing Record 44 of Set 6 : ust-tsilma\n",
"Processing Record 45 of Set 6 : bowen\n",
"Processing Record 46 of Set 6 : bulungu\n",
"Processing Record 47 of Set 6 : juegang\n",
"Processing Record 48 of Set 6 : westport\n",
"City not found. Skipping...\n",
"Processing Record 49 of Set 6 : brandon\n",
"Processing Record 50 of Set 6 : hasaki\n",
"Processing Record 0 of Set 7 : hobyo\n",
"Processing Record 1 of Set 7 : iraquara\n",
"Processing Record 2 of Set 7 : ternate\n",
"Processing Record 3 of Set 7 : tototlan\n",
"Processing Record 4 of Set 7 : airai\n",
"Processing Record 5 of Set 7 : bonavista\n",
"Processing Record 6 of Set 7 : seymchan\n",
"Processing Record 7 of Set 7 : aden\n",
"Processing Record 8 of Set 7 : palencia\n",
"Processing Record 9 of Set 7 : coihaique\n",
"Processing Record 10 of Set 7 : mocuba\n",
"Processing Record 11 of Set 7 : agadez\n",
"Processing Record 12 of Set 7 : poronaysk\n",
"Processing Record 13 of Set 7 : parnarama\n",
"Processing Record 14 of Set 7 : mount gambier\n",
"Processing Record 15 of Set 7 : veraval\n",
"Processing Record 16 of Set 7 : lagoa\n",
"Processing Record 17 of Set 7 : port-cartier\n",
"Processing Record 18 of Set 7 : puro\n",
"Processing Record 19 of Set 7 : fairbanks\n",
"City not found. Skipping...\n",
"Processing Record 20 of Set 7 : peniche\n",
"Processing Record 21 of Set 7 : mwense\n",
"Processing Record 22 of Set 7 : sisimiut\n",
"Processing Record 23 of Set 7 : aykhal\n",
"Processing Record 24 of Set 7 : moranbah\n",
"Processing Record 25 of Set 7 : san andres\n",
"City not found. Skipping...\n",
"Processing Record 26 of Set 7 : willowmore\n",
"Processing Record 27 of Set 7 : gillette\n",
"Processing Record 28 of Set 7 : guapo\n",
"Processing Record 29 of Set 7 : adolfo lopez mateos\n",
"Processing Record 30 of Set 7 : savonlinna\n",
"Processing Record 31 of Set 7 : kula\n",
"City not found. Skipping...\n",
"Processing Record 32 of Set 7 : luderitz\n",
"City not found. Skipping...\n",
"Processing Record 33 of Set 7 : posse\n",
"Processing Record 34 of Set 7 : louis trichardt\n",
"Processing Record 35 of Set 7 : namibe\n",
"Processing Record 36 of Set 7 : saldanha\n",
"Processing Record 37 of Set 7 : zambezi\n",
"Processing Record 38 of Set 7 : syracuse\n",
"Processing Record 39 of Set 7 : shimanovsk\n",
"Processing Record 40 of Set 7 : yantal\n",
"Processing Record 41 of Set 7 : george\n",
"Processing Record 42 of Set 7 : ishigaki\n",
"Processing Record 43 of Set 7 : souillac\n",
"Processing Record 44 of Set 7 : goure\n",
"Processing Record 45 of Set 7 : stornoway\n",
"Processing Record 46 of Set 7 : businga\n",
"Processing Record 47 of Set 7 : praia da vitoria\n",
"Processing Record 48 of Set 7 : kroya\n",
"Processing Record 49 of Set 7 : woodward\n",
"Processing Record 50 of Set 7 : gat\n",
"Processing Record 0 of Set 8 : kallithea\n",
"Processing Record 1 of Set 8 : vila franca do campo\n",
"Processing Record 2 of Set 8 : tanout\n",
"Processing Record 3 of Set 8 : labuhan\n",
"Processing Record 4 of Set 8 : yuzhne\n",
"City not found. Skipping...\n",
"City not found. Skipping...\n",
"Processing Record 5 of Set 8 : hulan ergi\n",
"Processing Record 6 of Set 8 : sao filipe\n",
"Processing Record 7 of Set 8 : cabo san lucas\n",
"Processing Record 8 of Set 8 : balaipungut\n",
"Processing Record 9 of Set 8 : oriximina\n",
"Processing Record 10 of Set 8 : mezen\n",
"Processing Record 11 of Set 8 : abu samrah\n",
"City not found. Skipping...\n",
"Processing Record 12 of Set 8 : auki\n",
"Processing Record 13 of Set 8 : madang\n",
"Processing Record 14 of Set 8 : saskylakh\n",
"Processing Record 15 of Set 8 : tautira\n",
"Processing Record 16 of Set 8 : bathsheba\n",
"Processing Record 17 of Set 8 : kalmunai\n",
"Processing Record 18 of Set 8 : la ronge\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"City not found. Skipping...\n",
"Processing Record 19 of Set 8 : tsuruoka\n",
"Processing Record 20 of Set 8 : bambous virieux\n",
"Processing Record 21 of Set 8 : los pozos\n",
"Processing Record 22 of Set 8 : washington\n",
"Processing Record 23 of Set 8 : mataram\n",
"Processing Record 24 of Set 8 : amga\n",
"Processing Record 25 of Set 8 : porto-vecchio\n",
"Processing Record 26 of Set 8 : cabrobo\n",
"Processing Record 27 of Set 8 : srandakan\n",
"Processing Record 28 of Set 8 : chiredzi\n",
"Processing Record 29 of Set 8 : padang\n",
"Processing Record 30 of Set 8 : merauke\n",
"Processing Record 31 of Set 8 : fort nelson\n",
"City not found. Skipping...\n",
"Processing Record 32 of Set 8 : luorong\n",
"Processing Record 33 of Set 8 : necochea\n",
"Processing Record 34 of Set 8 : innisfail\n",
"Processing Record 35 of Set 8 : klyuchevskiy\n",
"Processing Record 36 of Set 8 : merrill\n",
"Processing Record 37 of Set 8 : atambua\n",
"Processing Record 38 of Set 8 : tilichiki\n",
"Processing Record 39 of Set 8 : griffith\n",
"Processing Record 40 of Set 8 : rio gallegos\n",
"Processing Record 41 of Set 8 : port lincoln\n",
"Processing Record 42 of Set 8 : houma\n",
"Processing Record 43 of Set 8 : constantine\n",
"Processing Record 44 of Set 8 : la asuncion\n",
"City not found. Skipping...\n",
"Processing Record 45 of Set 8 : manaure\n",
"Processing Record 46 of Set 8 : flin flon\n",
"Processing Record 47 of Set 8 : mandiana\n",
"Processing Record 48 of Set 8 : nacala\n",
"Processing Record 49 of Set 8 : katsuura\n",
"Processing Record 50 of Set 8 : ostrovnoy\n",
"Processing Record 0 of Set 9 : cururupu\n",
"City not found. Skipping...\n",
"Processing Record 1 of Set 9 : tezu\n",
"Processing Record 2 of Set 9 : vila velha\n",
"Processing Record 3 of Set 9 : half moon bay\n",
"Processing Record 4 of Set 9 : karratha\n",
"Processing Record 5 of Set 9 : dwarka\n",
"Processing Record 6 of Set 9 : ciudad real\n",
"Processing Record 7 of Set 9 : comodoro rivadavia\n",
"City not found. Skipping...\n",
"Processing Record 8 of Set 9 : ponta do sol\n",
"Processing Record 9 of Set 9 : guapore\n",
"Processing Record 10 of Set 9 : kovdor\n",
"Processing Record 11 of Set 9 : macusani\n",
"Processing Record 12 of Set 9 : sakakah\n",
"Processing Record 13 of Set 9 : daru\n",
"Processing Record 14 of Set 9 : nyagan\n",
"Processing Record 15 of Set 9 : pocatello\n",
"City not found. Skipping...\n",
"City not found. Skipping...\n",
"Processing Record 16 of Set 9 : havre-saint-pierre\n",
"Processing Record 17 of Set 9 : saint-augustin\n",
"Processing Record 18 of Set 9 : nampula\n",
"Processing Record 19 of Set 9 : coromandel\n",
"Processing Record 20 of Set 9 : aswan\n",
"Processing Record 21 of Set 9 : rabo de peixe\n",
"Processing Record 22 of Set 9 : maragogi\n",
"Processing Record 23 of Set 9 : riyadh\n",
"Processing Record 24 of Set 9 : caravelas\n",
"Processing Record 25 of Set 9 : umm lajj\n",
"Processing Record 26 of Set 9 : markala\n",
"Processing Record 27 of Set 9 : ambon\n",
"Processing Record 28 of Set 9 : chapais\n",
"Processing Record 29 of Set 9 : mbandaka\n",
"Processing Record 30 of Set 9 : itarema\n",
"City not found. Skipping...\n",
"Processing Record 31 of Set 9 : richards bay\n",
"Processing Record 32 of Set 9 : borovskoy\n",
"City not found. Skipping...\n",
"Processing Record 33 of Set 9 : palembang\n",
"Processing Record 34 of Set 9 : lagos\n",
"Processing Record 35 of Set 9 : banjar\n",
"Processing Record 36 of Set 9 : codrington\n",
"Processing Record 37 of Set 9 : entre rios\n",
"Processing Record 38 of Set 9 : kloulklubed\n",
"Processing Record 39 of Set 9 : saquena\n",
"Processing Record 40 of Set 9 : xining\n",
"Processing Record 41 of Set 9 : eyl\n",
"Processing Record 42 of Set 9 : galle\n",
"Processing Record 43 of Set 9 : xiantao\n",
"Processing Record 44 of Set 9 : kisangani\n",
"Processing Record 45 of Set 9 : andra\n",
"Processing Record 46 of Set 9 : cocobeach\n",
"Processing Record 47 of Set 9 : bushehr\n",
"Processing Record 48 of Set 9 : hay river\n",
"Processing Record 49 of Set 9 : belmonte\n",
"Processing Record 50 of Set 9 : alta floresta\n",
"Processing Record 0 of Set 10 : thinadhoo\n",
"Processing Record 1 of Set 10 : calabozo\n",
"Processing Record 2 of Set 10 : athabasca\n",
"Processing Record 3 of Set 10 : hinche\n",
"Processing Record 4 of Set 10 : moses lake\n",
"Processing Record 5 of Set 10 : beyneu\n",
"Processing Record 6 of Set 10 : kumbo\n",
"Processing Record 7 of Set 10 : inverell\n",
"Processing Record 8 of Set 10 : great yarmouth\n",
"Processing Record 9 of Set 10 : campo maior\n",
"City not found. Skipping...\n",
"Processing Record 10 of Set 10 : wenling\n",
"Processing Record 11 of Set 10 : nhulunbuy\n",
"Processing Record 12 of Set 10 : san rafael\n",
"City not found. Skipping...\n",
"Processing Record 13 of Set 10 : mansa\n",
"Processing Record 14 of Set 10 : zhigalovo\n",
"Processing Record 15 of Set 10 : mayumba\n",
"Processing Record 16 of Set 10 : cabedelo\n",
"Processing Record 17 of Set 10 : chulym\n",
"Processing Record 18 of Set 10 : novyy svit\n",
"City not found. Skipping...\n",
"Processing Record 19 of Set 10 : nyurba\n",
"Processing Record 20 of Set 10 : sarab\n",
"Processing Record 21 of Set 10 : guanica\n",
"City not found. Skipping...\n",
"Processing Record 22 of Set 10 : cortes\n",
"Processing Record 23 of Set 10 : margate\n",
"Processing Record 24 of Set 10 : axim\n",
"Processing Record 25 of Set 10 : pemangkat\n",
"Processing Record 26 of Set 10 : sioux lookout\n",
"Processing Record 27 of Set 10 : ornskoldsvik\n",
"Processing Record 28 of Set 10 : pangnirtung\n",
"Processing Record 29 of Set 10 : drovyanaya\n",
"Processing Record 30 of Set 10 : saint george\n",
"Processing Record 31 of Set 10 : buzmeyin\n",
"Processing Record 32 of Set 10 : pamplona\n",
"Processing Record 33 of Set 10 : atar\n",
"Processing Record 34 of Set 10 : bangui\n",
"Processing Record 35 of Set 10 : ulaanbaatar\n",
"Processing Record 36 of Set 10 : wuda\n",
"Processing Record 37 of Set 10 : luganville\n",
"Processing Record 38 of Set 10 : malibu\n",
"Processing Record 39 of Set 10 : port hedland\n",
"Processing Record 40 of Set 10 : winnemucca\n",
"Processing Record 41 of Set 10 : port augusta\n",
"Processing Record 42 of Set 10 : kropotkin\n",
"Processing Record 43 of Set 10 : la rioja\n",
"Processing Record 44 of Set 10 : hofn\n",
"Processing Record 45 of Set 10 : tazovskiy\n",
"City not found. Skipping...\n",
"Processing Record 46 of Set 10 : kiruna\n",
"Processing Record 47 of Set 10 : wangqing\n",
"Processing Record 48 of Set 10 : manchester\n",
"Processing Record 49 of Set 10 : neyshabur\n",
"Processing Record 50 of Set 10 : calvinia\n",
"Processing Record 0 of Set 11 : iralaya\n",
"Processing Record 1 of Set 11 : kananga\n",
"Processing Record 2 of Set 11 : port hope\n",
"Processing Record 3 of Set 11 : kyra\n",
"Processing Record 4 of Set 11 : buraydah\n",
"Processing Record 5 of Set 11 : manakara\n",
"Processing Record 6 of Set 11 : constitucion\n",
"Processing Record 7 of Set 11 : manokwari\n",
"City not found. Skipping...\n",
"Processing Record 8 of Set 11 : marsala\n",
"Processing Record 9 of Set 11 : bousse\n",
"Processing Record 10 of Set 11 : narsaq\n",
"Processing Record 11 of Set 11 : ribeira brava\n",
"Processing Record 12 of Set 11 : lasa\n",
"Processing Record 13 of Set 11 : bella vista\n",
"Processing Record 14 of Set 11 : turkistan\n",
"Processing Record 15 of Set 11 : deming\n",
"Processing Record 16 of Set 11 : cockburn town\n",
"Processing Record 17 of Set 11 : rey bouba\n",
"Processing Record 18 of Set 11 : kavaratti\n",
"Processing Record 19 of Set 11 : poya\n",
"Processing Record 20 of Set 11 : dingle\n",
"Processing Record 21 of Set 11 : havoysund\n",
"Processing Record 22 of Set 11 : bilma\n",
"Processing Record 23 of Set 11 : meadow lake\n",
"Processing Record 24 of Set 11 : sukumo\n",
"Processing Record 25 of Set 11 : butzbach\n",
"Processing Record 26 of Set 11 : camacha\n",
"Processing Record 27 of Set 11 : potosi\n",
"Processing Record 28 of Set 11 : bafra\n",
"Processing Record 29 of Set 11 : tiarei\n",
"Processing Record 30 of Set 11 : sistranda\n",
"Processing Record 31 of Set 11 : roseburg\n",
"Processing Record 32 of Set 11 : namtsy\n",
"Processing Record 33 of Set 11 : bosaso\n",
"Processing Record 34 of Set 11 : mogwase\n",
"Processing Record 35 of Set 11 : de aar\n",
"Processing Record 36 of Set 11 : komsomolskiy\n",
"Processing Record 37 of Set 11 : badiraguato\n",
"Processing Record 38 of Set 11 : slave lake\n",
"City not found. Skipping...\n",
"Processing Record 39 of Set 11 : baisha\n",
"Processing Record 40 of Set 11 : luena\n",
"Processing Record 41 of Set 11 : turukhansk\n",
"Processing Record 42 of Set 11 : warangal\n",
"Processing Record 43 of Set 11 : creel\n",
"Processing Record 44 of Set 11 : tabira\n",
"Processing Record 45 of Set 11 : sao joao da barra\n",
"Processing Record 46 of Set 11 : pochutla\n",
"Processing Record 47 of Set 11 : kuytun\n",
"Processing Record 48 of Set 11 : pecica\n",
"Processing Record 49 of Set 11 : puno\n",
"City not found. Skipping...\n",
"Processing Record 50 of Set 11 : parakou\n",
"Processing Record 0 of Set 12 : bodden town\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Processing Record 1 of Set 12 : khorixas\n",
"Processing Record 2 of Set 12 : dingzhou\n",
"Processing Record 3 of Set 12 : mendi\n",
"Processing Record 4 of Set 12 : ignatovka\n",
"Processing Record 5 of Set 12 : mbaiki\n",
"Processing Record 6 of Set 12 : denizli\n",
"-----------------------------\n",
"Data Retrieval Complete\n",
"-----------------------------\n"
]
}
],
"source": [
"print(\"Beginning Data Retrieval \")\n",
"print(\"-----------------------------\")\n",
"\n",
"base_url = \"http://api.openweathermap.org/data/2.5/weather?\"\n",
"units = \"imperial\"\n",
"query_url = f\"{base_url}appid={weather_api_key}&units={units}&q=\"\n",
"\n",
"\n",
"# For each city name in cities list, do below things...\n",
"for index, city in enumerate(cities, start = 1):\n",
" try:\n",
" response = requests.get(query_url + city).json()\n",
" city_name_list.append(response[\"name\"])\n",
" cloudiness_list.append(response[\"clouds\"][\"all\"])\n",
" country_list.append(response[\"sys\"][\"country\"])\n",
" date_list.append(response[\"dt\"])\n",
" humidity_list.append(response[\"main\"][\"humidity\"])\n",
" lat_list.append(response[\"coord\"][\"lat\"])\n",
" lng_list.append(response[\"coord\"][\"lon\"])\n",
" max_temp_list.append(response['main']['temp_max'])\n",
" wind_speed_list.append(response[\"wind\"][\"speed\"])\n",
" if index_counter > 49:\n",
" index_counter = 0\n",
" set_counter = set_counter + 1\n",
" \n",
" else:\n",
" index_counter = index_counter + 1\n",
" \n",
" print(f\"Processing Record {index_counter} of Set {set_counter} : {city}\") \n",
" \n",
" except(KeyError, IndexError):\n",
" print(\"City not found. Skipping...\")\n",
"\n",
"print(\"-----------------------------\")\n",
"print(\"Data Retrieval Complete\")\n",
"print(\"-----------------------------\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Converting the raw data to data frame \n",
"1.exporting the city data into .csv \n",
"\n",
"2.Displaying the data frame \n"
]
},
{
"cell_type": "code",
"execution_count": 78,
"metadata": {},
"outputs": [],
"source": [
"# Creating a panda data frame using the data retrieved\n",
"weatherpy_dictionary = pd.DataFrame({ \n",
" \"City\" : city_name_list,\n",
" \"Cloudiness\" : cloudiness_list,\n",
" \"Country\" : country_list,\n",
" \"Date\" : date_list,\n",
" \"Humidity\" : humidity_list,\n",
" \"Lat\" : lat_list,\n",
" \"Lng\" : lng_list,\n",
" \"Max Temp\" : max_temp_list,\n",
" \"Wind Speed\" : wind_speed_list\n",
"})"
]
},
{
"cell_type": "code",
"execution_count": 79,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"City 567\n",
"Cloudiness 567\n",
"Country 567\n",
"Date 567\n",
"Humidity 567\n",
"Lat 567\n",
"Lng 567\n",
"Max Temp 567\n",
"Wind Speed 567\n",
"dtype: int64"
]
},
"execution_count": 79,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Counting data\n",
"weatherpy_dictionary.count()"
]
},
{
"cell_type": "code",
"execution_count": 80,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
CityCloudinessCountryDateHumidityLatLngMax TempWind Speed
0Vaini90TO160283608388-21.20-175.2075.208.05
1Ust-Maya0RU16028360849060.42134.5319.063.33
2Jamestown90US160283608410042.10-79.2446.005.82
3Skibbereen75IE16028360858751.55-9.2744.606.93
4Ushuaia90AR160283608586-54.80-68.3039.2013.87
..............................
562Dingzhou0CN16028359361538.51115.0071.606.71
563Mendi100PG1602836210100-6.18143.6556.440.22
564Ignatovka39RU16028362104153.9547.6560.3516.13
565Mbaïki100CF1602836210673.8717.9981.212.66
566Denizli Province0TR16028362115837.8429.0757.201.12
\n",
"

567 rows × 9 columns

\n",
"
"
],
"text/plain": [
" City Cloudiness Country Date Humidity Lat \\\n",
"0 Vaini 90 TO 1602836083 88 -21.20 \n",
"1 Ust-Maya 0 RU 1602836084 90 60.42 \n",
"2 Jamestown 90 US 1602836084 100 42.10 \n",
"3 Skibbereen 75 IE 1602836085 87 51.55 \n",
"4 Ushuaia 90 AR 1602836085 86 -54.80 \n",
".. ... ... ... ... ... ... \n",
"562 Dingzhou 0 CN 1602835936 15 38.51 \n",
"563 Mendi 100 PG 1602836210 100 -6.18 \n",
"564 Ignatovka 39 RU 1602836210 41 53.95 \n",
"565 Mbaïki 100 CF 1602836210 67 3.87 \n",
"566 Denizli Province 0 TR 1602836211 58 37.84 \n",
"\n",
" Lng Max Temp Wind Speed \n",
"0 -175.20 75.20 8.05 \n",
"1 134.53 19.06 3.33 \n",
"2 -79.24 46.00 5.82 \n",
"3 -9.27 44.60 6.93 \n",
"4 -68.30 39.20 13.87 \n",
".. ... ... ... \n",
"562 115.00 71.60 6.71 \n",
"563 143.65 56.44 0.22 \n",
"564 47.65 60.35 16.13 \n",
"565 17.99 81.21 2.66 \n",
"566 29.07 57.20 1.12 \n",
"\n",
"[567 rows x 9 columns]"
]
},
"execution_count": 80,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Displaying the Data Frame\n",
"weatherpy_dictionary"
]
},
{
"cell_type": "code",
"execution_count": 81,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
CityCloudinessCountryDateHumidityLatLngMax TempWind Speed
0Vaini90TO160283608388-21.20-175.2075.208.05
1Ust-Maya0RU16028360849060.42134.5319.063.33
2Jamestown90US160283608410042.10-79.2446.005.82
3Skibbereen75IE16028360858751.55-9.2744.606.93
4Ushuaia90AR160283608586-54.80-68.3039.2013.87
\n",
"
"
],
"text/plain": [
" City Cloudiness Country Date Humidity Lat Lng \\\n",
"0 Vaini 90 TO 1602836083 88 -21.20 -175.20 \n",
"1 Ust-Maya 0 RU 1602836084 90 60.42 134.53 \n",
"2 Jamestown 90 US 1602836084 100 42.10 -79.24 \n",
"3 Skibbereen 75 IE 1602836085 87 51.55 -9.27 \n",
"4 Ushuaia 90 AR 1602836085 86 -54.80 -68.30 \n",
"\n",
" Max Temp Wind Speed \n",
"0 75.20 8.05 \n",
"1 19.06 3.33 \n",
"2 46.00 5.82 \n",
"3 44.60 6.93 \n",
"4 39.20 13.87 "
]
},
"execution_count": 81,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#displaying the first 10 records\n",
"weatherpy_dictionary.head()"
]
},
{
"cell_type": "code",
"execution_count": 82,
"metadata": {},
"outputs": [],
"source": [
"#Saving city data into a csv file named cities.csv\n",
"weatherpy_dictionary.to_csv(\"cities.csv\", index = False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Plotting the data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1. Temperature(F) vs. LatitudePlot"
]
},
{
"cell_type": "code",
"execution_count": 83,
"metadata": {},
"outputs": [
{
"data": {
"image/png":...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here