Graficos descritivos
Porcentagem de caatinga
Esse gráfico é exatamento igual ao anterior, só estou colocando aqui porque prefiro tê-los num script do R
caat_muni %>%
select(PERCVEG, geom) %>%
mutate(category=cut(PERCVEG, breaks=c(0, 20, 40, 60, 80, 100),
labels=c("<20%","20-40%","40-60%","60-80%", ">80%")))->perc_veg
ggplot()+ geom_sf(data=perc_veg$geom, aes(fill = perc_veg$category), lwd = 0)+
scale_fill_brewer(palette="RdYlBu")+
geom_sf(data=uf_caat, fill="transparent")+
coord_sf(expand = FALSE)+
labs(subtitle="Forest cover", size=8, fill = "Percentage of vegetation")+
theme_bw()+
theme(legend.position = "bottom")-> g.bal.total
#theme_map()
#theme(legend.position = "none")
g.bal.total

Balanco RL GRANDES PROPRIEDADES
Balanco RL Pequenas propriedades
Aqui temos os municípios segundo seu balanço de RL em PEQUENAS propriedades. Usando as mesmas regras anteriores
caat_muni %>%
select(PA_PP_perc, geom) %>%
mutate(category=cut(PA_PP_perc, breaks=c(-Inf,-4, 4, 20, Inf),
labels=c("Negative <16%","Balanced (16-24%)","Positive (24-40%)", "Very positive (>40%")))->RL_peq
ggplot()+ geom_sf(data=RL_peq$geom, aes(fill = RL_peq$category), lwd = 0)+
scale_fill_brewer(palette="RdYlBu",drop = FALSE)+
geom_sf(data=uf_caat, fill="transparent")+
coord_sf(expand = FALSE)+
labs(subtitle="Small properties",fill = "Balance of vegetation")+
theme_bw()+
theme(legend.position = "right")-> g.bal.p
#theme_map()
#theme(legend.position = "none")
g.bal.p

Agora podemos juntar numa figura única que podemos usar no artigo. Imaginei que poderia ser legal mostrar esses dados em trÊs níveis. 1) Munícipio, 2) PG e 3) PP. So precisamos editar a legenda depois, retirando uma das repetidas.´
a<-plot_grid(g.bal.p, g.bal.g, nrow=2)
b<-plot_grid(g.bal.total, a, ncol=2)
b

Proporção de florestas em mãos de pequenos e grandes proprietários
caat_muni %>%
mutate(perc_caat_mun = (AREAMUN_C/AREAMUN_T)*100) %>%
#filter( perc_caat_mun>0.8) %>%
mutate(share_veg = (areaVegG_ha/areaVegP_2017)) %>%
mutate(share_veg_qq = cut(share_veg, breaks = c(-Inf, 0.8 ,1.2 , Inf),
labels=c("More forest with small-holders","Nearly balanced","More forest with large-holders")))->perc.share.veg
perc.share.veg %>%
summarise_at(c("areaVegG_ha","areaVegP_2017"), sum)
## areaVegG_ha areaVegP_2017
## 1 7698744 8732883
col.palete<-c('#fee8c8','#fdbb84','#e34a33')
ggplot()+ geom_sf(data=perc.share.veg$geom, aes(fill = perc.share.veg$share_veg_qq), lwd = 0)+
scale_fill_manual(values = col.palete)+
geom_sf(data=uf_caat, fill="transparent")+
coord_sf(expand = FALSE)+
labs(subtitle="% of...",fill = "Share of Caatinga")+
theme_bw()+
theme(legend.position = "right")-> g.perc.veg
g.perc.veg

Vizualizando a quantidade de floresta r terra por caegoria de PP
caat_muni %>%
mutate(perc_caat_mun = AREAMUN_C/AREAMUN_T) %>%
filter( perc_caat_mun>0.8) %>% # aplicamos um filtro para selcionar municípios com mais de 80% de Caatinga
mutate(share_veg = areaVegP_2017/(areaVegP_2017+areaVegG_ha)) %>% # % de vegetação em PP
mutate(share_veg_qq = cut(share_veg, breaks = c(0, 0.2 ,0.4, 0.6, 0.8 , 1)))->share.veg
nrow(share.veg)# 1061 municípios
## [1] 1061
summary(share.veg$share_veg)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.0000 0.3480 0.6207 0.5990 0.8869 1.0000 29
col.palete<-c('#fee8c8','#fdbb84','#e34a33')
ggplot()+ geom_sf(data=share.veg$geom, aes(fill = share.veg$share_veg), lwd = 0)+
scale_fill_gradient(low = "yellow", high = "red", na.value = NA)+
geom_sf(data=uf_caat, fill="transparent")+
coord_sf(expand = FALSE)+
labs(subtitle="Share of forest between large and small private properties area",fill = "Ratio LP/SM")+
theme_bw()+
theme(legend.position = "right")-> g.share.veg
g.share.veg

plot_grid(g.share, g.share.veg, nrow = 2)
