Skip to content

Commit

Permalink
precompile vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
runner authored and runner committed Jun 2, 2020
1 parent 1475203 commit 88b115d
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions vignettes/bcdata.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ You can see all valid values for the catalogue search facets using `bcdata::bcdc
## Valid values for search facet 'license_id'
bcdc_search_facets(facet = "license_id")
#> facet count display_name
#> 1 license_id 68 Statistics Canada Open Licence
#> 1 license_id 80 Statistics Canada Open Licence
#> 2 license_id 1 Queen's Printer Licence - British Columbia
#> 3 license_id 12 Open Government Licence – TransLink
#> 4 license_id 12 Open Government Licence – Municipality of North Cowichan
Expand All @@ -144,7 +144,7 @@ bcdc_search_facets(facet = "license_id")
#> 9 license_id 3 Open Government Licence - BC Assessment
#> 10 license_id 2 Open Data Commons - Public Domain Dedication and Licence
#> 11 license_id 16 Elections BC Open Data Licence
#> 12 license_id 1282 Access Only
#> 12 license_id 1291 Access Only
#> name
#> 1 21
#> 2 25
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Querying Spatial Data with bcdata"
date: "2020-05-28"
date: "2020-06-02"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Querying Spatial Data with bcdata}
Expand Down Expand Up @@ -248,9 +248,9 @@ bcdc_query_geodata("6a2fea1b-0cc4-4fc2-8017-eaf755d516da") %>%
#> ● At most six rows of the record are printed here
#> ────────────────────────────────────────────────────────────────────────────────
#> Simple feature collection with 6 features and 19 fields
#> geometry type: MULTIPOLYGON
#> geometry type: POLYGON
#> dimension: XY
#> bbox: xmin: 1227676 ymin: 455032.1 xmax: 1234629 ymax: 467135.4
#> bbox: xmin: 1227676 ymin: 461435.1 xmax: 1238850 ymax: 468825.5
#> CRS: 3005
#> # A tibble: 6 x 20
#> id LOCAL_REG_GREEN… PARK_NAME PARK_TYPE PARK_PRIMARY_USE REGIONAL_DISTRI…
Expand All @@ -259,13 +259,13 @@ bcdc_query_geodata("6a2fea1b-0cc4-4fc2-8017-eaf755d516da") %>%
#> 2 WHSE… 21 Bear Cre… Local Park Metro Vancouver
#> 3 WHSE… 22 Beaver C… Local Park Metro Vancouver
#> 4 WHSE… 23 Bel-Air … Local Park Metro Vancouver
#> 5 WHSE… 30 Blumsen … Local Park Metro Vancouver
#> 6 WHSE… 31 Bob Rutl… Local Park Metro Vancouver
#> 5 WHSE… 37 Freedom … Local Park Metro Vancouver
#> 6 WHSE… 46 Barnston… Local Park Metro Vancouver
#> # … with 14 more variables: MUNICIPALITY <chr>, CIVIC_NUMBER <int>,
#> # CIVIC_NUMBER_SUFFIX <chr>, STREET_NAME <chr>, LATITUDE <dbl>,
#> # LONGITUDE <dbl>, WHEN_UPDATED <date>, WEBSITE_URL <chr>,
#> # LICENCE_COMMENTS <chr>, FEATURE_AREA_SQM <dbl>, FEATURE_LENGTH_M <dbl>,
#> # OBJECTID <int>, SE_ANNO_CAD_DATA <chr>, geometry <MULTIPOLYGON [m]>
#> # OBJECTID <int>, SE_ANNO_CAD_DATA <chr>, geometry <POLYGON [m]>
```

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:
Expand Down
4 changes: 2 additions & 2 deletions vignettes/explore-silviculture-data-using-bcdata.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Exploring Silviculture Data with bcdata"
date: "2020-05-28"
date: "2020-06-02"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Exploring Silviculture Data with bcdata}
Expand Down Expand Up @@ -97,7 +97,7 @@ We see that this is a [Web Service-enabled](https://www2.gov.bc.ca/gov/content?i
# Query the data using the permanent ID of the record to guard against name changes
bcdc_query_geodata("258bb088-4113-47b1-b568-ce20bd64e3e3")
#> Querying 'results-forest-cover-silviculture' record
#> ● Using collect() on this object will return 871550 features and 159 fields
#> ● Using collect() on this object will return 872209 features and 159 fields
#> ● At most six rows of the record are printed here
#> ────────────────────────────────────────────────────────────────────────────────
#> Simple feature collection with 6 features and 159 fields
Expand Down
Binary file modified vignettes/vignette-fig-air_zones-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/vignette-fig-bbox-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/vignette-fig-district_parks-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/vignette-fig-districts-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/vignette-fig-dp_join-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/vignette-fig-map-larch-plantations-dpg-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/vignette-fig-plot-dpg-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/vignette-fig-regional_districts-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/vignette-fig-unnamed-chunk-1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/vignette-fig-unnamed-chunk-3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 88b115d

Please sign in to comment.