From f512795db5f2fa9306e3c89ed4b59472b57b7871 Mon Sep 17 00:00:00 2001 From: choldgraf Date: Fri, 6 Sep 2024 10:26:43 -0700 Subject: [PATCH] Located --- book/cloud.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/book/cloud.md b/book/cloud.md index b0a875b..9ae8861 100644 --- a/book/cloud.md +++ b/book/cloud.md @@ -167,7 +167,6 @@ slideshow: tags: [remove-cell] --- import pandas as pd -from geopandas.tools import geocode import pandas as pd import plotly.express as px import numpy as np @@ -243,11 +242,11 @@ def geocode(city_name): path_locations = Path("./data/city-locations.csv") if not path_locations.exists(): unique_locations = communities["Location"].unique() - geocoded = [] + located = [] for location in track(unique_locations): lat, lon = geocode(unique_locations) - geocoded.append([location, lat, lon]) - geocoded = pd.DataFrame(geocoded, columns=["Location", "lat", "lon"]) + located.append([location, lat, lon]) + located = pd.DataFrame(located, columns=["Location", "lat", "lon"]) # Save for future use located.to_csv(path_locations, index=False)