bcgov / land-designations-indicator

R scripts for an indicator on land designations that contribute to conservation in B.C. published on Environmental Reporting BC
Apache License 2.0
1 stars 4 forks source link
data-science env r rstats

img

Analysis of land designations that contribute to conservation

This repository contains R code that calculates summaries of the amount of land designated in B.C. that contributes to conservation. It supports this Environmental Reporting BC indicator.

Usage

R packages required:

Other than bcmaps and envreportutils, all required packages are available from CRAN

Data

The inputs required to run this analysis can be obtained by downloading the data via the B.C. Data Catalogue. They are released under the Open Government Licence - British Columbia:

Place these in the data folder of this repository. You will also require BEC_BIOGEOCLIMATIC_POLY.gdb from here and ERC_ECOSECTIONS_SP.gdb from here

The data-raw folder contains a file sources.csv that lists all of the source land designation layers used in the analysis.

Running the analysis

Designated Lands Python script:

Input data was created by running the python script here. Please note that the code there is still being developed to make it more efficient.

It was run using the following commands:

## Download the Biogeoclimatic Zone layer from here: 
## https://catalogue.data.gov.bc.ca/dataset/biogeoclimatic-ecosystem-classification-bec-map
## and store it in your working directory

## Download the Ecosection layer from here: 
## https://catalogue.data.gov.bc.ca/dataset/ecosections-ecoregion-ecosystem-classification-of-british-columbia
## and store it in your working directory

python designatedlands.py create_db

python designatedlands.py load

python designatedlands.py process

python designatedlands.py dump --out_file=designatedlands.gpkg

python designatedlands.py overlay BEC_BIOGEOCLIMATIC_POLY.gdb --in_layer=WHSE_FOREST_VEGETATION_BEC_BIOGEOCLIMATIC_POLY_polygon --new_layer_name=bec

python designatedlands.py overlay ERC_ECOSECTIONS_SP.gdb --in_layer=WHSE_TERRESTRIAL_ECOLOGY_ERC_ECOSECTIONS_SP_polygon --new_layer_name=eco

python designatedlands.py dump --out_table=bec_overlay --out_file=lands_bec.gpkg --aggregate_fields="bc_boundary,designation,category,zone,subzone,variant,phase,map_label"

python designatedlands.py dump --out_table=eco_overlay --out_file=lands_eco.gpkg --aggregate_fields="bc_boundary,designation,category,parent_ecoregion_code,ecosection_code,ecosection_name"

Getting Help or Reporting an Issue

To report bugs/issues/feature requests, please file an issue.

How to Contribute

If you would like to contribute, please see our CONTRIBUTING guidelines.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Licence

Copyright 2016 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at 

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This repository is maintained by Environmental Reporting BC. Click here for a complete list of our repositories on GitHub.