dwmorley / RLUR

Shiny dashboard for Land Use Regression modelling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RLUR: A dashboard for developing and applying Land Use Regression models for air pollution exposure estimation

Morley, D.W. & Gulliver, J (2018) A land use regression variable generation, modelling and prediction tool for air pollution exposure assessment. Environmental Modelling & Software. 105, 17-23.

s1 s2 s3

Developed on R.3.3.2 "Sincere Pumpkin Patch" and RStudio 1.0.136

See the help options in the software for more info on LUR and model development

(1) TO DOWNLOAD

-Click 'Clone or Download' then 'Download zip' button in Github (the green one above right)
-Save the folder somewhere and unzip
-Test data is in the 'testdata' folder

(2) GET R LIBRARIES

-In R. This needs doing only once
-Run the following code to download/install the third-party packages needed

packages <- c("shinydashboard", "shiny", "car", "DT", "caret", "maptools", "rgdal", "raster", "sp", "rgeos", "leaflet", "shinyBS", "RColorBrewer")
if (length(setdiff(packages, rownames(installed.packages()))) > 0) {
  install.packages(setdiff(packages, rownames(installed.packages())))  
}

(3) THERE ARE TWO WAYS TO RUN RLUR, BOTH NEED RSTUDIO

-(A) From local files:
-Open either the downloaded 'server.r' or 'ui.r' file from (1) in RStudio
-Use the drop-down next to 'run app' to make sure 'run external' is checked
-Click 'Run App'

-(B) Directly from GitHub:
-With this method you do not need to download the files as in step (1)
-Just run the following code in RStudio

require(shiny)
runGitHub("RLUR", "dwmorley") 

(4) RUNNING ON A MAC

There is a dependency issue in the Mac version of the R PROJ4 package resulting in the error:

rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files 

The solution is to recompile packages from source

A) Open a new terminal window to run the commands below (i.e. Not in R, a new command line prompt)
B) Install homebrew package manager (http://brew.sh/)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

C) Re-compile OSGEO

brew tap osgeo/osgeo4mac

D) Update PROJ4

brew install proj

E) Restart any R sessions

About

Shiny dashboard for Land Use Regression modelling

License:Other


Languages

Language:R 76.0%Language:HTML 23.3%Language:CSS 0.7%