This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(mgcv) | |
library(raster) | |
library(magrittr) | |
library(sp) | |
# Generate a dummy probability surface using Swaziland as an example | |
swz_elev <- raster::getData('alt', country="SWZ") | |
swz_prob <- swz_elev / cellStats(swz_elev, max) | |
# Generate some random points to act as sampling sites |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(raster) | |
library(RandomFields) | |
library(R2OpenBUGS) | |
library(coda) | |
library(R2jags) | |
library(mvtnorm) | |
# Compare JAGS manual method to spatial.exp in BUGS | |
# simulate data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(maptools) | |
library(RColorBrewer) | |
ShehiaShp<-readShapeSpatial("Data/ZnzPolyIncWGS1984.shp",proj4string=CRS("+proj=longlat")) | |
# Import case numbers by Shehia using different travel assumptions | |
Shehia_Inc_Trav<-read.csv("Data/Shehia_Inc_Travel.csv") | |
# Generate cats for colors | |
cols <- brewer.pal(10, "RdBu")[10:1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyUI(fluidPage( | |
titlePanel("Malaria incidence Zanzibar"), | |
sidebarLayout( | |
sidebarPanel( | |
selectInput("season", | |
label = "Choose season", | |
choices = c("Both","Wet","Dry")), | |