Skip to content

Instantly share code, notes, and snippets.

@bennuttall
Created June 28, 2018 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennuttall/a33005d153f1992cbc029a453ae8806b to your computer and use it in GitHub Desktop.
Save bennuttall/a33005d153f1992cbc029a453ae8806b to your computer and use it in GitHub Desktop.

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment