Thematic Cartography

Create and integrate thematic maps in your workflow. This package helps to design various cartographic representations such as proportional symbols, choropleth or typology maps. It also offers several functions to display layout elements that improve the graphic presentation of maps (e.g. scale bar, north arrow, title, labels). 'mapsf' maps 'sf' objects on 'base' graphics.


mapsf

CRAN mapsf statusbadge code coverage:95% status downloads

Create thematic maps and integrate them into your R workflow.

This package helps you design different cartographic representations such as proportional symbols, choropleths, or typology maps. It also provides several functions for displaying layout elements that enhance the graphical presentation of maps (e.g., scale bar, north arrow, title, labels). mapsf maps sf objects on base graphics.

Installation

You can install the released version of mapsf from CRAN with:

install.packages("mapsf")

Alternatively, you can install the development version of mapsf (the dev branch) from r-universe with:

install.packages("mapsf", repos = c("https://riatelab.r-universe.dev", "https://cloud.r-project.org"))

Usage

This is a basic example which shows how to create a map with mapsf.

library(mapsf)
# Import the sample dataset
mtq <- mf_get_mtq()
# Plot the base map
mf_map(x = mtq)
# Plot proportional symbols
mf_map(x = mtq, var = "POP", type = "prop", leg_pos = "topright", add = TRUE)
# Plot a map layout
mf_layout(
  title = "Population in Martinique",
  credits = "T. Giraud; Sources: INSEE & IGN, 2018"
)
A simple map created with mapsf

You can find more detailed examples on the “Get Started” section of the package website and you can also download its cheat sheet.
CheatSheet

mapsf.gui mapsf.gui logo

The mapsf.gui package provides a Shiny interface for creating thematic maps using mapsf. Users of the application can build thematic maps interactively and automatically generate the corresponding R code to reproduce the map identically.

Alternatives

Community Guidelines

One can contribute to the package through pull requests and report issues or ask questions here. See the CONTRIBUTING.md file for detailed instructions on how to contribute.
This project uses conventional commits and semantic versioning.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mapsf")

1.3.0 by Timothée Giraud, a day ago


https://riatelab.github.io/mapsf/


Report a bug at https://github.com/riatelab/mapsf/issues/


Browse source code at https://github.com/cran/mapsf


Authors: Timothée Giraud [cre, aut] (ORCID: , Hugues Pecout [ctb] , Logo) , Ronan Ysebaert [ctb] , Cheat sheet) , Elina Marveaux [ctb] , Themes) , Ian Fellows [cph] (No overlap algorithm for labels , from wordcloud package) , Danielle Navarro [cph] , Bézier curve algorithm for text annotations)


Documentation:   PDF Manual  


GPL (>= 3) license


Imports classInt, graphics, maplegend, s2, sf, stats, utils, grDevices

Suggests terra, Ckmeans.1d.dp, png, jpeg, knitr, rmarkdown, svglite, tinytest, covr


Imported by maposm, mapsf.gui, nhdplusTools.

Depended on by btb.

Suggested by MTA, eks, hydrogeofetch, mapSenegal, mapiso, osrm, potential.


See at CRAN