Home

Awesome

<!-- README.md is generated from README.Rmd. Please edit that file -->

img License

Analysis of trends and current amounts of protected lands and waters in B.C.

A set of R scripts to complete the analysis behind the Environmental Indicator Protected Lands & Waters in B.C., published by Environmental Reporting BC in June 2016.

Note: Moving forward this analysis and indicator will be updated using the analysis and approach found here.

Usage

Data

The analysis uses data from several sources; they should be downloaded and stored in the data folder:

Code

There are four core scripts that are required for the analysis; they need to be run in order:

The file fun.R contains a few custom functions required for the analysis.

Required R packages:

Spatial packages:

sp
rgdal
rgeos
raster
maptools
geojsonio
bcmaps
rmapshaper

General data manipulation packages:

dplyr
tidyr
readr

Plotting packages:

ggplot2
RColorBrewer
ggthemes
envreportutils

Most packages used in the analysis can be installed from CRAN using install.packages(), but there are a few you will need to install using devtools:

install.packages("devtools") # If you don't already have it installed

library(devtools)
install_github("bcgov/envreportutils")
install_github("bcgov/bcmaps")

Other required software

You will also need the mapshaper node package, and for this you will require Node.js to be installed. You can install it from here, then on the command line type:

npm install -g mapshaper

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.

License

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.