crenteriam / importinegi

Paquete de R para descargar y gestionar bases de datos abiertas del INEGI.
9 stars 2 forks source link

catalogo_inegi() does not show any data #5

Open OVazquezVillegas opened 2 years ago

OVazquezVillegas commented 2 years ago

The catalogo_inegi() function does not show any data, instead the following error appears when running:

data = catalogo_inegi() #496 catálogos (#632 Censo de Población y Vivienda 2020) trying URL 'http://www3.inegi.org.mx/rnm/index.php/catalog/export/csv?ps=500&' Content type 'text/csv;charset=UTF-8' length unknown downloaded 158 KB

Error in [.data.frame(x, r, vars, drop = drop) : undefined columns selected

I check the function and the problem has to do with the defined columns to be selected:

select = c("id", "surveyid", "titl", "data_coll_start", "data_coll_end", "created", "changed")

Whereas the actual names of the columns are the following:

id,idno,title,nation,authoring_entity,year_start,year_end,created,changed

Therefore, you only need to update the right name of the columns in the function.

I hope that info helps to solve the issue!

Best

Orlando