Skip to content

UNFAOstatistics/pocketbook_database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database generator for statistical yearbook

Setting up the environment in linux ubuntu 16.04/mint 18

System libraries

apt install git -y
apt-get install xclip -y
echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | tee -a /etc/apt/sources.list
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 -y
gpg -a --export E084DAB9 | apt-key add -
apt-get update
apt-get install r-base r-base-dev -y
apt-get install r-cran-littler
apt-get install libcurl4-openssl-dev libxml2-dev libssl-dev libfreetype6-dev libcairo-dev -y
apt-get install libgdal1-dev libproj-dev -y
apt install libssl-dev
apt install libssh2-1-dev
apt install libcurl4-openssl-dev
apt install libxml2-dev
apt install texlive-full -y
apt install dtrx

install R-packages in console

R -e 'install.packages("devtools", repos = "https://cloud.r-project.org")' 
R -e 'devtools::install_github("unfaostatistics/gisfao")' 
R -e 'devtools::install_github("rstudio/flexdashboard")' 
R -e 'devtools::install_github("rstudio/rmarkdown")'
R -e 'devtools::install_github("muuankarski/countrycode.multilang")'

Open R and run the following code

PACKAGES <- scan(url("http://muuankarski.kapsi.fi/luntti/r-paketit.txt"), what="character")
inst <- match(PACKAGES, .packages(all=TRUE))
need <- which(is.na(inst))
if (length(need) > 0) install.packages(PACKAGES[need])

Download and install Rstudio

Open Rstudio

  1. Create folder ~/faosync/pocketbooks/ with dir.create(path = "~/faosync/pocketbooks/", recursive = TRUE)
  2. start two new projects from version control (git) into directory above with following urls
    • pocketbook_database: https://github.com/UNFAOstatistics/pocketbook_database
    • pocketbook: https://github.com/UNFAOstatistics/pocketbook
  3. sun source("run.R") or execute run.R interactively. Follow the instructions at the top of the script.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published