Radar: Examples#
Setting up#
The examples assume you have set up a Geosatellite client like so:
import yr_weather
my_client = yr_weather.Geosatellite()
Important
All of the next examples will use my_client as a reference to your client.
Valid types#
For valid geosatellite areas, see types.geosatellite.SatArea.
For other options, see MET.no’s documentation.
Getting a geosatellite image#
area = "europe"
img_type = "infrared"
size = "normal"
result = my_client.get_image(area, img_type, size=size)
with open("image.png", "wb") as f:
for chunk in result:
f.write(chunk)