r-geoflow / geoflow

Tools to Orchestrate Geospatial (Meta)Data Management Workflows and Manage FAIR Services
https://github.com/r-geoflow/geoflow/wiki
Other
41 stars 14 forks source link

problem with temporel coverage column in metadata table #288

Closed juliepierson closed 1 year ago

juliepierson commented 1 year ago

Hi, When I set a date like this in temporalCoverage of metadata table : "2022-06-23" or "2022-06-13T02:00:00Z", I get an error message when running initWorkflow : Erreur dans as.POSIXlt.character(x, tz, ...) : la chaîne de caractères n'est pas dans un format standard non ambigu When I set it like this : "2022-06-23/2022-06-23" there's no error message. Strangely, the problem seems to appear only for the first line of CSV, there's no problem with dates like "2022-06-23" or "2022-06-13T02:00:00Z" for the other lines in CSV. I tried with and without quotes, and I tried editing the CSV in a text file editor to make sure there was no hidden formatting. Thanks for your help :smiley:

eblondel commented 1 year ago

Can you send me the CSV file by email?

juliepierson commented 1 year ago

Done, thanks!

eblondel commented 1 year ago

Hi @juliepierson sorry for the delay.. Can you tell me the version of readr you have installed? Also please run this code (with your csv file):

data = as.data.frame( readr::read_csv("metadata_table_maraisbreton_v2.csv") )
data$TemporalCoverage
class(data$TemporalCoverage)

and tell me the the result

juliepierson commented 1 year ago

Thanks for your answer. I have version 2.1.3 of readr. Here are the results :

> data = as.data.frame( readr::read_csv("metadata_table_maraisbreton_v2.csv") ) Rows: 4 Columns: 15 ── Column specification ─────────────────────────────────────────────────────────────────────────────────────────────────── Delimiter: "," chr (13): Identifier, Title, Description, Subject, Creator, Date, Type, Language, Relation, Rights, Provenance, Data, ... lgl (1): SpatialCoverage dttm (1): TemporalCoverage

> data$TemporalCoverage [1] "2022-06-13 02:00:00 UTC" "2022-06-13 02:00:00 UTC" "2022-06-13 02:00:00 UTC" "2022-06-13 02:00:00 UTC"

> class(data$TemporalCoverage) [1] "POSIXct" "POSIXt"

eblondel commented 1 year ago

@juliepierson after investigation it appears to be related to upgrade of readr/vroom packages. I've pushed a tentative fix.

juliepierson commented 1 year ago

Yes, it works ! Thanks !!

eblondel commented 1 year ago

Cool!