Skip to content

Commit 4b860c0

Browse files
authored
Minor docs fixes (#1936)
* add geodatasets * minor docs fixes * missed a few happy new years * readd first year
1 parent ae827c1 commit 4b860c0

6 files changed

Lines changed: 21 additions & 15 deletions

File tree

docs/advanced_guide/geodedetic_image_overlay.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ lon -= 180
2828
2929
import matplotlib
3030
31-
cm = matplotlib.cm.get_cmap("cubehelix")
31+
cm = matplotlib.colormaps["cubehelix"]
3232
3333
normed_data = (data - data.min()) / (data.max() - data.min())
3434
colored_data = cm(normed_data)

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@
4747
master_doc = "index"
4848

4949
# General information about the project.
50+
import datetime
51+
52+
year = datetime.datetime.now(tz=datetime.timezone.utc).date().year
5053
project = "Folium"
51-
copyright = "2013, Rob Story"
54+
copyright = f"2013-{year}, Rob Story"
5255

5356
# The version info for the project you're documenting, acts as replacement for
5457
# |version| and |release|, also used in various other places throughout the

docs/user_guide/geojson/geojson_popup_and_tooltip.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@ states.head()
3535
```
3636

3737
```{code-cell} ipython3
38+
import io
3839
import requests
3940
4041
response = requests.get(
4142
"https://gist.githubusercontent.com/tvpmb/4734703/raw/"
4243
"b54d03154c339ed3047c66fefcece4727dfc931a/US%2520State%2520List"
4344
)
44-
abbrs = pd.read_json(response.text)
45+
abbrs = pd.read_json(io.StringIO(response.text))
4546
4647
abbrs.head(3)
4748
```

docs/user_guide/plugins/WmsTimeDimension.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22

33
Add a time dimension to a WMS tile layer.
44

5-
Note that we don't render the output in this example, because the web service
6-
used here is not always available.
7-
85
### Exploring the WMS with OWSLib
96

10-
```
7+
```{code-cell} ipython3
118
from owslib.wms import WebMapService
129
1310
@@ -20,7 +17,7 @@ print("\n".join(web_map_services.contents.keys()))
2017

2118
### Layer metadata
2219

23-
```
20+
```{code-cell} ipython3
2421
layer = "CRW_SST"
2522
wms = web_map_services.contents[layer]
2623
@@ -41,7 +38,10 @@ if style not in wms.styles:
4138

4239
### Map with WmsTileLayer and TimestampedWmsTileLayers
4340

44-
```
41+
```{code-cell} ipython3
42+
import folium
43+
import folium.plugins
44+
4545
m = folium.Map(location=[-40, -50], zoom_start=5)
4646
4747
wms_tile_layer = folium.WmsTileLayer(

docs/user_guide/plugins/timeslider_choropleth.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ The class needs at least two arguments to be instantiated.
77
1. A string-serielized geojson containing all the features (i.e., the areas)
88
2. A dictionary with the following structure:
99

10-
```
10+
11+
```ipython3
1112
styledict = {
1213
'0': {
1314
'2017-1-1': {'color': 'ffffff', 'opacity': 1},
@@ -32,11 +33,11 @@ Using both color and opacity gives us the ability to simultaneously visualize tw
3233
We use `geopandas` to load a dataset containing the boundaries of all the countries in the world.
3334

3435
```{code-cell} ipython3
35-
import geopandas as gpd
36+
import geodatasets
37+
import geopandas
3638
37-
assert "naturalearth_lowres" in gpd.datasets.available
38-
datapath = gpd.datasets.get_path("naturalearth_lowres")
39-
gdf = gpd.read_file(datapath)
39+
datapath = geodatasets.get_path("naturalearth land")
40+
gdf = geopandas.read_file(datapath)
4041
```
4142

4243
```{code-cell} ipython3
@@ -66,7 +67,7 @@ n_periods, n_sample = 48, 40
6667
6768
assert n_sample < n_periods
6869
69-
datetime_index = pd.date_range("2016-1-1", periods=n_periods, freq="M")
70+
datetime_index = pd.date_range("2016-1-1", periods=n_periods, freq="ME")
7071
dt_index_epochs = datetime_index.astype("int64") // 10 ** 9
7172
dt_index = dt_index_epochs.astype("U10")
7273

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ flake8-comprehensions
88
flake8-import-order
99
flake8-mutable
1010
flake8-nb>=0.2.5
11+
geodatasets
1112
geographiclib
1213
geopandas
1314
gpxpy

0 commit comments

Comments
 (0)