Usando os dados antigos ainda para consolidar resultados

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

Aqui temos os municípios segundo seu balanço de RL em grandes propriedades. Aqui tive um pouco de trablaho para pensar nas categorias pois o balanço é 20% e a distribuição não fica uniforme. Então usei a seguinte regra: use uma categoria de “nearly bananced” dando um desocnto de 20% na percentagem de floresta (por isso o intervalo de -4 a 4, porque zero é de 20%). Ainda não aliquei o novo métido que discutimos sobre ter valores entre 0 e 5 (sendo 1 = balanço 20%)

caat_muni %>% 
  select(PA_GP_perc, geom) %>% 
  mutate(category=cut(PA_GP_perc, breaks=c(-Inf, -4, 4, 20, Inf), 
                      labels=c("Negative <16%","Balanced (16-24%)","Positive (24-40%)", "Very positive (>40%")))->RL_grand
summary(RL_grand)
##    PA_GP_perc                 geom                    category  
##  Min.   :-20.000   MULTIPOLYGON :807   Negative <16%      :793  
##  1st Qu.:-16.960   POLYGON      :429   Balanced (16-24%)  :136  
##  Median : -9.915   epsg:4674    :  0   Positive (24-40%)  :176  
##  Mean   : -4.444   +proj=long...:  0   Very positive (>40%:117  
##  3rd Qu.:  2.710                       NA's               : 14  
##  Max.   :105.730                                                
##  NA's   :14
RL_grand<-filter(RL_grand, !is.na(category)) #restirar uns NAs
ggplot()+  geom_sf(data=RL_grand$geom, aes(fill = RL_grand$category), lwd = 0)+
  scale_fill_brewer(palette="RdYlBu",drop = FALSE)+
  geom_sf(data=uf_caat, fill="transparent")+
  coord_sf(expand = FALSE)+
  labs(subtitle="Large properties", fill = "Balance of vegetation")+
  theme_bw()+
  theme(legend.position = "right")->g.bal.g
#theme_map()
#theme(legend.position = "none")
g.bal.g

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

Proporção de terras em mãos de pequenos e grandes proprietários. A maori das terras está com os GRANDES, claro.

caat_muni %>% 
  mutate(share_PP = areaTotalG_ha/areaTotalP_ha) %>% 
  mutate(share_qq = cut(share_PP, breaks = c(-Inf, 0.8 ,1.2 , Inf),
                        labels=c("More land with small-holders","Nearly balanced","More land with large-holders")))->share.land
share.land %>% 
  summarise_at(c("areaTotalG_ha","areaTotalP_ha"), sum)
##   areaTotalG_ha areaTotalP_ha
## 1      50910807      38278650
ggplot()+ geom_sf(data=share.land$geom, aes(fill = log(share.land$share_PP)), lwd = 0)+ # se quisermos ver continuo usar essa linha e comentar a de baixo
  #geom_sf(data=share.land$geom, aes(fill = share.land$share_qq), lwd = 0)+ # se quiser usar categproico, usar essa e deixar comentada a de cima
  scale_fill_gradient(low = "yellow", high = "red", na.value = NA)+ # para continuo
  #scale_fill_manual(values=c('#7fc97f','#beaed4','#fdc086'),drop = FALSE)+ # color para categorico
  geom_sf(data=uf_caat, fill="transparent")+
  coord_sf(expand = FALSE)+
  labs(subtitle="Share of land between large and small holders",fill = "Ratio LP/SM")+
  theme_bw()+
  theme(legend.position = "right")-> g.share.land # zero é balanço e vamos que tam muito mais área em GP
g.share.land

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)