MattCowgill / readabs

Download and tidy time series data from the Australian Bureau of Statistics in R
https://mattcowgill.github.io/readabs/
Other
101 stars 22 forks source link

read_abs claims the new retail trade spreadsheet has only two columns #186

Closed jasemurphy closed 2 years ago

jasemurphy commented 2 years ago

Something's gone awry I fear.

This code:

retail <- read_abs("8501.0", "1") %>% 
+   separate_series()

returns this:

> Finding filenames for tables corresponding to ABS catalogue 8501.0
> Attempting to download files from catalogue 8501.0, Retail Trade, Australia
> trying URL 'https://www.abs.gov.au/statistics/industry/retail-and-wholesale-trade/retail-trade-australia/latest-release/850101.xlsx'
> Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 138922 bytes (135 KB)
> ==================================================
> downloaded 135 KB
> 
> Extracting data from downloaded spreadsheets
> Tidying data from imported ABS spreadsheets                                                             
> Error in .f(.x[[i]], ...) : 
>   The data frame appears to have fewer than 2 columns. This is unexpected from an ABS time series. Please check the spreadsheet.

Appreciate your work on this program Matt! Thanks for having a look at this.

MattCowgill commented 2 years ago

Hi @jasemurphy, I think this is related to a change the ABS made - they re-named the "Inquiries" sheet in the Excel workbook to "Enquiries."

@Henry-DJPR has fixed read_abs() to work with this new naming convention (https://github.com/MattCowgill/readabs/pull/180).

Can you please try reinstalling readabs (devtools::install_github("mattcowgill/readabs")), try your code again, and let me know if it works?

(Your code works for me without error)

jasemurphy commented 2 years ago

Thanks Matt, reinstalled and it works.

MattCowgill commented 2 years ago

Great, thanks for letting me know @jasemurphy. Glad you’re getting some use out of the package