coderaanalytics / econdatar

R package for uploading and downloading data to/from www.econdata.co.za
MIT License
6 stars 2 forks source link

`read_econdata(wide=TRUE)` doesn't include `period` #21

Closed aidanhorn closed 4 months ago

aidanhorn commented 7 months ago

@byrongibby I'm helping @Hendrivanz now. The standard code when exporting on www.econdata.co.za doesn't specify wide=FALSE, but then we don't see the period (date information) when pulling the data. Can you please check that the period data is supplied when wide=TRUE? We were both using version 2.2.0.

byrongibby commented 4 months ago

period has been renamed time_period to be more consistent with the description of the data in the data registry.

aidanhorn commented 4 months ago

Please open this issue again, and show where the time_period is in

library(econdatar)

data_raw <- read_econdata(id = "NATL_ACC",
                          wide = TRUE)
str(data_raw)
byrongibby commented 3 months ago

Please try

library(econdatar)

data_raw <- read_econdata(id = "NATL_ACC",
 tidy = TRUE,
 wide = TRUE)
str(data_raw)

The wide argument has no meaning without tidy=TRUE.