GithubHelp home page GithubHelp logo

jasonjb82 / rspo_leakage Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 147.31 MB

Packrat project of code used for the analysis in the paper 'Deforestation spillovers from oil palm sustainability certification'

R 100.00%
deforestation indonesia leakage r rspo

rspo_leakage's Introduction

RSPO Leakage

This repository contains the R project set up with the packrat package for code used for the analysis in the paper 'Deforestation spillovers from oil palm sustainability certification' (https://doi.org/10.1088/1748-9326/ab7f0c). This project has a private project library that installs version of libraries and any dependencies used in the code for this project. In addition, the repo contains all data necessary to replicate the paper's analyses.

Instructions on how to download and use the code

  1. Download or clone repository to local machine. If the location of the project folder is in a location that is being backed up by a cloud storage service like Dropbox or Microsoft OneDrive, pause the syncing process to prevent any issues with the package installation process.

  2. Extract files in data.zip(long_kali.csv, master_mill_data.csv and long_kali_metadata.csv) in the input folder into the same folder.

  3. Open R project file rspo_leakage.Rproj in RStudio. Once the project opens, packrat will automatically install into the project private library. The R session will restart when this is completed.

  4. Run packrat::status() in the console to see list of packages used in the code that need to be installed for you to run the code.

  5. Run packrat::restore() in the console to install all required packages and dependencies. If required, a window will pop up requesting RTools to be installed. Install RTools and then re-run packrat::restore() to finishing installing any other packages and dependencies.

  6. Once all packages have been installed, open leakage.R and run the code. Figures, plot and tables will be saved into the output folder.

Additional information and resources on packrat

[1] https://rstudio.github.io/packrat/

[2] http://rstudio-pubs-static.s3.amazonaws.com/221948_fb7215fecb0d49ac903f701fd8d45132.html

[3] https://blog.methodsconsultants.com/posts/using-packrat-with-git-submodules/

rspo_leakage's People

Contributors

jasonjb82 avatar rheilmayr avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.