Paquetes
library(pacman)
p_load("dplyr", "stringr", "ggplot2", "wordcloud","rmdformats","vembedr", "xfun","readr","DT","RColorBrewer","plotly","forcats", "mime", "xfun","tidyr","ggdark","waffle")Datos
generacion <- read_csv("C:/Users/kitkat/OneDrive/Escritorio/rsu/generacion de residuos solidos urbanos.csv")
materiales <- read_csv("C:/Users/kitkat/OneDrive/Escritorio/rsu/materiales valorizables recolectados.csv")Resultados
CANTIDAD <- generacion$`GENERACIÓN TOTAL (MILLONE DE TONELADAS)`
Generación <- ggplot(generacion)+
geom_line(aes(x= AÑO, y=CANTIDAD), col= "purple")+
labs(title="Generación de RSU de 1992 a 2012", x="Fecha", y="Cantidad total (Millones de toneladas) ")
ggplotly(Generación) CANTIDAD_PER_CAPITA <- generacion$`GENERACIÓN PER CAPITA (KG/HABITANTE/DÍA)`
Generación <- ggplot(generacion)+
geom_line(aes(x= AÑO, y=CANTIDAD_PER_CAPITA), col= "purple")+
labs(title="Generación de RSU per capita de 1992 a 2012", x="Fecha", y="Kg/Habitante/Día")
ggplotly(Generación) #{r} ggplot(materiales, aes(fill=materiales$TIPO_DE_MATERIAL_VALORIZADO_RECOLECTADO, values=materiales$`CANTIDAD_(CANTIDAD_RECOLECTADA_EN_KILOGRAMOS_POR_DIA)`))+ geom_waffle(n_rows=8, size=0.111, colour="white")+ coord_equal() + theme_void()
#{r} library(waffle) ggplot(materiales, aes(fill=materiales$TIPO_DE_MATERIAL_VALORIZADO_RECOLECTADO, values=materiales$`CANTIDAD_(CANTIDAD_RECOLECTADA_EN_KILOGRAMOS_POR_DIA)`))+ geom_waffle() + coord_equal() + scale_fill_waffle() + theme_waffle()
Descargas
Datos
xfun::embed_file("generacion de residuos solidos urbanos.csv")Download generacion de residuos solidos urbanos.csv
xfun::embed_file("materiales valorizables recolectados.csv")