Skip to content

Commit f8dad15

Browse files
authored
Merge pull request #23 from boshek/master
Adding wsc_drainages
2 parents 590ace3 + 6b5ca6e commit f8dad15

12 files changed

Lines changed: 179 additions & 3 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: bcmaps
22
Title: Map layers for British Columbia
3-
Version: 0.11.0
3+
Version: 0.12.0
44
Authors@R: c(person("Andy", "Teucher", email = "andy.teucher@gov.bc.ca",
55
role = c("aut", "cre")), person("Stephanie", "Hazlitt", email = "stephanie.hazlitt@gov.bc.ca",
66
role = "aut"), person("Sam", "Albers", email = "sam.albers@gov.bc.ca", role = "aut"),

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# bcmaps 0.12.0
2+
3+
* Added `wsc_drainages`
4+
15
# bcmaps 0.11.0
26

37
* Added `hydrozones` dataset.

R/wsc_drainages.R

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2017 Province of British Columbia
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and limitations under the License.
12+
#'
13+
#' For use in showing the 4th level drainages (sub-sub-drainages) in the national Drainage Area Framework and
14+
#' for use in determining the Water Survey of Canada alphanumeric codes that are used in hydrometric station numbering.
15+
#'
16+
#' Atlas of Canada 1,000,000 National Frameworks Data, Hydrology - Drainage Areas (WSC sub-sub drainage areas)
17+
#' from the Natural Resources Canada GeoGratis website. The dataset has been clipped to drainage areas within
18+
#' or adjacent to B.C.
19+
#'
20+
#'
21+
#'
22+
#' @format Water Survey of Canada Sub-Sub-Drainage Areas
23+
#'
24+
#' @details Downloaded from Natural Resources Canada GeoGratis website (http://geogratis.gc.ca/api/en/nrcan-rncan/ess-sst/30b33615-6dda-51a5-a9dd-308802714a28.html)
25+
#' and clipped to the area around B.C, then re-projected to BC Albers projection. Some attribute fields were removed, and other
26+
#' attribute field names were changed.
27+
#'
28+
#'
29+
#' @source Original data from
30+
#' \href{https://catalogue.data.gov.bc.ca/dataset/water-survey-of-canada-sub-sub-drainage-areas}{DataBC},
31+
#' under the
32+
#' \href{http://open.canada.ca/en/open-government-licence-canada}{Open Government License - Canada} version 2.0.
33+
34+
"wsc_drainages"

README.Rmd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ install_github("bcgov/bcmaps", build_vignettes = TRUE)
4747

4848
### Usage
4949

50-
At the moment, there are fifteen layers available:
50+
At the moment, there are sixteen layers available:
5151

5252
- `bc_bound`: Coarse provincial boundary of British Columbia (1:7.5M scale).
5353

@@ -83,6 +83,8 @@ At the moment, there are fifteen layers available:
8383

8484
- `hydrozones`: Hydrologic Zone Boundaries of British Columbia.
8585

86+
- `wsc_drainages`: Water Survey of Canada Sub-Sub-Drainage Areas
87+
8688
To load any of them, simply type `data(layer_name)`, where `layer_name` is the
8789
name of the layer of interest. Then you can use the data as you would any `sp`
8890
object.
@@ -177,5 +179,7 @@ The data and code in this repository is licensed under multiple licenses.
177179

178180
- Source data in `/data-raw/gw_aquifers`, `/data-raw/water_districts` and `/data-raw/water_precincts` is licensed under the [Open Government License - British Columbia version 2.0](http://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61). See LICENSE.OGL-vbc2.0.pdf in the appropriate directory.
179181

182+
- Source data in `/data-raw/wsc_drainages` is licensed under the [Open Government License - Canada version 2.0](http://open.canada.ca/en/open-government-licence-canada). See LICENSE.Canada-OGL-2.0 in the appropriate directory.
183+
180184

181185
This repository is maintained by [Environmental Reporting BC](http://www2.gov.bc.ca/gov/content?id=FF80E0B985F245CEA62808414D78C41B). Click [here](https://github.com/bcgov/EnvReportBC-RepoList) for a complete list of our repositories on GitHub.

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ install_github("bcgov/bcmaps", build_vignettes = TRUE)
2727

2828
### Usage
2929

30-
At the moment, there are fifteen layers available:
30+
At the moment, there are sixteen layers available:
3131

3232
- `bc_bound`: Coarse provincial boundary of British Columbia (1:7.5M scale).
3333

@@ -63,6 +63,8 @@ At the moment, there are fifteen layers available:
6363

6464
- `hydrozones`: Hydrologic Zone Boundaries of British Columbia.
6565

66+
- `wsc_drainages`: Water Survey of Canada Sub-Sub-Drainage Areas
67+
6668
To load any of them, simply type `data(layer_name)`, where `layer_name` is the name of the layer of interest. Then you can use the data as you would any `sp` object.
6769

6870
A couple of simple examples:
@@ -169,4 +171,6 @@ The data and code in this repository is licensed under multiple licenses.
169171

170172
- Source data in `/data-raw/gw_aquifers`, `/data-raw/water_districts` and `/data-raw/water_precincts` is licensed under the [Open Government License - British Columbia version 2.0](http://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61). See LICENSE.OGL-vbc2.0.pdf in the appropriate directory.
171173

174+
- Source data in `/data-raw/wsc_drainages` is licensed under the [Open Government License - Canada version 2.0](http://open.canada.ca/en/open-government-licence-canada). See LICENSE.Canada-OGL-2.0 in the appropriate directory.
175+
172176
This repository is maintained by [Environmental Reporting BC](http://www2.gov.bc.ca/gov/content?id=FF80E0B985F245CEA62808414D78C41B). Click [here](https://github.com/bcgov/EnvReportBC-RepoList) for a complete list of our repositories on GitHub.

data-raw/process_wsc_drainages.R

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright 2016 Province of British Columbia
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and limitations under the License.
12+
13+
library("sp")
14+
library("rgdal")
15+
library("devtools")
16+
17+
wsc_drainages_zip <- "data-raw/wsc_drainages/wsc_drainages.zip"
18+
19+
unzip(wsc_drainages_zip, exdir = "data-raw/wsc_drainages")
20+
21+
wsc_drainages <- readOGR(dsn = "data-raw/wsc_drainages/SSDA",
22+
layer = "SSDA_polygon", stringsAsFactors = FALSE)
23+
24+
wsc_drainages <- spTransform(wsc_drainages, "+init=epsg:3005")
25+
26+
## deal with a non ASCII character in the data
27+
wsc_drainages$WSCSSDA_EN <- iconv(wsc_drainages$WSCSSDA_EN, "UTF-8", sub = "")
28+
29+
use_data(wsc_drainages, overwrite = TRUE, compress = "xz")

data-raw/wsc_drainages/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SSDA
2+
README.txt
3+
contents_of_order.txt
4+
licence.txt
5+
SSDA.html
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
http://open.canada.ca/en/open-government-licence-canada
2+
3+
Open Government Licence - Canada
4+
5+
You are encouraged to use the Information that is available under this licence with only a few conditions.
6+
Using Information under this licence
7+
8+
Use of any Information indicates your acceptance of the terms below.
9+
The Information Provider grants you a worldwide, royalty-free, perpetual, non-exclusive licence to use the Information, including for commercial purposes, subject to the terms below.
10+
11+
You are free to:
12+
13+
Copy, modify, publish, translate, adapt, distribute or otherwise use the Information in any medium, mode or format for any lawful purpose.
14+
15+
You must, where you do any of the above:
16+
17+
Acknowledge the source of the Information by including any attribution statement specified by the Information Provider(s) and, where possible, provide a link to this licence.
18+
If the Information Provider does not provide a specific attribution statement, or if you are using Information from several information providers and multiple attributions are not practical for your product or application, you must use the following attribution statement:
19+
20+
Contains information licensed under the Open Government Licence – Canada.
21+
22+
The terms of this licence are important, and if you fail to comply with any of them, the rights granted to you under this licence, or any similar licence granted by the Information Provider, will end automatically.
23+
Exemptions
24+
25+
This licence does not grant you any right to use:
26+
27+
Personal Information;
28+
third party rights the Information Provider is not authorized to license;
29+
the names, crests, logos, or other official symbols of the Information Provider; and
30+
Information subject to other intellectual property rights, including patents, trade-marks and official marks.
31+
32+
Non-endorsement
33+
34+
This licence does not grant you any right to use the Information in a way that suggests any official status or that the Information Provider endorses you or your use of the Information.
35+
No Warranty
36+
37+
The Information is licensed “as is”, and the Information Provider excludes all representations, warranties, obligations, and liabilities, whether express or implied, to the maximum extent permitted by law.
38+
39+
The Information Provider is not liable for any errors or omissions in the Information, and will not under any circumstances be liable for any direct, indirect, special, incidental, consequential, or other loss, injury or damage caused by its use or otherwise arising in connection with this licence or the Information, even if specifically advised of the possibility of such loss, injury or damage.
40+
Governing Law
41+
42+
This licence is governed by the laws of the province of Ontario and the applicable laws of Canada.
43+
44+
Legal proceedings related to this licence may only be brought in the courts of Ontario or the Federal Court of Canada.
45+
Definitions
46+
47+
In this licence, the terms below have the following meanings:
48+
49+
"Information"
50+
means information resources protected by copyright or other information that is offered for use under the terms of this licence.
51+
"Information Provider"
52+
means Her Majesty the Queen in right of Canada.
53+
“Personal Information”
54+
means “personal information” as defined in section 3 of the Privacy Act, R.S.C. 1985, c. P-21.
55+
"You"
56+
means the natural or legal person, or body of persons corporate or incorporate, acquiring rights under this licence.
57+
58+
Versioning
59+
60+
This is version 2.0 of the Open Government Licence – Canada. The Information Provider may make changes to the terms of this licence from time to time and issue a new version of the licence. Your use of the Information will be governed by the terms of the licence in force as of the date you accessed the information.
61+
62+
Date modified:
63+
2015-03-11
64+
65+

data-raw/wsc_drainages/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Water Survey of Canada Sub-Sub-Drainage Areas
2+
3+
The file `wsc_drainages.zip` contains the Water Survey of Canada Sub-Sub-Drainage Areas, downloaded from [DataBC](https://catalogue.data.gov.bc.ca/dataset/water-survey-of-canada-sub-sub-drainage-areas) under the ([Open Government License - Canada](http://open.canada.ca/en/open-government-licence-canada)).
11.3 MB
Binary file not shown.

0 commit comments

Comments
 (0)