Skip to content

Latest commit

 

History

History
95 lines (65 loc) · 2.71 KB

README.md

File metadata and controls

95 lines (65 loc) · 2.71 KB

Introduction

This repository contains the code that implements the Shiny app for the Predicting bat dispersion through urban environments project. Most of the calculations are performed by R to set up the inputs to the Circuitscape calculation that is implemented in Julia. The app queries a PostGIS database for the vector and raster data required to perform the calculations.

Installation

Centos Packages

Install the following Centos packages with yum:

sudo yum install udunits2-devel
sudo yum install geos geos-devel
sudo yum install postgresql-devel

R Packages

Run the following commands in the R console to install the required packages:

install.packages("glue")
install.packages("JuliaCall")
install.packages("leaflet")
install.packages("R6")
install.packages("raster")
install.packages("rpostgis")
install.packages("sf")
install.packages("shiny")
install.packages("shinyBS")
install.packages("shinyjs")
install.packages("stringr")
install.packages("uuid")
install.packages("vroom")

Julia Package

Run the following commands in the Julia console to install the required Circuitscape package:

using Pkg
Pkg.add("Circuitscape")

Environment Variables

The default values for the PostgreSQL database name and the PostgreSQL port are:

DATABASE_NAME="os"
DATABASE_PORT=5432

Configure any of these values by creating a .env file with different values, e.g.:

DATABASE_PORT=5555
DATABASE_NAME="my-bat-data"

Software Versions

The app runs with the following software versions:

Software Version
R 4.0.4
Julia 1.5.4
Postgres 13.2
PostGIS 3.1.1

Data

The data is all open source. The shapefiles for buildings, rivers and roads are from Ordnance Survey:

The landcover is from the CEH landcover map:

Lidar DTM/DSM is also used to figure out where hedgerows/forest is, which is available from the government:

Resources

Some useful articles: