Skip to content

Commit

Permalink
Fixed until 2023 see #16 for the reason 2024 is pending
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoZepeda committed Jul 15, 2024
1 parent 143ba1c commit 56ee2f7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# covidmx 0.7.9

* Se corrigió que cambió el link de datos del 2023.
* Se agregaron las nuevas clasificaciones finales para COVID y FLU.
* Se agregó dependencia a `duckdb >= 1.0.0` para que se pueda leer entre versiones.

# covidmx 0.7.8
Expand Down
13 changes: 10 additions & 3 deletions R/descarga_datos_abiertos_aux.R
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ parse_db_diccionario_ssa <- function(diccionario_unzipped_path, clear_csv = FALS
append(
list("RESULTADO_LAB" = readxl::read_excel(diccionario_unzipped_path,
sheet = "Cat\u00e1logo RESULTADO_LAB",
col_types = c("numeric", "text")
col_types = c("numeric", "text","text","text")
))
) |>
append(
Expand All @@ -622,9 +622,16 @@ parse_db_diccionario_ssa <- function(diccionario_unzipped_path, clear_csv = FALS
col_types = c("numeric", "text")
))
) |>
#FIXME: Starting in July 2024 they included two classifications
append(
list("CLASIFICACION_FINAL_COVID" = readxl::read_excel(diccionario_unzipped_path,
sheet = "Cat CLASIFICACION_FINAL_COVID",
col_types = c("numeric", "text", "text")
))
) |>
append(
list("CLASIFICACION_FINAL" = readxl::read_excel(diccionario_unzipped_path,
sheet = "Cat\u00e1logo CLASIFICACION_FINAL",
list("CLASIFICACION_FINAL_FLU" = readxl::read_excel(diccionario_unzipped_path,
sheet = "Cat CLASIFICACION_FINAL_FLU",
col_types = c("numeric", "text", "text")
))
) |>
Expand Down
13 changes: 5 additions & 8 deletions R/pin_get_download_time.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ get_col_class <- function() {

get_sites_covid <- function() {
c(
"2024" = paste0(
"https://datosabiertos.salud.gob.mx/gobmx/salud/",
"datos_abiertos/datos_abiertos_influenza_covid19.zip"
),
# "2024" = paste0(
# "https://datosabiertos.salud.gob.mx/gobmx/salud/",
# "datos_abiertos/datos_abiertos_influenza_covid19.zip"
# ),
"2023" = paste0(
"https://datosabiertos.salud.gob.mx/gobmx/salud",
"/datos_abiertos/historicos/2023/",
Expand All @@ -122,10 +122,7 @@ get_sites_covid <- function() {

get_site_dic <- function() {
paste0(
"http://datosabiertos.salud.",
"gob.mx/gobmx/salud/datos_a",
"biertos/diccionario_datos_",
"covid19.zip"
"https://datosabiertos.salud.gob.mx/gobmx/salud/datos_abiertos/diccionario_datos_abiertos.zip"
)
}

Expand Down

0 comments on commit 56ee2f7

Please sign in to comment.