Code Monkey home page Code Monkey logo

gitwic3proj's Introduction

gitwic3proj

Baseline SSP2 assumptions + projection. Make your own scenario and project.

Prepared code for SSP2 projection (five R files)

  1. set scenario details
  2. set statespace
  3. fill statespace
  4. projection
  5. results (graphs/tables)

Setup Folders and copy files

  1. Create a working folder (any name; let us call it 'wic3proj'). We will later created multiple sub-folders
  2. Open RStudio and create an R project in the folder "wic3proj" named "gitwic3proj" (File->New Project->New Directory-> DIRECTORY NAME as "gitwic3proj", a new folder 'gitwic3proj' will be created.
  3. We will now download the files from the github account https://github.com/kcsamir/gitwic3proj and save them in the folder "gitwic3proj". I have shared a zip file for the first day (unzip it and save it in the directory).

R-Studio session ..... [in the class]

  1. Open "Main WIC.r" and start running the first of the code until row 39. Several folders are created. Create "input_wic3proj" and "output_wic3proj" folder in the "data\output" folder
  2. "input_wic3proj" contains all the data files (RData and csv) needed to run the first scenario - SSP2
  3. "output_wic3proj" will contain an additional folder for each scenario (created within the code)
  4. Next, save all the input files provided (via WeChat or email in the input_wic3proj folder)

Now, we will start the scenario (SSP2)

  1. Open the first file "scen_w09_ssp2_emort_efert_emig.r". Let us go through this file.
  2. ... we will setup the scenario file using file "scen_w09*.r"
  3. we will create state-space for our projection "statespace.r" and "fillstatespace.r"
  4. we will project using file "projection.r"
  5. Finally, we will visualize the results using "Report cntry files rmd.r" (sorry for the long name!) and funstack.r

While in the class

  1. We added a missing line to projection.r
  2. We added a line to save files in a CSV format (yet to be updated on github)
  3. shared a data file "wic1_2 and wpp2022 totpop.rda", please save it in the folder ..\data\wic3proj

We will now choose a country (or more if you want)

Day2 - MDM session

  1. Make sure everyone can run the projection
  2. Change fertility assumptions - define a w11 scenario
  3. ...

gitwic3proj's People

Contributors

kcsamir 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.