join_brmap: Join tabular data to a Brazilian map

View source: R/join_data.R

join_brmapR Documentation

Join tabular data to a Brazilian map

Description

A small type-preserving wrapper around [dplyr::left_join()].

Usage

join_brmap(map, data, by = NULL)

join_data(map, data, by = NULL)

Arguments

map

An 'sf', 'SpatialPolygonsDataFrame' or 'data.frame' object.

data

A data frame containing the columns to add.

by

Join specification accepted by [dplyr::left_join()].

Value

The same broad object type supplied in 'map'.

See Also

[get_brmap()]

Examples

data("pop2017")
municipalities <- get_brmap("municipality", year = 2023)
municipalities <- join_brmap(
  municipalities, pop2017, by = c("municipality_code" = "mun")
)

brazilmaps documentation built on Aug. 4, 2026, 5:07 p.m.