You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finally, you can retrieve the _metadata_ for a single catalogue record by using the record name or permanent ID with `bcdc_get_record()`. It is advised to use the permanent ID rather than the human-readable name in non-interactive situations---like scripts---to guard against future name changes of a record:
@@ -192,7 +194,7 @@ Once you have located the B.C. Data Catalogue record with the data you want, you
192
194
```r
193
195
## Get the data resource for the `bc-highwaycams` catalogue record
194
196
bcdc_get_data("bc-highwaycams")
195
-
#> # A tibble: 1,035 × 13
197
+
#> # A tibble: 1,034 × 13
196
198
#> links_bchighwaycam links_imageDisplay links_imageThumbnail links_replayTheDay id
Here we see that this greatly reduces the number of features that we are dealing with (and correspondingly the amount of data that needs to be transferred over the web). Remember also that we still have not actually requested the full data set. This is just still a preview. Also this query still includes all municipal parks in BC while we only want the ones in the three school districts - the polygons defined by the `districts` object. To find that subset of parks we can make use of the built-in geometric operators which allow us to perform spatial operations remotely fine tuning our query even further. Here using the `INTERSECTS` function is appropriate and since this is a last tuning step, we can call `collect` and assign a name to this object. These requests can sometimes take quite a long:
@@ -182,7 +182,7 @@ Let's look at the dimensions of this now much more manageable data object we hav
182
182
183
183
```r
184
184
dim(trees_dpg)
185
-
#> [1] 253 160
185
+
#> [1] 259 160
186
186
```
187
187
188
188
We can see there are several treatment units planted with western larch, and we can make a quick map of these harvested openings for the Prince George Natural Resource District:
There is another illustration in the ["querying spatial data vignette"](https://bcgov.github.io/bcdata/articles/efficiently-query-spatial-data-in-the-bc-data-catalogue.html#a-note-about-using-local-r-functions-in-constructing-filter-queries).
0 commit comments