bcgov/shinyrems

dplyr::bind_rows: Can't combine `..1$COLLECTION_START` <double> and `..2$COLLECTION_START` <datetime<Etc/GMT+8>>

Closed this issue · 2 comments

When running :

`
shinyrems::run_ems_app("all")
checking for historic data...
Your version of the historic ems data is dated 2022-03-23 06:19:00 and there is a newer version available. Would you like to download it? (y/n)y
rems would like to store a copy of the historic ems data at C:\Users--\AppData\Local\rems\rems\duckdb\ems_historic.duckdb. Is that okay?

1: Yes
2: No

Selection: 1
This is going to take a while...
Downloading latest 'historic' EMS data
|=================================================================================================================| 100%

Unzipping...
Saving historic data at C:\Users--\AppData\Local\rems\rems\duckdb\ems_historic.duckdb
Adding database indexes
|============| 100%
Successfully downloaded and stored the historic EMS data.
You can access and subset it with the 'read_historic_data' function, or
attach it as a remote data.frame with 'connect_historic_db()' and
'attach_historic_data()' which you can then query with dplyr
checking for most recent 2yr dataset...
rems would like to store a copy of the 2yr ems data atC:\Users--\AppData\Local\rems\rems. Is that okay?

1: Yes
2: No

Selection: 1
Downloading latest '2yr' EMS data from BC Data Catalogue (url: https://pub.data.gov.bc.ca/datasets/949f2233-9612-4b06-92a9-903e817da659/ems_sample_results_current_expanded.csv)
|=================================================================================================================| 100%

Reading data from file...
Caching data on disk...
Loading data...
rems would like to store a 2yr data lookup table at C:\Users--\AppData\Local\rems\rems. This is required to run the ShinyRems app. Is that okay?

1: Yes
2: No

Selection: 1
Creating and caching lookup table ...

Listening on http://127.0.0.1:5454
Warning in file(file, ifelse(append, "a", "w")) :
cannot open file '..//R_Analysis/.Rproj.user/shared/notebooks/C45F9444-wq_historic_graphs/1/s/cqkdb8ul9brj2/000002.metadata': No such file or directory
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
Warning: Error in dplyr::bind_rows: Can't combine ..1$COLLECTION_START and ..2$COLLECTION_START <datetime<Etc/GMT+8>>.
[No stack trace available]
`

R version 4.1.2 (2021-11-01) -- "Bird Hippie"
‘shinyrems’ version 0.0.1

Hi there,

I wasn't able replicate your error. Are you able to re-install the latest versions of these and try again?

remotes::install_github("bcgov/rems")
remotes::install_github("bcgov/wqbc")
remotes::install_github("bcgov/shinyrems")

Fair enough, I started the code in an empty session, the packages were the most recent versions, and it worked! Previously it was looking in the wrong path.

remotes::install_github("bcgov/rems")
Skipping install of 'rems' from a github remote, the SHA1 (af9c259d) has not changed since last install.
Use force = TRUE to force installation
remotes::install_github("bcgov/wqbc")
Skipping install of 'wqbc' from a github remote, the SHA1 (6bf94da2) has not changed since last install.
Use force = TRUE to force installation
remotes::install_github("bcgov/shinyrems")
Skipping install of 'shinyrems' from a github remote, the SHA1 (7e1e804) has not changed since last install.
Use force = TRUE to force installation
shinyrems::run_ems_app("all")
checking for historic data...
Your version of the historic ems data is dated 2022-03-24 06:29:00 and there is a newer version available. Would you like to download it? (y/n)y
rems would like to store a copy of the historic ems data at C:\Users--\AppData\Local\rems\rems\duckdb\ems_historic.duckdb. Is that okay?

1: Yes
2: No

Selection: 1
This is going to take a while...
Downloading latest 'historic' EMS data
|===================================================================================================================================================| 100%

Unzipping...
Saving historic data at C:\Users--\AppData\Local\rems\rems\duckdb\ems_historic.duckdb
Adding database indexes
|============| 100%
Successfully downloaded and stored the historic EMS data.
You can access and subset it with the 'read_historic_data' function, or
attach it as a remote data.frame with 'connect_historic_db()' and
'attach_historic_data()' which you can then query with dplyr
checking for most recent 2yr dataset...
Your version of 2yr is dated 2022-03-24 03:39:00 and there is a newer version available. Would you like to download it? (y/n)y
rems would like to store a copy of the 2yr ems data atC:\Users--\AppData\Local\rems\rems. Is that okay?

1: Yes
2: No

Selection: 1
Downloading latest '2yr' EMS data from BC Data Catalogue (url: https://pub.data.gov.bc.ca/datasets/949f2233-9612-4b06-92a9-903e817da659/ems_sample_results_current_expanded.csv)
|===================================================================================================================================================| 100%

Reading data from file...
Caching data on disk...
Loading data...
rems would like to store a 2yr data lookup table at C:\Users--\AppData\Local\rems\rems. This is required to run the ShinyRems app. Is that okay?

1: Yes
2: No

Selection: 1
Creating and caching lookup table ...
Loading required package: shiny

Listening on http://127.0.0.1:6928
[1] EMS_ID Station DateTime Variable Code Value Units
[8] DetectionLimit ResultLetter SAMPLE_STATE SAMPLE_CLASS SAMPLE_DESCRIPTOR LOCATION_TYPE
<0 rows> (or 0-length row.names)
[1] EMS_ID REQUISITION_ID MONITORING_LOCATION LATITUDE LONGITUDE
[6] LOCATION_TYPE COLLECTION_START LOCATION_PURPOSE PERMIT SAMPLE_CLASS
[11] SAMPLE_STATE SAMPLE_DESCRIPTOR PARAMETER_CODE PARAMETER ANALYTICAL_METHOD_CODE
[16] ANALYTICAL_METHOD RESULT_LETTER RESULT UNIT METHOD_DETECTION_LIMIT
[21] MDL_UNIT QA_INDEX_CODE UPPER_DEPTH LOWER_DEPTH
<0 rows> (or 0-length row.names)
[1] EMS_ID Station DateTime Variable Code Value Units
[8] DetectionLimit ResultLetter SAMPLE_STATE SAMPLE_CLASS SAMPLE_DESCRIPTOR LOCATION_TYPE
<0 rows> (or 0-length row.names)

Thank you