Informe geografico: Poblacion por comunas en de la Ciudad de Bs. As.
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5 v purrr 0.3.4
## v tibble 3.1.4 v dplyr 1.0.7
## v tidyr 1.1.3 v stringr 1.4.0
## v readr 2.0.1 v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(sf)
## Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
CARGAR DATASET
partidos_amba <- st_read ("partidos_amba.geojson", stringsAsFactors = TRUE)
## Reading layer `amba_partidos' from data source
## `C:\Users\HP Note\Desktop\CDDPC TP01c\partidos_amba.geojson'
## using driver `GeoJSON'
## Simple feature collection with 48 features and 2 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -59.3392 ymin: -35.23893 xmax: -57.70946 ymax: -34.23007
## Geodetic CRS: WGS 84
censo <- read.csv("informacion-censal-por-radio-2010.csv", stringsAsFactors = TRUE)
censo <- censo %>%
select(-WKT)
FILTRAR Y AGRUPAR
censo.agrupado <- censo %>%
group_by(COMUNA) %>%
summarise(POB.TOTAL = sum(TOTAL_POB), HOMBRES = sum(T_VARON), MUJERES = sum(T_MUJER), HOGARES = sum(T_HOGAR), NBI = sum(H_CON_NBI) )
mapacaba <- partidos_amba %>%
filter (nombre %in% c ("Comuna 1", "Comuna 2", "Comuna 3", "Comuna 4", "Comuna 5", "Comuna 6", "Comuna 7", "Comuna 8", "Comuna 9", "Comuna 10", "Comuna 11", "Comuna 12", "Comuna 13", "Comuna 14", "Comuna 15" ))
MAPEO GENERAL
ggplot () +
geom_sf (data = mapacaba, aes (fill = area_km2))+
labs (title =" Superficie por Comunas en CABA ")+
theme_void ()

CAMBIAR NOMBRE DE COLUMNA
mapacaba <- rename(mapacaba, COMUNA=nombre)
RENOMBRAR DATOS DE COLUMNA COMUNA
censo.agrupado <- censo.agrupado %>%
mutate(COMUNA = paste0("Comuna ", COMUNA))
UNIR BASES DE DATOS
mapacaba <- left_join ( mapacaba, censo.agrupado, by=c ("COMUNA"="COMUNA"))
MAPEOS DE VARIABLES NUMERICAS
ggplot () +
geom_sf (data = mapacaba, aes (fill = POB.TOTAL/area_km2))+
labs (title =" Densidad de población por comuna en CABA ",
subtitle =" Censo 2010 ",
caption =" Fuente: INDEC 2010 ",
fill =" Población x km2 ")+
scale_fill_viridis_c ()+
theme_void ()

ggplot () +
geom_sf (data = mapacaba, aes (fill = NBI/HOGARES))+
labs (title =" Porcentaje de NBI en hogares, por comuna en CABA ",
subtitle =" Censo 2010 ",
caption =" Fuente: INDEC 2010 ",
fill =" NBI/HOGARES ")+
scale_fill_steps2 ()+
theme_void ()

Nota: Se observan mayores niveles de NBI por hogar, en comunas con menor densidad de poblacion (sector sur de la ciudad, destinado a usos industriales y grandes equipamientos, sin desarrollo urbanisticos acorde al resto de la ciudad).
ggplot() + geom_sf (data = mapacaba) +
geom_sf(data = filter(mapacaba, area_km2 >= 13), aes (fill = POB.TOTAL/HOGARES), color = "white") +
labs( title = "Cantidad de habitantes por vivienda en CABA",
subtitle = "Censo 2010",
caption = "Fuente: INDEC 2010",
fill = "Habitantes por hogar") +
scale_fill_distiller (palette = "Spectral")+
theme_void ()

Nota: Se observan mayores niveles de hacinamiento en el cordon sur de la CABA, en relacion al grafico anterior de NBI.
MAPEO VARIABLE CATEGORICA
mapacaba <- mapacaba%>%
mutate (categoria = if_else (HOGARES >= 75000," MAYOR A 75K "," MENOR A 75K"))
ggplot () +
geom_sf (data = mapacaba, aes (fill = HOGARES))+
labs (title = "Densidad de viviendas en CABA",
subtitle = "Censo 2010",
caption = "Fuente: INDEC 2010",
fill = "Viviendas x km2") +
scale_fill_distiller (palette = "Spectral")+
theme_void ()

INCORPORACION DE GEOMETRIAS
lineas_ffcc <- st_read ("lineas_ffcc.geojson")
## Reading layer `lineas_ffcc' from data source
## `C:\Users\HP Note\Desktop\CDDPC TP01c\lineas_ffcc.geojson'
## using driver `GeoJSON'
## Simple feature collection with 23 features and 5 fields
## Geometry type: MULTILINESTRING
## Dimension: XY
## Bounding box: xmin: -59.2763 ymin: -34.98144 xmax: -57.94964 ymax: -34.2941
## Geodetic CRS: WGS 84
ggplot () +
geom_sf (data = partidos_amba, aes (fill = area_km2))+
geom_sf (data = lineas_ffcc, aes (color = LINEA)) +
labs (title =" Extension de lineas ferroviarias CABA ")+
theme_void ()

Nota: La mayor cantidad de redes de transporte ferroviarias se concentran en la zona norte de CABA, quedando el corredor sur con menores posibilidades de accesibilidad, agravando a su vez las condiciones de NBI por la falta de infreaestructura.