I've read in many places how to create a LISA map, but I'm not really understanding the process. I already have the SHAPEFILE and the DATA SET together, I would like to know how do I get a figure of the following type using the "Incidência da COVID-19" variable resulted after I "full_joined" to variable "Data".
--------- Packages -------------------------------
setwd("C:/Users/lucas/Desktop/Relatório Final FAPESP")
if (!require("geobr")) install.packages("geobr")
if (!require("tidyverse")) install.packages("tidyverse")
if (!require("ggspatial")) install.packages("ggspatial")
if (!require("magrittr")) install.packages("magrittr")
if (!require("lubridate")) install.packages("lubridate")
if (!require("readxl")) install.packages("readxl")
library(readxl)
library(geobr)
library(tidyverse)
library(ggspatial)
library(magrittr)
library(lubridate)
--------- Shape File ------------------------------
SP.Municipios <- read_municipality(code_muni = "all",year=2019) %>%
filter(code_state == 35) %>%
select(-c("code_state","abbrev_state","code_region","name_region","name_state")) %>%
rename(Municípios = name_muni)
ggplot(SP.Municipios) +
geom_sf()
--------- Data Set -----------------------------
Data.Raw <- read_excel("Base.xlsx")
Total.Data <- full_join(Data.Raw, SP.Municipios, by = "Municípios")
Data <- Total.Data[c(-644,-645),]
------------------------------------
the DATA is like this:
Can anyone help me with this? I don't think it's that difficult, but unfortunately I don't understand what I have to do. If anyone needs the database, let me know.