-
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
… desconfiguro varias veces.
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.
Te dejé comentarios.
informe.Rmd
Outdated
|
||
```{r} | ||
nacidos_vivos_regiones_PBA <- read_excel("datos/nacidos_vivos_regiones_PBA.xlsx") | ||
View(nacidos_vivos_regiones_PBA) |
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.
No hay que poner View()
en el código. Fijate en el archivo Consejos.md.
informe.Rmd
Outdated
|
||
|
||
|
||
Finalmente se las calculó en Excel y se importó la información en un tabla. |
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.
Jajajajaja. Pero tenés que calcularlas en R!
Un problema es que hiciste pivot_wider()
, pero ese formato no está bueno para hacer la unión y calcular la tasa.
Entonces, primero deberías leer los datos de nacidos vivos y ponerlos en un formato largo:
nacidos_vivos_regiones_PBA <- read_excel("datos/nacidos_vivos_regiones_PBA.xlsx") |>
pivot_longer(cols = -anio, names_to = "region_sanitaria", values_to = "nacidos_vivos")
Esto te da algo así:
# A tibble: 68 × 3
anio region_sanitaria nacidos_vivos
<dbl> <chr> <dbl>
1 2005 V 54706
2 2005 VI 67630
3 2005 VII 38088
4 2005 XII 24840
5 2006 V 55774
6 2006 VI 66110
7 2006 VII 38221
8 2006 XII 25170
9 2007 V 56193
10 2007 VI 67081
Luego, calcular los totales por región sanitaria como hiciste antes y unirlo a estos datos:
defunciones_maternas_2009_2021 %>%
group_by(anio, region_sanitaria = `region_sanitaria `) %>%
summarise(cantidad_muertes_informadas = sum(cantidad)) |>
left_join(nacidos_vivos_regiones_PBA) |>
mutate(tasa = cantidad_muertes_informadas/nacidos_vivos)
Y ahí te quedan los datos.
(PD: Deberías arreglar el nombre de "region_sanitaria " (sacarle el espacio al final) desde el principio).
print(tasas_region_selec) | ||
``` | ||
|
||
Al compara las tasas de mortalidad materna se puede observar que la región VII se encuentra por arriba de las otras tasas en varios años, 2010, 2013, 2014, 2017, y 2020. En cambio, la región XII supera a las demás en los años 2011, 2018 y en la actualidad. Por último, las tasas más altas se observan en los años 2010 y 2021, donde aproximadamente 80 mujeres morían por cada 100.000 nacidos vivos. |
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.
A mí se me hace difícil seguir esta tabla, quizás podés hacer un gráfico con una linea de tiempo para cada región (con el resultado que te recomiendo arriba es bastante directo).
informe.Rmd
Outdated
geom_line ( color = "red") | ||
``` | ||
|
||
Sin bien no se pudo unir en un solo grafico ambas tendencias, las muertes maternas directas tienen una tendencia en descenso para el periodo. En cambio, las muertes maternas indirectas se encontraban en una meseta, pero del 2020 al 2021 registran un aumento elevado. Muchos artículos informan sobre esto, debido al impacto que tuvo el COVID en las embarazadas. |
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.
Para hacer un único gráfico podés usar los datos en formato largo (antes del pivot_longer()
y hacer una línea con aes(color = clasificacion)
.
No description provided.