Exercício 4 - Mapas

Author

Matheus Salles

Chegou a hora de fixar o nosso aprendizado sobre a aula de mapas!

Para isso, vamos fazer dois exercícios independentes e usar diferentes conjunto de dados do tidytuesday

Exercício 1

Utilizando recursos apresentados em aula, faremos mapas do estado e do município onde nasci: Curitiba - PR.

# Carregando pacotes necessários para o script
library(geobr)
library(ggsn)
library(ggplot2)
library(sf)
library(dplyr)
library(tidyverse)
library(rgdal)
library(wesanderson)
library(scales)
library(ggspatial)

# Carregando conjunto de dados do geobr
datasets <- list_geobr() 
head(datasets)
                    function           geography
1             `read_country`             Country
2              `read_region`              Region
3               `read_state`              States
4         `read_meso_region`         Meso region
5        `read_micro_region`        Micro region
6 `read_intermediate_region` Intermediate region
                                                                                                                               years
1 1872, 1900, 1911, 1920, 1933, 1940, 1950, 1960, 1970, 1980, 1991, 2000, 2001, 2010, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020
2                                                                   2000, 2001, 2010, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020
3 1872, 1900, 1911, 1920, 1933, 1940, 1950, 1960, 1970, 1980, 1991, 2000, 2001, 2010, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020
4                                                                   2000, 2001, 2010, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020
5                                                                   2000, 2001, 2010, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020
6                                                                                                                   2017, 2019, 2020
  source
1   IBGE
2   IBGE
3   IBGE
4   IBGE
5   IBGE
6   IBGE
# Baixando todos os municípios do Paraná
muni_PR <- read_municipality(
  code_muni = "PR",
  year = 2020,
  showProgress = FALSE)
class(muni_PR)
[1] "sf"         "data.frame"
# Escolhendo estilo da seta norte
northSymbols()

# Carregando paleta de cores
show_col(wes_palette("GrandBudapest1"))

show_col(wes_palette("GrandBudapest2"))

my_palette1 <- wes_palette("GrandBudapest1")
my_palette2 <- wes_palette("GrandBudapest2")

# Plotando mapa do estado do Paraná
pr_sf_plt <- ggplot() +
  geom_sf(data = muni_PR, fill = my_palette2[1],
          color = my_palette1[3],
          size = .15,
          show.legend = FALSE) +
  labs(subtitle = "Municípios do Paraná, 2020", size = 14) +
  theme_minimal() +
  theme(title = element_text(size = 42),
        axis.text.y = element_text(size = 24),
        axis.title.y = element_blank(),
        axis.text.x = element_text(size = 24),
        axis.title.x = element_blank()) +
  annotation_north_arrow(which_north = "true", location = "br",
                          height = unit(2, "cm"), width = unit(2, "cm"),
                         style = north_arrow_orienteering(text_size = 14)) +
  scalebar(muni_PR, location = "bottomleft", dist = 100, dist_unit = "km",
           transform = TRUE, model = "WGS84", st.size = 8)
pr_sf_plt

# Carregando mapa de Curitiba
muni_cwb_sf <- read_municipality(
  code_muni = 4106902, 
  year = 2020, 
  showProgress = FALSE
  )
class(muni_cwb_sf)
[1] "sf"         "data.frame"
# Plotando mapa de Curitiba
cwb_sf_plt <- ggplot() +
    geom_sf(data = muni_cwb_sf,
            color = "black",
            fill = my_palette2[4],
            size = 0.15,
            show.legend = TRUE) +
  labs(subtitle = "Município de Curitiba, capital do Paraná - 2020") +
  theme_minimal() +
  theme(title = element_text(size = 30),
        axis.text.y = element_text(size = 24),
        axis.title.y = element_blank(),
        axis.text.x = element_text(size = 24),
        axis.title.x = element_blank()) +
  annotation_north_arrow(which_north = "true", location = "bl",
                          height = unit(2, "cm"), width = unit(2, "cm"),
                         style = north_arrow_orienteering(text_size = 14)) +
  scalebar(muni_cwb_sf, location = "bottomright", dist = 2, dist_unit = "km",
           transform = TRUE, model = "WGS84", st.size = 8)
cwb_sf_plt

Agora vamos criar um mapa do estado do Paraná, destacando Curitiba em meio aos demais municípios

