Skip to content

Commit

Permalink
Located
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed Sep 6, 2024
1 parent 27248e5 commit f512795
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions book/cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f512795

Please sign in to comment.