en este cuaderno se presenta el area que contiene el municipio Inirida y los 8 corregimientos del departamento de Guainia, los datos fueron tomados del DANE y de del EVA, se mostrata la distribucion de los mejores cultivos de Guainia, los cuales son la Yuca y el Patano.
library(ggplot2)
library(sf)
## Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v tibble 3.1.0 v dplyr 1.0.5
## v tidyr 1.1.3 v stringr 1.4.0
## v readr 1.4.0 v forcats 0.5.1
## v purrr 0.3.4
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(dplyr)
cultivos<- read.table(file = "Evaluaciones_Agropecuarias_Municipales_EVA.csv",header = T, sep = ";")
eva_guainia <- filter(cultivos, DEPARTAMENTO == "GUAINIA")
se modifican los encabezados para poder manejar mejor la informacion
names(eva_guainia)<- c("ID","Departamentos","CA_Municipio","Municipio","Grupo_de_cultivo","subgrupo_de_cultivo","Cultivo","Desagregacia regional y/o sistema productivo","Ano","Periodo","Area_cultivadas_ha","Area cosechada","Produccion_T","Rendimiento","Estado_fisico poduccion","Nombre_cientifico","ciclo_de_cultivo")
head(eva_guainia)
## ID Departamentos CA_Municipio Municipio Grupo_de_cultivo subgrupo_de_cultivo
## 1 94 GUAINIA 94001 INIRIDA FRUTALES AGUACATE
## 2 94 GUAINIA 94001 INIRIDA FRUTALES AGUACATE
## 3 94 GUAINIA 94001 INIRIDA FRUTALES AGUACATE
## 4 94 GUAINIA 94001 INIRIDA HORTALIZAS AHUYAMA
## 5 94 GUAINIA 94001 INIRIDA HORTALIZAS AHUYAMA
## 6 94 GUAINIA 94001 INIRIDA HORTALIZAS AHUYAMA
## Cultivo Desagregacia regional y/o sistema productivo Ano Periodo
## 1 AGUACATE AGUACATE 2014 2014
## 2 AGUACATE AGUACATE 2015 2015
## 3 AGUACATE AGUACATE 2016 2016
## 4 AHUYAMA AHUYAMA 2014 2014A
## 5 AHUYAMA AHUYAMA 2014 2014B
## 6 AHUYAMA AHUYAMA 2015 2015A
## Area_cultivadas_ha Area cosechada Produccion_T Rendimiento
## 1 1 0 0
## 2 1 1 1 1,5
## 3 1 1 1 1,5
## 4 3 2 30 13,2
## 5 2 1 12 12
## 6 3 3 42 13,2
## Estado_fisico poduccion Nombre_cientifico ciclo_de_cultivo
## 1 FRUTO FRESCO PERSEA AMERICANA MILL. PERMANENTE
## 2 FRUTO FRESCO PERSEA AMERICANA MILL. PERMANENTE
## 3 FRUTO FRESCO PERSEA AMERICANA MILL. PERMANENTE
## 4 HORTALIZA FRESCA CUCURBITA MOSHATA TRANSITORIO
## 5 HORTALIZA FRESCA CUCURBITA MOSHATA TRANSITORIO
## 6 HORTALIZA FRESCA CUCURBITA MOSHATA TRANSITORIO
tail(eva_guainia)
## ID Departamentos CA_Municipio Municipio Grupo_de_cultivo
## 157 94 GUAINIA 94343 BARRANCO MINA TUBERCULOS Y PLATANOS
## 158 94 GUAINIA 94886 CACAHUAL TUBERCULOS Y PLATANOS
## 159 94 GUAINIA 94883 SAN FELIPE TUBERCULOS Y PLATANOS
## 160 94 GUAINIA 94001 INIRIDA TUBERCULOS Y PLATANOS
## 161 94 GUAINIA 94888 MORICHAL TUBERCULOS Y PLATANOS
## 162 94 GUAINIA 94888 MORICHAL TUBERCULOS Y PLATANOS
## subgrupo_de_cultivo Cultivo Desagregacia regional y/o sistema productivo
## 157 YUCA YUCA YUCA INDUSTRIAL
## 158 YUCA YUCA YUCA INDUSTRIAL
## 159 YUCA YUCA YUCA INDUSTRIAL
## 160 YUCA YUCA YUCA INDUSTRIAL
## 161 YUCA YUCA YUCA INDUSTRIAL
## 162 YUCA YUCA YUCA INDUSTRIAL
## Ano Periodo Area_cultivadas_ha Area cosechada Produccion_T Rendimiento
## 157 2016 2016 658 658 6583 10
## 158 2016 2016 226 220 22 10
## 159 2016 2016 69 69 685 10
## 160 2016 2016 38 38 764 20
## 161 2017 2017 120 120 12 10
## 162 2018 2018 100 100 1 10
## Estado_fisico poduccion Nombre_cientifico ciclo_de_cultivo
## 157 TUBERCULO FRESCO MANIHOT ESCULENTA ANUAL
## 158 TUBERCULO FRESCO MANIHOT ESCULENTA ANUAL
## 159 TUBERCULO FRESCO MANIHOT ESCULENTA ANUAL
## 160 TUBERCULO FRESCO MANIHOT ESCULENTA ANUAL
## 161 TUBERCULO FRESCO MANIHOT ESCULENTA ANUAL
## 162 TUBERCULO FRESCO MANIHOT ESCULENTA ANUAL
se ingresas el shp. de Guainia, proporcionado por el DANE
muni_guainia<- sf::read_sf ("94_GUAINIA/ADMINISTRATIVO/MGN_MPIO_POLITICO.shp")
muni_guainia
## Simple feature collection with 9 features and 9 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -70.94249 ymin: 1.165633 xmax: -66.84722 ymax: 4.045026
## geographic CRS: WGS 84
## # A tibble: 9 x 10
## DPTO_CCDGO MPIO_CCDGO MPIO_CNMBR MPIO_CRSLC MPIO_NAREA MPIO_NANO DPTO_CNMBR
## <chr> <chr> <chr> <chr> <dbl> <int> <chr>
## 1 94 94001 INÍRIDA Decreto 159~ 15970. 2017 GUAINÍA
## 2 94 94343 BARRANCO M~ Resolución ~ 9468. 2017 GUAINÍA
## 3 94 94663 MAPIRIPANA ACUERDO COM~ 4928. 2017 GUAINÍA
## 4 94 94883 SAN FELIPE Resolución ~ 2926. 2017 GUAINÍA
## 5 94 94884 PUERTO COL~ Resolución ~ 15701. 2017 GUAINÍA
## 6 94 94885 LA GUADALU~ Resolución ~ 1179. 2017 GUAINÍA
## 7 94 94886 CACAHUAL Resolución ~ 2335. 2017 GUAINÍA
## 8 94 94887 PANÁ-PANÁ ~ Resolución ~ 10227. 2017 GUAINÍA
## 9 94 94888 MORICHAL (~ 1988 8555. 2017 GUAINÍA
## # ... with 3 more variables: Shape_Leng <dbl>, Shape_Area <dbl>,
## # geometry <POLYGON [°]>
identificamos las clases de datos y los campiamoss a numericos
class(muni_guainia$MPIO_CCDGO)
## [1] "character"
head(muni_guainia$MPIO_CCDGO)
## [1] "94001" "94343" "94663" "94883" "94884" "94885"
class(eva_guainia$CA_Municipio)
## [1] "integer"
muni_guainia$COD_MUN <- as.double(muni_guainia$MPIO_CCDGO)
class(muni_guainia$COD_MUN)
## [1] "numeric"
head(muni_guainia$COD_MUN)
## [1] 94001 94343 94663 94883 94884 94885
eva_guainia$COD_MUN<-as.double(eva_guainia$CA_Municipio)
class(eva_guainia$COD_MUN)
## [1] "numeric"
head(eva_guainia$COD_MUN)
## [1] 94001 94001 94001 94001 94001 94001
###Yuca la yuca es otro de los productos que hacen parte de la categoria tuberculos y platano se identificaa la produccion en toneladas en el año 2016 y 2010, para hacer una comparacion con el platano
Yuca_gaui <- eva_guainia %>% filter(Cultivo =="YUCA")%>%
dplyr::select(Municipio , COD_MUN , Ano , Periodo , Produccion_T, Rendimiento )
Yuca_gaui
## Municipio COD_MUN Ano Periodo Produccion_T Rendimiento
## 1 INIRIDA 94001 2007 2007 6458 6,43
## 2 INIRIDA 94001 2008 2008 9615 6,59
## 3 INIRIDA 94001 2009 2009 11249 8
## 4 INIRIDA 94001 201 2010 11932 8
## 5 INIRIDA 94001 2011 2011 3589 4,26
## 6 INIRIDA 94001 2012 2012 5112 4,54
## 7 INIRIDA 94001 2013 2013 5416 4,54
## 8 INIRIDA 94001 2014 2014 7735 6,5
## 9 BARRANCO MINA 94343 2014 2014 2205 5,8
## 10 INIRIDA 94001 2015 2015 442 6,5
## 11 BARRANCO MINA 94343 2015 2015 2262 5,8
## 12 INIRIDA 94001 2016 2016 15 15
## 13 BARRANCO MINA 94343 2016 2016 290 10
## 14 BARRANCO MINA 94343 2017 2017 699 10
## 15 INIRIDA 94001 2017 2017 464 10
## 16 CACAHUAL 94886 2017 2017 2 10
## 17 SAN FELIPE 94883 2017 2017 15 10
## 18 MORICHAL 94888 2017 2017 60 10
## 19 BARRANCO MINA 94343 2018 2018 712 10
## 20 INIRIDA 94001 2018 2018 5 10
## 21 CACAHUAL 94886 2018 2018 21 10
## 22 SAN FELIPE 94883 2018 2018 1 10
## 23 MORICHAL 94888 2018 2018 50 10
## 24 BARRANCO MINA 94343 2016 2016 6583 10
## 25 CACAHUAL 94886 2016 2016 22 10
## 26 SAN FELIPE 94883 2016 2016 685 10
## 27 INIRIDA 94001 2016 2016 764 20
## 28 MORICHAL 94888 2017 2017 12 10
## 29 MORICHAL 94888 2018 2018 1 10
unique(Yuca_gaui$Ano)
## [1] 2007 2008 2009 201 2011 2012 2013 2014 2015 2016 2017 2018
Yuca_gaui$Produccion_T<- as.numeric(Yuca_gaui$Produccion_T)
Yuca_gaui %>% replace ( is.na (.) ,0 ) -> Yuca_guai2
Yuca_gaui %>%
group_by( Municipio,COD_MUN,Ano) %>%
summarise(Produccion_T=sum(Produccion_T))->Yuca_guai2
## `summarise()` has grouped output by 'Municipio', 'COD_MUN'. You can override using the `.groups` argument.
head(Yuca_guai2)
## # A tibble: 6 x 4
## # Groups: Municipio, COD_MUN [2]
## Municipio COD_MUN Ano Produccion_T
## <chr> <dbl> <int> <dbl>
## 1 BARRANCO MINA 94343 2014 2205
## 2 BARRANCO MINA 94343 2015 2262
## 3 BARRANCO MINA 94343 2016 6873
## 4 BARRANCO MINA 94343 2017 699
## 5 BARRANCO MINA 94343 2018 712
## 6 CACAHUAL 94886 2016 22
Yuca_guai2 %>%
group_by(COD_MUN)%>%
gather("Produccion_T", key = variable, value = numero) %>%
unite(combi,variable,Ano)%>%
pivot_wider(names_from = combi, values_from = numero, values_fill = 0)->
Yuca_gaui3
Yuca_gaui3
## # A tibble: 5 x 14
## # Groups: COD_MUN [5]
## Municipio COD_MUN Produccion_T_2014 Produccion_T_2015 Produccion_T_2016
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 BARRANCO MINA 94343 2205 2262 6873
## 2 CACAHUAL 94886 0 0 22
## 3 INIRIDA 94001 7735 442 779
## 4 MORICHAL 94888 0 0 0
## 5 SAN FELIPE 94883 0 0 685
## # ... with 9 more variables: Produccion_T_2017 <dbl>, Produccion_T_2018 <dbl>,
## # Produccion_T_201 <dbl>, Produccion_T_2007 <dbl>, Produccion_T_2008 <dbl>,
## # Produccion_T_2009 <dbl>, Produccion_T_2011 <dbl>, Produccion_T_2012 <dbl>,
## # Produccion_T_2013 <dbl>
mun_Yuca_gaui<- left_join( muni_guainia , Yuca_gaui3 , by ="COD_MUN")
summary(mun_Yuca_gaui)
## DPTO_CCDGO MPIO_CCDGO MPIO_CNMBR MPIO_CRSLC
## Length:9 Length:9 Length:9 Length:9
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
##
## MPIO_NAREA MPIO_NANO DPTO_CNMBR Shape_Leng
## Min. : 1179 Min. :2017 Length:9 Min. :1.751
## 1st Qu.: 2926 1st Qu.:2017 Class :character 1st Qu.:4.030
## Median : 8555 Median :2017 Mode :character Median :6.826
## Mean : 7921 Mean :2017 Mean :5.903
## 3rd Qu.:10227 3rd Qu.:2017 3rd Qu.:7.805
## Max. :15970 Max. :2017 Max. :9.257
##
## Shape_Area geometry COD_MUN Municipio
## Min. :0.09434 POLYGON :9 Min. :94001 Length:9
## 1st Qu.:0.23461 epsg:4326 :0 1st Qu.:94663 Class :character
## Median :0.69179 +proj=long...:0 Median :94884 Mode :character
## Mean :0.63866 Mean :94702
## 3rd Qu.:0.82504 3rd Qu.:94886
## Max. :1.28699 Max. :94888
##
## Produccion_T_2014 Produccion_T_2015 Produccion_T_2016 Produccion_T_2017
## Min. : 0 Min. : 0.0 Min. : 0 Min. : 2.0
## 1st Qu.: 0 1st Qu.: 0.0 1st Qu.: 22 1st Qu.: 15.0
## Median : 0 Median : 0.0 Median : 685 Median : 72.0
## Mean :1988 Mean : 540.8 Mean :1672 Mean :250.4
## 3rd Qu.:2205 3rd Qu.: 442.0 3rd Qu.: 779 3rd Qu.:464.0
## Max. :7735 Max. :2262.0 Max. :6873 Max. :699.0
## NA's :4 NA's :4 NA's :4 NA's :4
## Produccion_T_2018 Produccion_T_201 Produccion_T_2007 Produccion_T_2008
## Min. : 1 Min. : 0 Min. : 0 Min. : 0
## 1st Qu.: 5 1st Qu.: 0 1st Qu.: 0 1st Qu.: 0
## Median : 21 Median : 0 Median : 0 Median : 0
## Mean :158 Mean : 2386 Mean :1292 Mean :1923
## 3rd Qu.: 51 3rd Qu.: 0 3rd Qu.: 0 3rd Qu.: 0
## Max. :712 Max. :11932 Max. :6458 Max. :9615
## NA's :4 NA's :4 NA's :4 NA's :4
## Produccion_T_2009 Produccion_T_2011 Produccion_T_2012 Produccion_T_2013
## Min. : 0 Min. : 0.0 Min. : 0 Min. : 0
## 1st Qu.: 0 1st Qu.: 0.0 1st Qu.: 0 1st Qu.: 0
## Median : 0 Median : 0.0 Median : 0 Median : 0
## Mean : 2250 Mean : 717.8 Mean :1022 Mean :1083
## 3rd Qu.: 0 3rd Qu.: 0.0 3rd Qu.: 0 3rd Qu.: 0
## Max. :11249 Max. :3589.0 Max. :5112 Max. :5416
## NA's :4 NA's :4 NA's :4 NA's :4
mapa de la poduccion en toneladas de la yYUca en el 2010
library(leaflet)
bins<- c(0,1492,2984,4476,5968,7460,8952,10444,11936)
pal <- colorBin("YlOrRd", domain = mun_Yuca_gaui$Produccion_T_201, bins = bins)
map<-leaflet(data = mun_Yuca_gaui)%>%
addTiles()%>%
addPolygons(label = ~Produccion_T_201,
popup = ~MPIO_CNMBR,
fillColor = ~ pal(Produccion_T_201),
color="#444444",
weight = 1,
smoothFactor = 0.5,
opacity = 1.0,
fillOpacity = 0.5,
highlightOptions = highlightOptions(color = "red",weight =2,bringToFront = TRUE )
)%>%
addProviderTiles(providers$OpenStreetMap)%>%
addLegend("bottomright", pal= pal, values = ~Produccion_T_201,
title = "Produccion en Toneladas de Yuca 2010 [Ton](DANE,2018)",opacity = 1)
map
mapa de la produccion en toneladas de la tuca en eñl 2016
library(leaflet)
bins<- c(0,860,1720,2580,3440,4300,5160,6020,6880)
pal <- colorBin("YlOrRd", domain = mun_Yuca_gaui$Produccion_T_2016, bins = bins)
map<-leaflet(data = mun_Yuca_gaui)%>%
addTiles()%>%
addPolygons(label = ~Produccion_T_2016,
popup = ~MPIO_CNMBR,
fillColor = ~ pal(Produccion_T_2016),
color="#444444",
weight = 1,
smoothFactor = 0.5,
opacity = 1.0,
fillOpacity = 0.5,
highlightOptions = highlightOptions(color = "red",weight =2,bringToFront = TRUE )
)%>%
addProviderTiles(providers$OpenStreetMap)%>%
addLegend("bottomright", pal= pal, values = ~Produccion_T_2016,
title = "Produccion en Toneladas de Yuca 2016 [Ton](DANE,2018)",opacity = 1)
map
###Area de siembra de la Yuca identificamos la area cultivada en los años 2010 y 2016
Yuca_gaui_hasem <- eva_guainia %>% filter(Cultivo =="YUCA")%>%
dplyr::select(Municipio , COD_MUN , Ano , Periodo , Produccion_T, Rendimiento,Area_cultivadas_ha)
Yuca_gaui_hasem
## Municipio COD_MUN Ano Periodo Produccion_T Rendimiento
## 1 INIRIDA 94001 2007 2007 6458 6,43
## 2 INIRIDA 94001 2008 2008 9615 6,59
## 3 INIRIDA 94001 2009 2009 11249 8
## 4 INIRIDA 94001 201 2010 11932 8
## 5 INIRIDA 94001 2011 2011 3589 4,26
## 6 INIRIDA 94001 2012 2012 5112 4,54
## 7 INIRIDA 94001 2013 2013 5416 4,54
## 8 INIRIDA 94001 2014 2014 7735 6,5
## 9 BARRANCO MINA 94343 2014 2014 2205 5,8
## 10 INIRIDA 94001 2015 2015 442 6,5
## 11 BARRANCO MINA 94343 2015 2015 2262 5,8
## 12 INIRIDA 94001 2016 2016 15 15
## 13 BARRANCO MINA 94343 2016 2016 290 10
## 14 BARRANCO MINA 94343 2017 2017 699 10
## 15 INIRIDA 94001 2017 2017 464 10
## 16 CACAHUAL 94886 2017 2017 2 10
## 17 SAN FELIPE 94883 2017 2017 15 10
## 18 MORICHAL 94888 2017 2017 60 10
## 19 BARRANCO MINA 94343 2018 2018 712 10
## 20 INIRIDA 94001 2018 2018 5 10
## 21 CACAHUAL 94886 2018 2018 21 10
## 22 SAN FELIPE 94883 2018 2018 1 10
## 23 MORICHAL 94888 2018 2018 50 10
## 24 BARRANCO MINA 94343 2016 2016 6583 10
## 25 CACAHUAL 94886 2016 2016 22 10
## 26 SAN FELIPE 94883 2016 2016 685 10
## 27 INIRIDA 94001 2016 2016 764 20
## 28 MORICHAL 94888 2017 2017 12 10
## 29 MORICHAL 94888 2018 2018 1 10
## Area_cultivadas_ha
## 1 1546
## 2 2492
## 3 1407
## 4 1491
## 5 842
## 6 1125
## 7 1192
## 8 1192
## 9 380
## 10 684
## 11 390
## 12 105
## 13 32
## 14 712
## 15 464
## 16 202
## 17 166
## 18 6
## 19 712
## 20 500
## 21 210
## 22 100
## 23 5
## 24 658
## 25 226
## 26 69
## 27 38
## 28 120
## 29 100
unique(Yuca_gaui_hasem $Ano)
## [1] 2007 2008 2009 201 2011 2012 2013 2014 2015 2016 2017 2018
Yuca_gaui_hasem$Area_cultivadas_ha<- as.numeric(Yuca_gaui_hasem$Area_cultivadas_ha)
Yuca_gaui_hasem %>% replace ( is.na (.) ,0 ) -> Yuca_gaui_hasem2
Yuca_gaui_hasem %>%
group_by( Municipio,COD_MUN,Ano) %>%
summarise(Area_cultivadas_ha=sum(Area_cultivadas_ha))->Yuca_gaui_hasem2
## `summarise()` has grouped output by 'Municipio', 'COD_MUN'. You can override using the `.groups` argument.
head(Yuca_gaui_hasem2)
## # A tibble: 6 x 4
## # Groups: Municipio, COD_MUN [2]
## Municipio COD_MUN Ano Area_cultivadas_ha
## <chr> <dbl> <int> <dbl>
## 1 BARRANCO MINA 94343 2014 380
## 2 BARRANCO MINA 94343 2015 390
## 3 BARRANCO MINA 94343 2016 690
## 4 BARRANCO MINA 94343 2017 712
## 5 BARRANCO MINA 94343 2018 712
## 6 CACAHUAL 94886 2016 226
Yuca_gaui_hasem2 %>%
group_by(COD_MUN)%>%
gather("Area_cultivadas_ha", key = variable, value = numero) %>%
unite(combi,variable,Ano)%>%
pivot_wider(names_from = combi, values_from = numero, values_fill = 0)->
Yuca_gaui_hasem3
Yuca_gaui_hasem3
## # A tibble: 5 x 14
## # Groups: COD_MUN [5]
## Municipio COD_MUN Area_cultivadas_ha~ Area_cultivadas_ha~ Area_cultivadas_h~
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 BARRANCO M~ 94343 380 390 690
## 2 CACAHUAL 94886 0 0 226
## 3 INIRIDA 94001 1192 684 143
## 4 MORICHAL 94888 0 0 0
## 5 SAN FELIPE 94883 0 0 69
## # ... with 9 more variables: Area_cultivadas_ha_2017 <dbl>,
## # Area_cultivadas_ha_2018 <dbl>, Area_cultivadas_ha_201 <dbl>,
## # Area_cultivadas_ha_2007 <dbl>, Area_cultivadas_ha_2008 <dbl>,
## # Area_cultivadas_ha_2009 <dbl>, Area_cultivadas_ha_2011 <dbl>,
## # Area_cultivadas_ha_2012 <dbl>, Area_cultivadas_ha_2013 <dbl>
mun_Yuca_gaui_hasem<- left_join( muni_guainia ,Yuca_gaui_hasem3 , by ="COD_MUN")
summary(mun_Yuca_gaui_hasem)
## DPTO_CCDGO MPIO_CCDGO MPIO_CNMBR MPIO_CRSLC
## Length:9 Length:9 Length:9 Length:9
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
##
## MPIO_NAREA MPIO_NANO DPTO_CNMBR Shape_Leng
## Min. : 1179 Min. :2017 Length:9 Min. :1.751
## 1st Qu.: 2926 1st Qu.:2017 Class :character 1st Qu.:4.030
## Median : 8555 Median :2017 Mode :character Median :6.826
## Mean : 7921 Mean :2017 Mean :5.903
## 3rd Qu.:10227 3rd Qu.:2017 3rd Qu.:7.805
## Max. :15970 Max. :2017 Max. :9.257
##
## Shape_Area geometry COD_MUN Municipio
## Min. :0.09434 POLYGON :9 Min. :94001 Length:9
## 1st Qu.:0.23461 epsg:4326 :0 1st Qu.:94663 Class :character
## Median :0.69179 +proj=long...:0 Median :94884 Mode :character
## Mean :0.63866 Mean :94702
## 3rd Qu.:0.82504 3rd Qu.:94886
## Max. :1.28699 Max. :94888
##
## Area_cultivadas_ha_2014 Area_cultivadas_ha_2015 Area_cultivadas_ha_2016
## Min. : 0.0 Min. : 0.0 Min. : 0.0
## 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 69.0
## Median : 0.0 Median : 0.0 Median :143.0
## Mean : 314.4 Mean :214.8 Mean :225.6
## 3rd Qu.: 380.0 3rd Qu.:390.0 3rd Qu.:226.0
## Max. :1192.0 Max. :684.0 Max. :690.0
## NA's :4 NA's :4 NA's :4
## Area_cultivadas_ha_2017 Area_cultivadas_ha_2018 Area_cultivadas_ha_201
## Min. :126 Min. :100.0 Min. : 0.0
## 1st Qu.:166 1st Qu.:105.0 1st Qu.: 0.0
## Median :202 Median :210.0 Median : 0.0
## Mean :334 Mean :325.4 Mean : 298.2
## 3rd Qu.:464 3rd Qu.:500.0 3rd Qu.: 0.0
## Max. :712 Max. :712.0 Max. :1491.0
## NA's :4 NA's :4 NA's :4
## Area_cultivadas_ha_2007 Area_cultivadas_ha_2008 Area_cultivadas_ha_2009
## Min. : 0.0 Min. : 0.0 Min. : 0.0
## 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.0
## Median : 0.0 Median : 0.0 Median : 0.0
## Mean : 309.2 Mean : 498.4 Mean : 281.4
## 3rd Qu.: 0.0 3rd Qu.: 0.0 3rd Qu.: 0.0
## Max. :1546.0 Max. :2492.0 Max. :1407.0
## NA's :4 NA's :4 NA's :4
## Area_cultivadas_ha_2011 Area_cultivadas_ha_2012 Area_cultivadas_ha_2013
## Min. : 0.0 Min. : 0 Min. : 0.0
## 1st Qu.: 0.0 1st Qu.: 0 1st Qu.: 0.0
## Median : 0.0 Median : 0 Median : 0.0
## Mean :168.4 Mean : 225 Mean : 238.4
## 3rd Qu.: 0.0 3rd Qu.: 0 3rd Qu.: 0.0
## Max. :842.0 Max. :1125 Max. :1192.0
## NA's :4 NA's :4 NA's :4
Mapa del area cultivada de yuca en el año 2010
library(leaflet)
bins<- c(0,187,374,561,748,935,1122,1309,1496)
pal <- colorBin("YlOrRd", domain = mun_Yuca_gaui_hasem$Area_cultivadas_ha_201, bins = bins)
map<-leaflet(data = mun_Yuca_gaui_hasem)%>%
addTiles()%>%
addPolygons(label = ~Area_cultivadas_ha_201,
popup = ~MPIO_CNMBR,
fillColor = ~ pal(Area_cultivadas_ha_201),
color="#444444",
weight = 1,
smoothFactor = 0.5,
opacity = 1.0,
fillOpacity = 0.5,
highlightOptions = highlightOptions(color = "red",weight =2,bringToFront = TRUE )
)%>%
addProviderTiles(providers$OpenStreetMap)%>%
addLegend("bottomright", pal= pal, values = ~Area_cultivadas_ha_201,
title = "Area sembrada de Yuca 2010[Ha](DANE,2018)",opacity = 1)
map
Mapa del area cultivada del Yuca en el año 2016
library(leaflet)
bins<- c(0,87,174,261,348,435,522,609,696)
pal <- colorBin("YlOrRd", domain = mun_Yuca_gaui_hasem$Area_cultivadas_ha_2016, bins = bins)
map<-leaflet(data = mun_Yuca_gaui_hasem)%>%
addTiles()%>%
addPolygons(label = ~Area_cultivadas_ha_2016,
popup = ~MPIO_CNMBR,
fillColor = ~ pal(Area_cultivadas_ha_2016),
color="#444444",
weight = 1,
smoothFactor = 0.5,
opacity = 1.0,
fillOpacity = 0.5,
highlightOptions = highlightOptions(color = "red",weight =2,bringToFront = TRUE )
)%>%
addProviderTiles(providers$OpenStreetMap)%>%
addLegend("bottomright", pal= pal, values = ~Area_cultivadas_ha_2016,
title = "Area sembrada de Yuca 2016[Ha](DANE,2018)",opacity = 1)
map
sessionInfo()
## R version 4.0.4 (2021-02-15)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 19042)
##
## Matrix products: default
##
## locale:
## [1] LC_COLLATE=Spanish_Colombia.1252 LC_CTYPE=Spanish_Colombia.1252
## [3] LC_MONETARY=Spanish_Colombia.1252 LC_NUMERIC=C
## [5] LC_TIME=Spanish_Colombia.1252
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] leaflet_2.0.4.1 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.5
## [5] purrr_0.3.4 readr_1.4.0 tidyr_1.1.3 tibble_3.1.0
## [9] tidyverse_1.3.0 sf_0.9-7 ggplot2_3.3.3
##
## loaded via a namespace (and not attached):
## [1] Rcpp_1.0.6 lubridate_1.7.10 leaflet.providers_1.9.0
## [4] class_7.3-18 assertthat_0.2.1 digest_0.6.27
## [7] utf8_1.1.4 R6_2.5.0 cellranger_1.1.0
## [10] backports_1.2.1 reprex_1.0.0 evaluate_0.14
## [13] e1071_1.7-5 httr_1.4.2 pillar_1.5.1
## [16] rlang_0.4.10 readxl_1.3.1 rstudioapi_0.13
## [19] rmarkdown_2.7 htmlwidgets_1.5.3 munsell_0.5.0
## [22] proxy_0.4-25 broom_0.7.5 compiler_4.0.4
## [25] modelr_0.1.8 xfun_0.22 pkgconfig_2.0.3
## [28] htmltools_0.5.1.1 tidyselect_1.1.0 fansi_0.4.2
## [31] crayon_1.4.1 dbplyr_2.1.0 withr_2.4.1
## [34] grid_4.0.4 jsonlite_1.7.2 gtable_0.3.0
## [37] lifecycle_1.0.0 DBI_1.1.1 magrittr_2.0.1
## [40] units_0.7-0 scales_1.1.1 KernSmooth_2.23-18
## [43] cli_2.3.1 stringi_1.5.3 farver_2.1.0
## [46] fs_1.5.0 xml2_1.3.2 ellipsis_0.3.1
## [49] generics_0.1.0 vctrs_0.3.6 RColorBrewer_1.1-2
## [52] tools_4.0.4 glue_1.4.2 hms_1.0.0
## [55] crosstalk_1.1.1 yaml_2.2.1 colorspace_2.0-0
## [58] classInt_0.4-3 rvest_1.0.0 knitr_1.31
## [61] haven_2.3.1