Learn R Programming

geostatsp (version 0.7.0)

loaloa: Loaloa prevalence data from 197 village surveys

Description

Location and prevalence data from villages, elevation an vegetation index for the study region.

Usage

data("loaloa")

Arguments

format

loaloa is a SpatialPolygonsDataFrame of the data, with columns N being the number of individuals tested and y being the number of positives. elevationLoa is a raster of elevation data. eviLoa is a raster of vegetation index for a specific date. ltLoa is land type. ltLoa is a raster of land types. 1 2 5 6 7 8 9 10 11 12 13 14 15 tempLoa is a raster of average temperature in degrees C.

source

http://www.leg.ufpr.br/doku.php/pessoais:paulojus:mbgbook:datasets for the loaloa data, http://e4ftl01.cr.usgs.gov/MOLT/MOD13Q1.005/ for the EVI data, http://e4ftl01.cr.usgs.gov/MOTA/MCD12Q1.051/ for land type and http://srtm.csi.cgiar.org for the elevation data.

Examples

Run this code
data("loaloa")
plot(loaloa, main="loaloa villages")

# elevation
data("elevationLoa")
plot(elevationLoa, col=terrain.colors(100), main="elevation")
points(loaloa)

# vegetation index
data("eviLoa")
plot(eviLoa, main="evi")
points(loaloa)

data("tempLoa")
plot(tempLoa, main="temperature")
points(loaloa)

data("ltLoa")
# land type, a categorical variable
commonValues  = sort(table(values(ltLoa)),decreasing=TRUE)[1:7]
commonValues=commonValues[!names(commonValues)==0]

thelevels = levels(ltLoa)[[1]]$ID
thebreaks = c(-0.5, 0.5+thelevels)
thecol = rep(NA, length(thelevels))
names(thecol) = as.character(thelevels)

thecol[names(commonValues)] = rainbow(length(commonValues))
plot(ltLoa, breaks=thebreaks, col=thecol,legend=FALSE, main="land type")
legend("bottomleft",fill=thecol[names(commonValues)],
		legend=levels(ltLoa)[[1]][
						match(as.integer(names(commonValues)),
								levels(ltLoa)[[1]]$ID),
						"Category"],
				bty='n'
				)

points(loaloa)

Run the code above in your browser using DataLab