bcgov / bcgov/bcmaps

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

Aperta
#102 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
help wanted
Lingua principale
R
Stelle
74
Fork
17
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

All the pieces are here just to stitch them together.

``` r
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"
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.