Skip to content

Commit

Permalink
added cartogram in vig
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed Jan 12, 2025
1 parent 76b3347 commit 79451ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Suggests:
rstudioapi
Config/Needs/check: Nowosad/spDataLarge, lwgeom
Config/Needs/coverage: Nowosad/spDataLarge, lwgeom
Config/Needs/website: bookdown, geofacet, rmarkdown, mapview, sits, r-spatial/leafem, mapsf, r-tmap/tmap.glyphs, r-tmap/tmap.networks, r-tmap/tmap.deckgl, sfnetworks
Config/Needs/website: bookdown, geofacet, rmarkdown, mapview, sits, r-spatial/leafem, mapsf, r-tmap/tmap.glyphs, r-tmap/tmap.networks, r-tmap/tmap.deckgl, sfnetworks, r-tmap/tmap.cartogram
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Expand Down
3 changes: 2 additions & 1 deletion vignettes/foundations_crs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ tm_title("Latitude/longitude (4326) coordinates")
```



However, this is not a good map because areas near the poles are too large (and therefore overemphasized).

```{r, fig.height = 4}
library(tmap.cartogram)
# split multi-polygon countries (otherwise Alaska is still too large)
World_polygons = sf::st_cast(World, "POLYGON")
World_polygons$area = sf::st_area(World_polygons)
Expand Down

0 comments on commit 79451ae

Please sign in to comment.