Here be dragons 🐉
A Jupyter Widget for @carbonplan/maps
. Built with
anywidget
.
import carbonplan_maps
map_widget = carbonplan_maps.Widget(
source="https://carbonplan-maps.s3.us-west-2.amazonaws.com/v2/demo/2d/tavg",
variable="tavg",
dimensions=("y", "x"),
)
map_widget
combine with other widgets...
import ipywidgets
colormap = ipywidgets.Dropdown(options=["warm", "fire", "water"])
clim = ipywidgets.FloatRangeSlider(min=-20, max=30)
opacity = ipywidgets.FloatSlider(min=0, max=1, step=0.001)
region = ipywidgets.Checkbox(description="Region")
ipywidgets.link((map_widget, "colormap"), (colormap, "value"))
ipywidgets.link((map_widget, "clim"), (clim, "value"))
ipywidgets.link((map_widget, "opacity"), (opacity, "value"))
ipywidgets.link((map_widget, "region"), (region, "value"))
ipywidgets.VBox([
ipywidgets.HBox([colormap, opacity, clim]),
region,
map_widget,
])
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
jupyter lab