3. Visualizing Data using WMSΒΆ
This is an example on how connect to the Web Map Service of the AfricaRain THREDDS server to vizualize data in interactive maps. We assume that the demo.nc contains a layer called air_temperature
Requirements: The ipyleaflet module, which you can install with $ pip install ipyleaflet
[25]:
from ipyleaflet import Map, WMSLayer
wms = WMSLayer(
url='https://africarain.ceg.tudelft.nl:9010/thredds/wms/demos/demo.nc?COLORSCALERANGE=273,317', #Use COLORSCALERANGE=273,317 only within this example. Omit for any other case.
layers='air_temperature',
format='image/png',
transparent=True,
attribution='Africa Rain Project, TU Delft'
)
center=(40.1, -104.5)
m = Map(center=center, zoom=7.5)
m.add_layer(wms)
display(m)