-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: Feedback2
Are you sure you want to change the base?
Devolución 2 #2
Conversation
There was a problem hiding this 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
|
||
**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? |
There was a problem hiding this comment.
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()
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
count() | ||
|
||
print(victimas) |
There was a problem hiding this comment.
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.
No description provided.