bcgov / bcdata

An R package for searching & retrieving data from the B.C. Data Catalogue
https://bcgov.github.io/bcdata
Apache License 2.0
81 stars 12 forks source link

Carry time downloaded with bcdc_sf object #103

Closed boshek closed 4 years ago

boshek commented 5 years ago

For records that have an actual file to download, it might be useful to extract that and include as a) an attribute and b) in the print methods. Likely a useful service for a user.

boshek commented 4 years ago

For non BCGW resources we can use the last_modified field in the record/resource call:

> rec <- bcdc_get_record('mental-health-and-substance-use-health-services')
> rec[["resources"]][[1]][["last_modified"]]
[1] "2019-04-11T15:04:02.784160"

However that field is not updated for BCGW resources. If we wanted to establish some sort of finger print of where a file had changed, we could use columns from bcdc_describe_feature and the number of rows present to establish a makeshift fingerprint. This isn't ideal though.

stephhazlitt commented 4 years ago

@boshek Is this for providing general resource metadata for the user or related to the potential idea of caching resources?

boshek commented 4 years ago

I think both. I will implement a "date downloaded" print method and see how that looks.

boshek commented 4 years ago

Closed via #206