Skip to content

Commit 1673820

Browse files
authored
Update get.py
1 parent eefec85 commit 1673820

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

braininventory/get.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,25 @@ def report():
151151
report["is_reachable"] = df["URL"].apply(__is_reachable)
152152

153153
return report
154+
155+
import pandas as pd
156+
import urllib.request
157+
158+
url = 'https://download.brainimagelibrary.org/inventory/daily/reports/today.json'
159+
file_path, _ = urllib.request.urlretrieve(url)
160+
161+
df = pd.read_json(file_path)
162+
df
163+
164+
import folium
165+
166+
map = folium.Map()
167+
168+
from tqdm import tqdm
169+
170+
for index, row in tqdm(df.iterrows()):
171+
city = row['city']
172+
lat = row['lat']
173+
lon = row['lng']
174+
folium.Marker([lat, lon], popup=city).add_to(map)
175+
map.save('project_map.html')

0 commit comments

Comments
 (0)