Skip to content

Commit

Permalink
switch to CartoDB.Positron as default exposures tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-schmid committed Oct 27, 2023
1 parent 4f5509c commit 2cefec8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Code freeze date: YYYY-MM-DD

### Changed

- The default tile layer in Exposures maps is not StamenTerrain anymore, but OpenStreetMap. Affected methods are `climada.engine.Impact.plot_basemap_eai_exposure`,`climada.engine.Impact.plot_basemap_impact_exposure` and `climada.entity.Exposures.plot_basemap`. [#798](https://github.com/CLIMADA-project/climada_python/pull/798)
- The default tile layer in Exposures maps is not Stamen Terrain anymore, but [CartoDB Positron](https://github.com/CartoDB/basemap-styles). Affected methods are `climada.engine.Impact.plot_basemap_eai_exposure`,`climada.engine.Impact.plot_basemap_impact_exposure` and `climada.entity.Exposures.plot_basemap`. [#798](https://github.com/CLIMADA-project/climada_python/pull/798)

### Fixed

Expand Down
8 changes: 4 additions & 4 deletions climada/engine/impact.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def plot_raster_eai_exposure(self, res=None, raster_res=None, save_tiff=None,

def plot_basemap_eai_exposure(self, mask=None, ignore_zero=False, pop_name=True,
buffer=0.0, extend='neither', zoom=10,
url=ctx.providers.OpenStreetMap.Mapnik,
url=ctx.providers.CartoDB.Positron,
axis=None, **kwargs):
"""Plot basemap expected impact of each exposure within a period of 1/frequency_unit.
Expand All @@ -694,7 +694,7 @@ def plot_basemap_eai_exposure(self, mask=None, ignore_zero=False, pop_name=True,
zoom : int, optional
zoom coefficient used in the satellite image
url : str, optional
image source, default: ctx.providers.OpenStreetMap.Mapnik
image source, default: ctx.providers.CartoDB.Positron
axis : matplotlib.axes.Axes, optional
axis to use
kwargs : dict, optional
Expand Down Expand Up @@ -764,7 +764,7 @@ def plot_hexbin_impact_exposure(self, event_id=1, mask=None, ignore_zero=False,

def plot_basemap_impact_exposure(self, event_id=1, mask=None, ignore_zero=False,
pop_name=True, buffer=0.0, extend='neither', zoom=10,
url=ctx.providers.OpenStreetMap.Mapnik,
url=ctx.providers.CartoDB.Positron,
axis=None, **kwargs):
"""Plot basemap impact of an event at each exposure.
Requires attribute imp_mat.
Expand All @@ -789,7 +789,7 @@ def plot_basemap_impact_exposure(self, event_id=1, mask=None, ignore_zero=False,
zoom : int, optional
zoom coefficient used in the satellite image
url : str, optional
image source, default: ctx.providers.OpenStreetMap.Mapnik
image source, default: ctx.providers.CartoDB.Positron
axis : matplotlib.axes.Axes, optional
axis to use
kwargs : dict, optional
Expand Down
4 changes: 2 additions & 2 deletions climada/entity/exposures/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ def plot_raster(self, res=None, raster_res=None, save_tiff=None,

def plot_basemap(self, mask=None, ignore_zero=False, pop_name=True,
buffer=0.0, extend='neither', zoom=10,
url=ctx.providers.OpenStreetMap.Mapnik, axis=None, **kwargs):
url=ctx.providers.CartoDB.Positron, axis=None, **kwargs):
"""Scatter points over satellite image using contextily
Parameters
Expand All @@ -771,7 +771,7 @@ def plot_basemap(self, mask=None, ignore_zero=False, pop_name=True,
zoom coefficient used in the satellite image
url : Any, optional
image source, e.g., ``ctx.providers.OpenStreetMap.Mapnik``.
Default: ``ctx.providers.OpenStreetMap.Mapnik``
Default: ``ctx.providers.CartoDB.Positron``
axis : matplotlib.axes._subplots.AxesSubplot, optional
axis to use
kwargs : optional
Expand Down
20 changes: 5 additions & 15 deletions doc/tutorial/climada_entity_Exposures.ipynb

Large diffs are not rendered by default.

0 comments on commit 2cefec8

Please sign in to comment.