Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devolución 2 #2

Open
wants to merge 26 commits into
base: Feedback2
Choose a base branch
from
Open

Devolución 2 #2

wants to merge 26 commits into from

Conversation

eliocamp
Copy link

No description provided.

Copy link
Author

@eliocamp eliocamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Les dejé comentarios.

informe.Rmd Outdated Show resolved Hide resolved
informe.Rmd Outdated Show resolved Hide resolved
informe.Rmd Outdated

**MAPA DE CENTROS CLANDESTINOS**

#Elio intentamos hacer el mapa y logramos agregar las capas pero no se ven los bordes, ¿sabes como deberìamos hacer eso?
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Les faltó poner el geom_sf() con el mapa.

ggplot() + 
  geom_sf(data = provinces) +
  geom_point(data = centros_clandestinos_detencion, mapping = aes(x = lon, y = lat), colour = "red") + 
  coord_sf()

image

Notarán que hay otro problema: los puntos están todos en casi cero. Esto es porque el mapa que ustedes tienen está proyectado. (Pueden ver lo que sale imprimiendo provinces:

Simple feature collection with 24 features and 4 fields
Geometry type: MULTIPOLYGON
Dimension:     XYZ
Bounding box:  xmin: -8189395 ymin: -7374204 xmax: -5970885 ymax: -2485268
z_range:       zmin: 0 zmax: 0
Projected CRS: WGS 84 / Pseudo-Mercator
First 10 features:
     ADM0_ES ADM0_PCODE                ADM1_ES ADM1_PCODE                       geometry
1  Argentina         AR           Buenos Aires      AR006 MULTIPOLYGON Z (((-6918884 ...
2  Argentina         AR              Catamarca      AR010 MULTIPOLYGON Z (((-7566501 ...
3  Argentina         AR                  Chaco      AR022 MULTIPOLYGON Z (((-6929548 ...
4  Argentina         AR                 Chubut      AR026 MULTIPOLYGON Z (((-7424845 ...
5  Argentina         AR Ciudad de Buenos Aires      AR002 MULTIPOLYGON Z (((-6507174 ...
6  Argentina         AR                Córdoba      AR014 MULTIPOLYGON Z (((-7110389 ...
7  Argentina         AR             Corrientes      AR018 MULTIPOLYGON Z (((-6329806 ...
8  Argentina         AR             Entre Ríos      AR030 MULTIPOLYGON Z (((-6521249 ...
9  Argentina         AR                Formosa      AR034 MULTIPOLYGON Z (((-6939869 ...
10 Argentina         AR                  Jujuy      AR038 MULTIPOLYGON Z (((-7371715 ...

La clave está que dice: Projected CRS: WGS 84 / Pseudo-Mercator y además que los puntos tienen números enormes (que son algo así como metros con respecto a algún punto en el globo (que depende de la proyección)).

Lo que tienen que hacer es proyectar los datos o el mapa a la misma proyección. Lo más fácil es desproyectar provinces a una proyección de longitud x latitud.

provinces <- st_read(dsn = "datos/mapa_argentina/arg_admbnda_adm1_unhcr2017.shp") %>% 
  st_transform(crs = "+proj=lonlat")

Y ahí va a salir.

informe.Rmd Outdated Show resolved Hide resolved
informe.Rmd Outdated Show resolved Hide resolved
informe.Rmd Outdated
count()

print(victimas)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esta tabla es muy grande para mostrarla entera. Deberían mostrar una tabla más reducida (agrupar por década, por ejemplo) o mostrarla en un gŕafico.

informe.Rmd Outdated Show resolved Hide resolved
informe.Rmd Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants