UrbanInstitute / education-data-package-r

https://urbaninstitute.github.io/education-data-package-r/
Other
86 stars 11 forks source link

argument "url_path" is missing #68

Closed cra-cerp closed 4 years ago

cra-cerp commented 4 years ago

I'm trying to download whole csv files via 'csv = TRUE', and am running into the following error:

Fetching data for colleges_ipeds_completions-2digcip_2015.csv ...
Error in get_endpoint_varlist(endpoints, url_path) : 
  argument "url_path" is missing, with no default

This is my code:

export <- get_education_data(level = "college-university", 
                              source = "ipeds", 
                              topic = "completions-cip-2",
                              filter = list(year = 2015),
                              add_labels = TRUE,
                              csv = TRUE)

My traceback is: traceback() 5: paste0(url_path, "/api/v1/api-endpoint-varlist/?endpoint_id=", endpoints$endpoint_id, "&mode=R") 4: get_endpoint_varlist(endpoints, url_path) 3: add_variable_labels(endpoints, df) 2: get_education_data_csv(level, source, topic, by, filters, add_labels, staging) 1: get_education_data(level = "college-university", source = "ipeds", topic = "completions-cip-2", filter = list(year = 2015), add_labels = TRUE, csv = TRUE)

Thanks!

khueyama commented 4 years ago

@cra-cerp thank you for reaching out and sorry to hear you are having issues. It looks like the problem is with the functionality that adds labels to the data. While I debug that, you should be able to still access the data itself with:

export <- get_education_data(level = "college-university", 
                             source = "ipeds", 
                             topic = "completions-cip-2",
                             filter = list(year = 2015),
                             add_labels = FALSE,
                             csv = TRUE)
cra-cerp commented 4 years ago

Thank you! That works for me.

khueyama commented 4 years ago

@cra-cerp this is closed via https://github.com/UrbanInstitute/education-data-package-r/commit/e4cb425a6a645a598f97f1a3b4358d65a24a5962. If you reinstall the latest version your initial code sample should work with labels now. Thanks for your help and let me know if you run into any other issues!