How to make JSON file auto updated?

Viewed 67

i found this dataset JSON file and i am using it on my project: https://www.ecdc.europa.eu/en/publications-data/data-daily-new-cases-covid-19-eueea-country

How can i use the JSON file and make it auto updated whenever the site update it ? here is my python code:

import folium

m = folium.Map(
    location=[56.462490 , 13.753191],
    zoom_start=4.36,
    tiles='https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',
    attr='My Data Attribution'
)

folium.GeoJson(
    r'/Users/bader/Desktop/pandaTable/european-union-countries.geojson',
    name='geoJson',
    tooltip=folium.features.GeoJsonTooltip(
        fields=['name_sort'],
        aliases=['Name'],
        sticky=True,
        opacity=2.3,
        direction='right',
    ),
).add_to(m)

m.save('map.html')

The other questions is: How can i make the cases and deaths (Check the link for JSON file) shows on the tooltip ? i am just showing the country name right now with my above code.

0 Answers
Related