Skip to content

Use modification date in record to know when to update cache layers. #102

Description

@boshek

All the pieces are here just to stitch them together.

library(bcdata)
#> 
#> Attaching package: 'bcdata'
#> The following object is masked from 'package:stats':
#> 
#>     filter
library(bcmaps)
#> Loading required package: sf
#> Linking to GEOS 3.9.1, GDAL 3.2.1, PROJ 7.2.1; sf_use_s2() is TRUE

lyr <- bcmaps:::available_layers()
nd <- lyr[lyr$layer_name == "nr_districts", ]

rec <- bcdc_get_record(nd$record)
#> Authorizing with your stored API key
rec$record_last_modified
#> [1] "2022-01-07"

attributes(nr_districts())$time_downloaded
#> nr_districts was updated on 2021-01-22
#> [1] "2021-01-22 06:32:22 PST"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions