28 Assignment 2

Assignment 2 is be completed individually or with a partner (i.e., the maximum group size is two). Please submit the assignment as a single pdf or html file (one file per individual/group). Save the file as Yourlastname_Assignment2 (e.g., Hefley_Assignment2). Make sure to show your work in R to ensure that I can reproduce your results (e.g., figures, calculations, etc). Upload your completed assignment to Canvas before 5 pm on Friday 9/4/20.

28.1 Motivation and Data

On September 3, 2018 there was an extreme precipitation event that resulted in flooding in Manhattan, KS and the surrounding areas. If you would like to know more about this, check out this website. The R code below can be used to obtain precipitation data from the station that occur between Abilene, KS and Seneca, KS.

Because this was such an extreme event, several weather stations did not record data. Furthermore, there are many locations within the study region that are far away from a weather station. Because of these limitations, using these data to determine the amount of rainfall any particular location received is difficult.

library(maps)
library(maptools)
library(rnoaa)
library(raster)

# Get map of Kansas
map.kansas <- map("state", "kansas", fill = TRUE, plot = FALSE)
map.crs <- CRS("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0")
sf.kansas <- map2SpatialPolygons(map.kansas, IDs = map.kansas$names, proj4string = map.crs)
sf.study.area <- as(extent(c(-97.2139, -96.0642, 38.9172, 39.8342)), "SpatialPolygons")
crs(sf.study.area) <- map.crs


# Get precipitation data (see ?ghcnd_search)
stations.kansas <- ncdc_stations(extent = c(38.9172, -97.2139, 39.8342, -96.0642), 
    limit = 400, startdate = 20180903, enddate = 20180903, token = "iUnJTDhaJfizMyHhyRBOGiEhRkUgQZVj")
pt.stations <- SpatialPointsDataFrame(coords = cbind(stations.kansas$data$longitude, 
    stations.kansas$data$latitude), data = data.frame(stationid = substring(stations.kansas$data$id, 
    7, 1000000L)), proj4string = CRS("+proj=longlat +datum=WGS84 +no_defs"))
pt.stations <- pt.stations[which(substring(stations.kansas$data$id, 1, 5) == 
    "GHCND"), ]

pt.stations$prcp <- NA
for (i in 1:dim(pt.stations)[1]) {
    prcp <- ghcnd_search(stationid = pt.stations$stationid[i], var = "PRCP", 
        date_min = "2018-09-03", date_max = "2018-09-03")$prcp[2]$prcp
    pt.stations$prcp[i] <- ifelse(length(prcp) == 0, NA, prcp)
    Sys.sleep(1/5)
}

# Show first six rows of data
head(data.frame(pt.stations)[, 1:4])

# Plot data
plot(sf.kansas)
plot(sf.study.area, add = TRUE)
plot(pt.stations, add = TRUE, pch = 20, col = rgb(0.5, 0.5, 0.5, 0.5), cex = pt.stations$prcp/2000)

28.2 Goal

You will conduct a statistical analysis from the precipitation data generated by weather stations. The goal of the analysis has three components. The first goal is to make predictions that show the amount of precipitation at any location in an area surrounding Manhattan, KS (i.e., the “box” in the map above of KS.). The second goal is to estimate the maximum precipitation within the area surrounding Manhattan, KS. The third goal is to estimate the location where the maximum precipitation occurred (i.e., estimate the latitude and longitude where the maximum precipitation occured). All estimates and predictions must contain uncertainty quantification.

28.3 Problems

  1. Please write 5-7 sentences describing the data (e.g., how were the data collected?, what is being reported/measured?, what are the units?, basic summary statistics such as the min and max).

  2. Determine the statistical approach that you will use to meet the three goals of the study. Please use words and mathematical notation to explain the exact model you have chosen to use. Make sure to define all relevant mathematical symbols.

  3. Using the statistical approach you chose from question 2, make predictive map that show the amount of precipitation at any location within the study area. Please make sure to quantify the uncertainty associated with any estimated quantity.

  4. Using the statistical approach you chose from question 2, estimate the maximum amount of precipitation that occured within the study area. Please make sure to quantify the uncertainty associated with any estimated quantity.

  5. Using the statistical approach you chose from question 2, estimate the location where the maximum amount of precipitation occured within the study area.

  6. Prepare a short 5 - 7 min presentation that explains your answers to questions 2 - 5. I will ask two individuals/groups to present their results in class on Tuesday Sept. 8. If you are selected to present, I will notify you by 5 pm on Sunday September 6. Please include the material you plan to present as supporting material to this assignment. If you would like, you can prerecord your presentation.