# Plotando mapa do Paraná com destaque para Curitiba
cwb_pr_sf_plt <- ggplot() +
    geom_sf(data = muni_PR,
            fill = my_palette2[1], color = my_palette1[3],
            size = 0.15,
            alpha = 0.75,
            show.legend = FALSE) +
    geom_sf(data = muni_cwb_sf,
            color = "black",
            fill = my_palette2[4],
            size = 0.15,
            show.legend = TRUE) +
  labs(title = "Municípios do Paraná, com destaque para Curitiba (capital) - 2020") +
  theme_minimal() +
  theme(title = element_text(size = 28),
        axis.text.y = element_text(size = 24),
        axis.title.y = element_blank(),
        axis.text.x = element_text(size = 24),
        axis.title.x = element_blank()) + 
  north(muni_PR, symbol = 4, location = "bottomright") +
  scalebar(muni_PR, location = "bottomleft", dist = 100, dist_unit = "km",
           transform = TRUE, model = "WGS84")
cwb_pr_sf_plt

É recomendado que locais que não sejam ilhas não sejam representados graficamente de forma isolada. Portanto, agora iremos refazer nossos gráficos destacando o estado do Paraná em meio aos demais estados brasileiros, posteriormente dando algum destaque também ao município de Curitiba.

# Carregando bibliotecas
library(png)
library(cowplot)

# Importando imagem para inserir no gráfico (aqui é necessário conferir o seu diretório)
cap <- readPNG("cap-logo.png")

# Baixando todos os estados do Brasil
estados_BR <- read_state(code_state = "all", 
                              year=2020, showProgress = FALSE)
Using year 2020
Problem connecting to data server. Please try again in a few minutes.
# Plotando mapa do Brasil com destaque para o estado do Paraná
mapa_br <- ggplot() +
  borders("world", fill = "white", colour = "gray") +
  geom_sf(data = estados_BR, fill = "white",
          color = "darkgray", show.legend = FALSE) +
  geom_sf(data = filter(estados_BR, name_state == "Paraná"),
          fill = "lightgray", color="darkgray", show.legend = FALSE) +
  coord_sf(xlim = c(-80,-30), ylim =c(-40,10))+
  theme_void()
mapa_br

head(muni_cwb_sf)
Simple feature collection with 1 feature and 7 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: -49.38934 ymin: -25.64536 xmax: -49.18522 ymax: -25.34507
Geodetic CRS:  SIRGAS 2000
   code_muni name_muni code_state abbrev_state name_state code_region
94   4106902  Curitiba         41           PR     Paraná           4
   name_region                           geom
