library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.3     v purrr   0.3.4
## v tibble  3.1.6     v dplyr   1.0.7
## v tidyr   1.1.3     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(readxl)
perc_COBERTURA <- read_excel("C:/Users/diego/Documents/CORONA VIRUS/ANALISE_COBERTURA/perc_COBERTURA.xlsx")
df1<-perc_COBERTURA %>% 
  pivot_longer(cols = -c(code_state))

Including Plots

You can also embed plots, for example:

G1<-ggplot (df1, aes (code_state, value, fill = code_state)) +
  geom_col(position = "dodge")+
  facet_wrap(vars(name), scales = "free", nrow = 4, strip.position = "top")+
  theme(axis.line = element_line(size = 0.7),
        axis.ticks = element_line(size = 0.3),
        axis.text = element_text(size = 6, colour = "black"),
        legend.background = element_rect(colour = "black"),
        legend.position = "none")+
  labs(title  =  'Vacina',x  =  'doses', y  =  '%',
       subtitle = "Populaçao Acima de 10 anos")
perc_COBERTURA_mapa <- read_excel("C:/Users/diego/Documents/CORONA VIRUS/ANALISE_COBERTURA/perc_COBERTURA_mapa.xlsx")
library(geobr)
## Loading required namespace: sf
## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_FileGDB.dll
## 126: Não foi possível encontrar o módulo especificado.

## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_FileGDB.dll
## 126: Não foi possível encontrar o módulo especificado.
## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_MSSQLSpatial.dll
## 126: Não foi possível encontrar o módulo especificado.

## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_MSSQLSpatial.dll
## 126: Não foi possível encontrar o módulo especificado.
## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_OCI.dll
## 126: Não foi possível encontrar o módulo especificado.

## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_OCI.dll
## 126: Não foi possível encontrar o módulo especificado.
## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_PG.dll
## 126: Não foi possível encontrar o módulo especificado.

## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_PG.dll
## 126: Não foi possível encontrar o módulo especificado.
## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_FileGDB.dll
## 126: Não foi possível encontrar o módulo especificado.

## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_FileGDB.dll
## 126: Não foi possível encontrar o módulo especificado.
## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_MSSQLSpatial.dll
## 126: Não foi possível encontrar o módulo especificado.

## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_MSSQLSpatial.dll
## 126: Não foi possível encontrar o módulo especificado.
## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_OCI.dll
## 126: Não foi possível encontrar o módulo especificado.

## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_OCI.dll
## 126: Não foi possível encontrar o módulo especificado.
## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_PG.dll
## 126: Não foi possível encontrar o módulo especificado.

## Warning in CPL_gdal_init(): GDAL Error 1: Can't load requested DLL: C:\Program Files\GeoDa Software\ogr_PG.dll
## 126: Não foi possível encontrar o módulo especificado.
geo_ufs <- geobr::read_state(code_state = 'all', year = 2018)
## Using year 2018
## Loading data for the whole country
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |===                                                                   |   4%
  |                                                                            
  |=====                                                                 |   7%
  |                                                                            
  |========                                                              |  11%
  |                                                                            
  |==========                                                            |  15%
  |                                                                            
  |=============                                                         |  19%
  |                                                                            
  |================                                                      |  22%
  |                                                                            
  |==================                                                    |  26%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |==========================                                            |  37%
  |                                                                            
  |=============================                                         |  41%
  |                                                                            
  |===============================                                       |  44%
  |                                                                            
  |==================================                                    |  48%
  |                                                                            
  |====================================                                  |  52%
  |                                                                            
  |=======================================                               |  56%
  |                                                                            
  |=========================================                             |  59%
  |                                                                            
  |============================================                          |  63%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |====================================================                  |  74%
  |                                                                            
  |======================================================                |  78%
  |                                                                            
  |=========================================================             |  81%
  |                                                                            
  |============================================================          |  85%
  |                                                                            
  |==============================================================        |  89%
  |                                                                            
  |=================================================================     |  93%
  |                                                                            
  |===================================================================   |  96%
  |                                                                            
  |======================================================================| 100%
geo_ufs1<-geo_ufs %>%  inner_join(perc_COBERTURA_mapa, by="code_state")

Including Plots

You can also embed plots, for example:

G2<-ggplot(geo_ufs1) +
  geom_sf(aes(geometry = geom, fill = PERC_PRIMEIRA)) +
  scale_colour_brewer()+
  theme(axis.text = element_blank(),
        axis.ticks = element_blank(),
        legend.position = "top") + 
  labs(title="Vacinaçao em maiores de 10 anos",
       caption='Dados 25/11/2021', size=6,
       fill="Primeira dose")+
  theme_minimal()
G4<-ggplot(geo_ufs1) +
  geom_sf(aes(geometry = geom, fill = PERC_TERCEIRA)) +
  scale_colour_brewer()+
  theme(axis.text = element_blank(),
    axis.ticks = element_blank(),
    legend.position = "top") + 
  labs(title="Vacinaçao em maiores de 10 anos",
       caption='Dados 25/11/2021', size=6,
       fill="Dose reforço")+
   theme_minimal()
library(patchwork)
(G2 | G3 | G4) /
  G1