Requirements:
sudo pip3 install pypollen geopy
from pypollen import Pollen | |
from geopy.geocoders import Nominatim | |
geolocator = Nominatim() | |
location = geolocator.geocode("Cambridge") | |
lat, lon = location.latitude, location.longitude | |
pollen_status = Pollen(lat, lon).pollencount | |
print(pollen_status) |