94         Sul MULTIPOLYGON (((-49.26489 -...
# Refazendo mapa de Curitiba, agora inserindo imagem no canto esquerdo superior
mapa_cwb_cap <- ggplot() + 
  geom_sf(data = filter(estados_BR, name_state == "Paraná"),
          fill = "lightgray", color = "darkgray", show.legend = FALSE) +
  geom_sf(data = muni_cwb_sf, fill = "red", color = "darkgray", show.legend = FALSE)+
  labs(title = "Curitiba, PR")+
  theme_void() +
  annotation_raster(cap, xmin = -55, xmax = -54, ymin = -23.5, ymax = -22.5)
mapa_cwb_cap

# Juntando os dois gráficos
cwb_br_plot <- ggdraw() +
  coord_equal(xlim = c(0, 40), ylim = c(0, 40), expand = FALSE) +
  annotation_custom(ggplotGrob(mapa_cwb_cap), xmin = 20, xmax = 40,
                    ymin = 0, ymax = 30) +
  annotation_custom(ggplotGrob(mapa_br), xmin = 0, xmax = 25,
                    ymin = 10, ymax = 40)
Coordinate system already present. Adding new coordinate system, which will
replace the existing one.
cwb_br_plot

Exercício 2

Utilizando dados do meu projeto de doutorado, aqui apresento a distribuição de amostras genéticas coletadas de indivíduos do grupo de espécies Tropidurus spinulosus.

# Carregando pacotes
library(ggmap)
library(maps)
library(tidyverse)
library(ggsci)
library(ggsn)
library(ggspatial)
library(ggpubr)
library(geobr)

# Determinando diretório de trabalho
setwd("C:/Users/User/OneDrive/manipulacao-visualizacao-dados-r")

# Carregando arquivo
trops_dados <- read.table("lat-long-tropidurus-2023.txt", header = TRUE)
str(trops_dados)
'data.frame':   44 obs. of  3 variables:
 $ nome_revisado: chr  "guarani" "guarani" "guarani" "callathelys" ...
 $ longitude    : num  -57.2 -56.3 -57.3 -60.1 -55.8 ...
 $ latitude     : num  -25.9 -25.8 -25.6 -14.9 -20.4 ...
trops_dados$nome_revisado <- as.factor(trops_dados$nome_revisado)
str(trops_dados)
'data.frame':   44 obs. of  3 variables:
 $ nome_revisado: Factor w/ 9 levels "callathelys",..: 3 3 3 1 7 7 7 7 7 7 ...
 $ longitude    : num  -57.2 -56.3 -57.3 -60.1 -55.8 ...
 $ latitude     : num  -25.9 -25.8 -25.6 -14.9 -20.4 ...
# Determinando limites da distribuição de Tropidurus
distribuicao <- c(min(trops_dados$longitude, na.rm = T)-2,
            min(trops_dados$latitude, na.rm = T)-2,
            max(trops_dados$longitude, na.rm = T)+2,
            max(trops_dados$latitude, na.rm = T)+2)
head(distribuicao)
[1] -66.37000 -31.50000 -50.16453 -12.77000
# Carregando dados de mapa mundial
mundo <- map_data("world")
class(mundo)
[1] "data.frame"
str(mundo)
'data.frame':   99338 obs. of  6 variables:
 $ long     : num  -69.9 -69.9 -69.9 -70 -70.1 ...
 $ lat      : num  12.5 12.4 12.4 12.5 12.5 ...
 $ group    : num  1 1 1 1 1 1 1 1 1 1 ...
 $ order    : int  1 2 3 4 5 6 7 8 9 10 ...
 $ region   : chr  "Aruba" "Aruba" "Aruba" "Aruba" ...
 $ subregion: chr  NA NA NA NA ...
# Destacando países da América do Sul
sa <- c("Brazil", "Argentina", "Chile", "Uruguay", "Paraguay", "Ecuador", "Peru", "Venezuela", "Colombia", "Bolivia", "French Guiana", "Suriname", "Guyana")
mapa_sa <- map_data("world", region = sa)

# Plotando distribuição das espécies de Tropidurus no mapa da América do Sul
biomas <- read_biomes(year=2019, showProgress = FALSE)
head(biomas)
Simple feature collection with 6 features and 3 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: -73.98304 ymin: -33.75115 xmax: -28.84785 ymax: 5.269581
Geodetic CRS:  SIRGAS 2000
      name_biome code_biome year                           geom
1       Amazônia          1 2019 MULTIPOLYGON (((-44.08515 -...
2       Caatinga          2 2019 MULTIPOLYGON (((-41.7408 -2...
3        Cerrado          3 2019 MULTIPOLYGON (((-43.39009 -...
4 Mata Atlântica          4 2019 MULTIPOLYGON (((-48.70814 -...
5          Pampa          5 2019 MULTIPOLYGON (((-52.82472 -...
6       Pantanal          6 2019 MULTIPOLYGON (((-57.75946 -...
class(biomas)
[1] "sf"         "data.frame"
tropidurus_sa <- ggplot() +
  borders("world", fill = "lightgray", colour = "black")+
  geom_sf(data = slice(biomas, -c(2,4,5,7)),
          aes(fill = name_biome, alpha = 0.7)) +
  scale_fill_manual(values = terrain.colors(7)) +
  geom_point(data = trops_dados,
             aes(x = longitude,
                 y = latitude,
                 color = nome_revisado),
             size = 5,
             alpha = 0.5) +
  coord_sf(xlim = c(-90,-30), ylim = c(-40,15)) +
  theme(legend.position = c(0.8, 0.9),
        legend.background = element_blank(), 
        legend.text = element_text(size = 18),
        legend.spacing.y = unit(0.35, 'cm'),
        axis.text.x = element_text(size = 18),
        axis.text.y = element_text(size = 18),
        panel.grid.major = element_line(color = "darkgray",
                                        linetype = "dashed",
                                        size = 0.5), 
        panel.background = element_rect(fill = "aliceblue"),
        axis.title = element_blank()) +
  guides(color = guide_legend(override.aes = list(size = 10),
                              nrow = 3,
                              title = "Tropidurus",
                              title.theme = element_text(face = "italic",
                                                         size = 18),
                              label.theme = element_text(face = "italic",
                                                         size = 18)
                              ),
         fill = guide_legend(nrow = 3,
                             byrow = TRUE,
                             title = "Biomas",
                             title.theme = element_text(size = 18)),
         alpha = "none",
         size = "none") +
 scalebar(biomas, location = "bottomright", dist = 500, dist_unit = "km",
           transform = TRUE, model = "WGS84", st.size = 5) +
 annotation_north_arrow(which_north = "true", location = "br",
                          height = unit(2, "cm"), width = unit(2, "cm"),
                        style = north_arrow_orienteering(text_size = 14)
                        ) +
  annotate("rect", xmin = distribuicao[1], xmax = distribuicao[3],
                          ymin = distribuicao[2], ymax = distribuicao[4],
           color = "red", fill = "transparent"
           ) 
Warning: The `size` argument of `element_line()` is deprecated as of ggplot2 3.4.0.
i Please use the `linewidth` argument instead.
tropidurus_sa

# Verificando quais cores foram utilizadas no mapa
cores <- terrain.colors(7)
show_col(cores)

# "#00A600" "#63C600" "#E6E600" "#E9BD3A" "#ECB176" "#EFC2B3" "#F2F2F2"

# Plotando segundo mapa, agora limitando ao entorno dos limites da distribuição dos pontos
tropidurus_sa2 <- ggplot() +
  borders("world", fill = "lightgray", colour = "black")+
  geom_sf(data = slice(biomas, -c(1,2,3,4,5,7)),
          aes(fill = name_biome),
          fill = "#E6E600"
          ) +
  geom_point(data = trops_dados,
             aes(x = longitude,
                 y = latitude,
                 color = nome_revisado),
             size = 7,
             alpha = 0.5) +
  coord_sf(xlim = distribuicao[c(1,3)], ylim = distribuicao[c(2,4)]) +
  theme(axis.text.x = element_text(size = 20),
        axis.text.y = element_text(size = 20),
        panel.grid.major = element_line(color = "darkgray",
                                        linetype = "dashed",
                                        size = 0.5),
        axis.title = element_blank(),
        legend.position = "none",
        ) +
 scalebar(trops_dados, location = "bottomright", dist = 100, dist_unit = "km",
           transform = TRUE, model = "WGS84", st.size = 5)
tropidurus_sa2

# Combinando os dois plots
tropidurus_sa_final <- ggarrange(tropidurus_sa, tropidurus_sa2,
          common.legend = TRUE,
          ncol = 1)
tropidurus_sa_final

Vamos fazer outro mapa de distribuição de Tropidurus, mas agora considerando todas as ecorregiões da América do Sul.

library(ggplot2)
library(rgdal)
library(ggspatial)
library(rnaturalearth)
library(sf)
library(cowplot)

# Carregando arquivo .shp com ecorregiões da América do Sul
eco_regions <- readOGR("C:/Users/User/OneDrive/manipulacao-visualizacao-dados-r/tm_ecoregions/tm_ecoregions_2017.shp")
OGR data source with driver: ESRI Shapefile 
Source: "C:\Users\User\OneDrive\manipulacao-visualizacao-dados-r\tm_ecoregions\tm_ecoregions_2017.shp", layer: "tm_ecoregions_2017"
with 847 features
It has 12 fields
class(eco_regions)
[1] "SpatialPolygonsDataFrame"
attr(,"package")
[1] "sp"
eco_regions_sa <- subset(eco_regions, REALM == "Neotropic")
eco_regions_sa_df <- fortify(eco_regions_sa, region ="BIOME_NAME")
head(eco_regions_sa_df)
       long       lat order  hole piece                         id
1 -80.88935 -5.191561     1 FALSE     1 Deserts & Xeric Shrublands
2 -80.87538 -5.214124     2 FALSE     1 Deserts & Xeric Shrublands
3 -80.85819 -5.241217     3 FALSE     1 Deserts & Xeric Shrublands
4 -80.84532 -5.262651     4 FALSE     1 Deserts & Xeric Shrublands
5 -80.83588 -5.287350     5 FALSE     1 Deserts & Xeric Shrublands
6 -80.82207 -5.315487     6 FALSE     1 Deserts & Xeric Shrublands
                         group
1 Deserts & Xeric Shrublands.1
2 Deserts & Xeric Shrublands.1
3 Deserts & Xeric Shrublands.1
4 Deserts & Xeric Shrublands.1
5 Deserts & Xeric Shrublands.1
6 Deserts & Xeric Shrublands.1
?ne_countries # objeto world com todos os países
world <- ne_countries(scale = "medium", returnclass = "sf")
world_SA <- subset(world, continent == "South America")

# Plotando mapa da distribuição com ecorregiões do continente
tropidurus_sa_ecoregions <- ggplot() +
  geom_spatial_polygon(data = eco_regions_sa_df,
                       aes(x = long, y = lat,
                           group = group, fill = id),
                       alpha = 1, linetype = 1) +
  scale_fill_rickandmorty() +
  geom_sf(data = world_SA, fill= NA, size = 0.5) +
  geom_point(data = trops_dados,
             aes(x = longitude,
                 y = latitude,
                 color = nome_revisado),
             size = 4,
             alpha = 0.8) +
  annotation_north_arrow(location = "tr",
                         which_north = "true",
                         pad_x = unit(0.3, "in"),
                         pad_y = unit(0.35, "in"),
                         height = unit(2, "cm"),
                         width = unit(2, "cm"),
                         style = north_arrow_orienteering(text_size = 18)
                         ) +
  scalebar(world_SA,
           transform = TRUE,
           dist = 500,
           dist_unit = "km",
           location = "bottomright",
           box.fill = c("black", "white"),
           st.color = "black",
           height = 0.005,
           st.size = 6) +
  coord_sf(xlim = c(-120, -26.24139),
           ylim = c(-58.49861, 12.59028),
           expand = FALSE) +
  theme(panel.grid.major = element_line(color = gray(.5),
                                        linetype = "dashed",
                                        size = 0.5),
        panel.background = element_rect(fill = "aliceblue"),
        axis.title.x = element_blank(),
        axis.title.y = element_blank(),
        axis.text.x = element_text(size = 18),
        axis.text.y = element_text(size = 18),
        legend.position = "right",
        legend.background = element_blank(),
        legend.key = element_blank(),
        legend.spacing.y = unit(0.5, 'cm'),
        legend.justification = c("left", "bottom"),
        legend.box.just = "left"
        ) +
  guides(color = guide_legend(nrow = 3,
                              title = "Tropidurus",
                              title.theme = element_text(face = "italic",
                                                         size = 18),
                              label.theme = element_text(face = "italic",
                                                         size = 18)
                              ),
         fill = guide_legend(nrow = 12,
                             byrow = TRUE,
                             title = "Ecorregiões da América do Sul",
                             title.theme = element_text(face = "bold",
                                                        size = 18),
                             label.theme = element_text(size = 18)
                             )
  ) +
  annotate(geom = "point",
           x = trops_dados$longitude,
           y = trops_dados$latitude,
           size = 5, shape = 21,
           fill = "transparent", color = "black") +
  annotate("rect", xmin = distribuicao[1], xmax = distribuicao[3],
           ymin = distribuicao[2], ymax = distribuicao[4],
           size = 2, color = "red", fill = "transparent"
           ) 
tropidurus_sa_ecoregions

# Plotando segundo mapa, agora limitando ao entorno dos limites da distribuição dos pontos
tropidurus_sa_ecoregions2 <- ggplot() +
  geom_spatial_polygon(data = eco_regions_sa_df,
                       aes(x = long, y = lat,
                           group = group, fill = id),
                       alpha = 1, linetype = 1) +
  scale_fill_rickandmorty() +
  geom_sf(data = world_SA, fill= NA, size = 0.5) +
  geom_point(data = trops_dados,
             aes(x = longitude,
                 y = latitude,
                 color = nome_revisado),
             size = 7,
             alpha = 0.8) +
  coord_sf(xlim = distribuicao[c(1,3)], ylim = distribuicao[c(2,4)]) +
  theme(axis.title.x = element_blank(),
        axis.title.y = element_blank(),
        axis.text.x = element_text(size = 22),
        axis.text.y = element_text(size = 22),
        legend.position = "none"
        ) +
  annotate(geom = "point", x = trops_dados$longitude,
           y = trops_dados$latitude,
           size = 7, shape = 21,
           fill = "transparent", color="black") +
  scalebar(trops_dados,
           transform = TRUE,
           dist = 100,
           dist_unit = "km",
           location = "topright",
           box.fill = c("black", "white"),
           st.color = "black",
           height = 0.005,
           st.size = 4)
tropidurus_sa_ecoregions2

# Combinando os dois plots
tropidurus_sa_ecorregions_final <- ggarrange(tropidurus_sa_ecoregions,
                                             tropidurus_sa_ecoregions2,
                                             ncol = 1)
tropidurus_sa_ecorregions_final

Agora vamos criar um novo mapa, plotando a distribuição das espécies sobre uma camada de dados ambientais do WorldClim

# Carregando pacotes
library(terra)

# Baixando dados de altitude no seu diretório
# download.file("http://www.dpi.inpe.br/amb_data/AmericaSul/SAmerica_WCLIM.zip", destfile = "SAmerica_WCLIM.zip") # necessário unzipar arquivo de destino

# Importando dados de altitude
alt_data <- rast('C:/Users/User/OneDrive/manipulacao-visualizacao-dados-r/sa_wclim/alt.asc')
class(alt_data)
[1] "SpatRaster"
attr(,"package")
[1] "terra"
plot(alt_data)

# Convertendo dados de altitude em data.frame
alt_df <- as.data.frame(alt_data, xy = T)
range(alt_df$alt)
[1]  -70 6269
# Cortando dados de altitude de acordo com limites de distribuição de Tropidurus
ext <- c(-70,-50, -31,-14) # Para alguma localização específica
alt_tropidurus <- crop(alt_data, ext)
plot(alt_tropidurus) # visualizando apenas para ver se deu certo

# Convertendo em data.frame
alt_tropidurus_df <- as.data.frame(alt_tropidurus, xy = T)
head(alt_tropidurus_df)
          x         y  alt
1 -69.97820 -14.01868 4473
2 -69.93653 -14.01868 4508
3 -69.89486 -14.01868 4275
4 -69.85319 -14.01868 4074
5 -69.81152 -14.01868 3093
6 -69.76985 -14.01868 2692
plot_sa <- ggplot() +
  geom_tile(data = alt_df, aes(x, y, fill = alt)) +
  scale_fill_gradientn(colours = rainbow(7),
                       limits = c(-100, 6500),
                       breaks = c(-100, 1000 ,2000, 3000, 4000, 5000, 6000)
                       ) +
  geom_point(data = trops_dados,
             aes(x = longitude,
                 y = latitude,
                 color = nome_revisado),
             size = 8,
             alpha = 0.75) +
  scale_color_brewer(palette = 'Set3') +
  theme_bw() +
  theme(axis.text.x = element_text(size = 28),
        axis.text.y = element_text(size = 28), 
        panel.background = element_blank(),
        axis.title.x = element_blank(),
        axis.title.y = element_blank()
        ) +
  guides(color = guide_legend(override.aes = list(size = 16),
                              nrow = 3,
                              title = "Tropidurus",
                              title.theme = element_text(face = "italic",
                                                         size = 28),
                              label.theme = element_text(face = "italic",
                                                         size = 28)
                              ),
         fill = guide_colourbar(title = "Elevação (m)",
                                title.theme = element_text(size = 28),
                                label.theme = element_text(size = 28),
                                barwidth = 0.5,
                                barheight = 40
                              ),
         alpha = "none",
         size = "none"
         ) +
  annotation_north_arrow(which_north = "true", location = "bl",
                          height = unit(3, "cm"), width = unit(3, "cm"),
                        style = north_arrow_orienteering(text_size = 18)
                        ) +
  coord_fixed()
plot_sa
Warning in draw_panel(...): True north is not meaningful without coord_sf()

# Também é possível adicionar uma camada com os limites da distribuição:
# coord_fixed(xlim = distribuicao[c(1,3)], ylim = distribuicao[c(2,4)])