Skip to content

Commit

Permalink
chapter 2 captions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldorman committed Sep 1, 2023
1 parent 1dc54e8 commit 2cb62e6
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 44 deletions.
7 changes: 5 additions & 2 deletions 02-spatial-data.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,13 @@ towns_layer = gpd.GeoDataFrame(d)
towns_layer
```

The following expression creates an interactive map with the result:
The following expression creates an interactive map with the result (@fig-layer-from-scratch-explore). To make the points easier to see, we are setting a different fill color and larger size (we elaborate on `.explore` options in @sec-interactive-maps):

```{python}
towns_layer.explore()
#| label: fig-layer-from-scratch-explore
#| fig-cap: '`towns_layer`, created from scratch, visualized using `.explore`'
towns_layer.explore(color='red', marker_kwds={'radius': 10})
```

Alternatively, we can first create a `pandas.DataFrame` and turn it into a `GeoDataFrame` like this:
Expand Down
2 changes: 1 addition & 1 deletion 09-mapping.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ plt.savefig('output/plot_rasterio2.svg', dpi=300)

<!-- ## Animated maps -->

## Interactive maps
## Interactive maps {#sec-interactive-maps}

### Minimal example

Expand Down
82 changes: 41 additions & 41 deletions output/plot_rasterio2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2cb62e6

Please sign in to comment.