knitr::opts_chunk$set(
    echo = FALSE,
    message = FALSE,
    warning = FALSE)
  options(knitr.kable.NA = "",
          knitr.table.format = "pandoc")

datadir <- "C:/A_Mal/Rcode/AbGeo026/geostat/" # change this to suit
options("show.signif.stars"=FALSE,"stringsAsFactors"=FALSE,
        "max.print"=50000,"width"=240)

library(rutilsMH)
library(diagrams)
#library(r4cpue)
library(abspatial)
library(sp)
suppressPackageStartupMessages(library(rgdal))
suppressPackageStartupMessages(library(knitr))
library(captioner)

tab_nums <- captioner(prefix = "Table")
fig_nums <- captioner(prefix = "Figure")
equ_nums <- captioner(prefix = "Equ ")
l

Introduction

The GPS data-logger data provides location information every ten seconds for the duration of each dive event. Craig has synthesized such information in two ways: 1) he has placed a kernel density estimate over each dive event, which enables different percentile areas within each kernel to be considered, and 2) after placing a 1-hectare hexagonal grid around the coastline of Tasmania he has determined how much effort (gps points) has occurred in each one and allocated the catch taken in each dive event in proportion to the effort.

Here it is the intention to examine some of the implications for the fishery implicit in the hexagon data sets. First we shall detail the contents of those data sets and then how they can be used. The primary aim is to discover what information is available so that its many uses can be examined with confidence.

First we will list the data files already available.

r tab_nums("T1", caption= " The available data files as provided by Craig. Those files with Kud in their names relate to Kernal Densities, with the associated number depicting the contour, hence AllKud90 is the 90% kernal density for all records. The fullspatial file is all kernal densities together. The G1Ha files are the 1 hectare grids for blacklip and greenlip. The last three files still need investigation.")

files <- dir(datadir)
kable(files, col.names=c("Files"))
l

Blacklip 1 Hectare Grid Data

First we need to import the GPS data. Initially we will use the blacklip 1-hectare grid data to illustrate various operations. Here we need to use the base function called readRDS to read in an object that Craig saved, in this case it is G1Ha_2019_05_13.rds. To avoid having to use various GIS functions from sp and other packages just to plot up a few maps the first thing we do is retrieve the original latitude and longitude for each row of data. For that we use the abspatial package function getlatlong which extracts the data object from the SpatialPolygonsDataFrame, converts that to a simple data.frame and combines that with columns of longitude and latitude. First we will generate the data-set and then print its properties.

# blacklip 1 Ha grid locations
filename <- "G1Ha_2019_05_13.rds"
ab <- readRDS(paste0(datadir,filename))#get spatial obj
abdat <- getlatlong(ab)     # convert to data.frame + lat long
abdat$occur <- apply(abdat[,5:11],1,countgtzero)
props <- properties(abdat)  # characterize each field in data.frame
noid <- dim(abdat)[1]

\newline

kable(props[,1:4])          # tabulate the characteristics of abdat

\newline

There are r noid individual hexagonal grid cells defined around the Tasmanian coast from which abalone have been taken at least in some of the years 2012 - 2018. The location of each of these r noid unique hexagonal grid cells (or oids) is detailed by statistical zone, blockno, and subblockno. In addition there are also the distance from the closest shoreline and the latitude and longitude of each oid's centroid. Then, for each of the years 2012 - 2018 there is listed the total blacklip abalone catch (prefix blkg) in kg, the number of separate days in which it was fished, (prefix day), the number of minutes of effort summed for each year (prefix mins), the number of divers to visit in a given year (prefix divers), and finally the kg/day in each year (prefix kgday).

To gain an understanding of the spread of blacklip data we can now plot up the location of each of the active 1-hectare grids. This is using functions from the abspatial package. Where the coastline can be seen reflects areas which were not fished over that seven year period; generally this implies the coastline was unsuitable for abalone or was closed to all fishing.

leftlong <- 143.5;  rightlong <- 148.75 
uplat <- -39.0;  downlat <- -44.0 
alltas <- c(leftlong,rightlong,uplat,downlat)
maptas(view=alltas,gridon=1.0) 
mappoints(view=alltas,abdat) 

r fig_nums("F1",caption=" A schematic map of the coastline of Tasmania (black line) combined with the locations of the centroids of each of the 58,193 1-hectare hexagonal grids (red dots) that reported data sometime between 2012 - 2018.")

\newline

Given the scale of the map the details of any one area are barely visible. If we focus on a particular location, say Maria Island then more exact details become apparent.

maria <- c(148,148.175,-42.55,-42.75)
maptas(view=maria,gridon=0.05) 
mappoints(view=maria,abdat) 

r fig_nums("F2",caption=" A schematic map of the coastline of Maria Island on the east coast of Tasmania (black line) combined with the locations of the centroids of each of the active 1-hectare hexagonal grids (red dots). The dashed lines are at every 0.05 of degree.")

\newline

With the increased scale of the map of Maria Island it is possible to see some structure in the grids as they extend out from the coast to different extents in different locations. Even more detail can be see by zooming in again, this time to the bottom half of Maria Island.

mariaS <- c(148,148.1,-42.675,-42.75) # left, right, up and down
maptas(view=mariaS,gridon=0.04) 
mappoints(view=mariaS,abdat,Long="long",Lat="lat",incex=0.1) 

r fig_nums("F3",caption=" A schematic map of the southern part of Maria Island (black line). The centroids of each of the active 1-hectare hexagonal grids (red dots) are more clearly apparent at this scale. The coastline is only approximate, which is why in places it appears to overlap with the centroids.")

Variables by Year

South Maria Island

Within the data.frame that we derived from the SpatialPolygonsDataFrame using getlatlong there were an array of different variables for which there was data from 2012 to 2018 and for some there was also a total across years. The values in the file r filename included blkg (blacklip catch), which has a total, days, mins, divers, and kgday. In addition there is an estimate of the distance of the centroid of each grid from the coast.

We have just seen that by using maptas and mappoints we can visualize where catches have been taken from. But if we want to plot where the different amounts of catch came from we need to do something different. Rather than attempting to plot all points in abdat we can first select data from the view (window on Tasmania) we are interested in, then it is possible to generate a quick summary of some of the views properties:

mariaS <- c(148,148.1,-42.675,-42.75) # left, right, up and down
addat <- getpoints(mariaS,abdat) # then use kable(Gsummaryvar(addat,...))
l

The function summarygrid sums the variable selected to produce an average, a bias corrected geometric mean, and the total, as well as the count for each year and a line of totals. The counts are across all oids included in the view that was an input to the getpoints function. In each year only a fraction of the total grids will be fished while the ones not fished are counted as NumNA.

r tab_nums("T2", caption="Summary statistics for the blkg prefix out of G1Ha_2019_03_06.rds file. The number > 0 for the total row depicts the total number of grids in southern Maria from which catches have been taken.")

kable(summarygrid(addat,whchvar="blkg"),digits=c(3,3,3,0,0))

\newline

In addition, it would be helpful if we could plot the relative catches in each year. The size of each symbol relates to the relative catch within each year but the scale of events can be ascertained by considering the sum of catches in r tab_nums("T2",display="cite") and the plot of the total catches across years in the bottom right of r fig_nums("F4",display="cite").

mariaS <- c(148,148.1,-42.675,-42.75) # left, right, up and down
getvar <- "blkg"
label <- c(paste0(getvar,c(2012:2018,"total")))
par(mfcol=c(4,2),mai=c(0.3,0.3,0.05,0.05),oma=c(1.0,1.0,0.0,0.0)) 
par(cex=0.85, mgp=c(1.35,0.35,0), font.axis=7,font=7,font.lab=7)  
for (i in 1:length(label)) { # i=1
  maptas(view=mariaS,gridon=0.1,defineplot=FALSE,maintitle=label[i]) 
  mapgrid(view=mariaS,abdat,inpch=21,x=label[i],mult=3,col=1,infill=2) 
}
mtext("Longitude",side=1,outer=TRUE,line=0.0,cex=1.1,font=7)
mtext("Latitude",side=2,outer=TRUE,line=0.0,cex=1.1,font=7)

r fig_nums("F4",caption=" A schematic map of the blkg variable from the data.frame for south Maria island (defined by mariaS). Each of the seven years and the total are plotted separately. The point size in each year is relative to the maximum catch in each year.")

We can do the same type of plot for the amount of effort in each year as mins:

\newline

mariaS <- c(148,148.1,-42.675,-42.75) # left, right, up and down
getvar <- "mins"
addat <- getpoints(mariaS,abdat) 
ans_mar <- summarygrid(addat,getvar)# then use kable(ans_mar,...))

r tab_nums("T3", caption=paste0(" Summary statistics for the mins prefix out of ", filename," file restricted to southern Maria Island. The number > 0 for the total row depicts the total number of grids in southern Maria from which catches have been taken."))

kable(ans_mar,digits=c(3,3,3,0,0))

\newline

mariaS <- c(148,148.1,-42.675,-42.75) # left, right, up and down
getvar <- "mins"
label <- c(paste0(getvar,c(2012:2018,"total")))
par(mfcol=c(4,2),mai=c(0.3,0.3,0.05,0.05),oma=c(1.0,1.0,0.0,0.0)) 
par(cex=0.85, mgp=c(1.35,0.35,0), font.axis=7,font=7,font.lab=7)  
for (i in 1:length(label)) {
  maptas(view=mariaS,gridon=0.04,defineplot=FALSE,maintitle=label[i]) 
  mapgrid(view=mariaS,abdat,inpch=21,x=label[i],mult=3,col=1,infill=2) 
}
mtext("Longitude",side=1,outer=TRUE,line=0.0,cex=1.1,font=7)
mtext("Latitude",side=2,outer=TRUE,line=0.0,cex=1.1,font=7)

r fig_nums("F5",caption=" A schematic map of the mins variable from the data.frame for south Maria island (defined by mariaS). The effort in each of the seven years and the total are plotted separately. The point size in each year is relative to the maximum effort in minutes in each year.")

Actaeon Islands

We can do the same for the Actaeon Islands, but because of the shape of the area we will need to plot the eight graphs in two sets of four. Also we will now use the abspatial function plotgrid to generate the graphic more rapidly. First the 2012 - 2015 (r fig_nums("F6", display="cite")) and then the 2016 - 2018 and the total blkg catches (r fig_nums("F7", display="cite")).

\newline

actaeons <- c(146.98,147.02,-43.51,-43.59)# left, right, up and down
invar <- "blkg"
addat <- getpoints(actaeons,abdat) 
ans_act <- summarygrid(addat,invar) # then use kable(ans_act,...)

r tab_nums("T4", caption=" Summary statistics for the blkg prefix out of G1Ha_2019_03_06.rds file for the actaeons view window. The number > 0 for the total row depicts the total number of grids in southern Maria from which catches have been taken.")

kable(ans_act,digits=c(3,3,3,0,0))
actaeons <- c(146.98,147.02,-43.51,-43.59) # left, right, up and down
label <- c(paste0("blkg",c(2012:2018,"total")))
plotgrid(actaeons,abdat,plots=c(2,2),label,index=1:4)

r fig_nums("F6",caption=" A schematic map of the blkg variable from the data.frame for the Actaeon islands (defined by actaeons). The catchs, as kg, in each of the first four years are plotted separately. The point size in each year is relative to the maximum catch in kg in each year.")

plotgrid(actaeons,abdat,plots=c(2,2),label,index=5:8)

r fig_nums("F7",caption=" A schematic map of the blkg variable from the data.frame for the Actaeon islands (defined by actaeons). The catchs, as kg, in each of the last three years and the total across years are plotted separately. The point size in each year is relative to the maximum catch in kg in each year.")

l

Spatial Usage Through Years

Introduction

The visualization and tabulation of abalone catch and effort data from selected geographical areas is valuable for summarizing events. But the spatial data provides opportunities to understand far more about how the divers spread their effort and resulting catches.

Changing Area Usage Through Time

There are currently seven years of GPS data-logger information and that enables a characterization of the total number of hexagon grids visited across those seven years, 2012 - 2018 (r fig_nums("F2",display="cite"), r fig_nums("F5", display="cite")). Further fishing may identify further oids used by divers but the increase in previous unknown oids tends to declines with increasing years of data. We can select a sub-set of the total data.frame for a particular region and then step through each year's data identifying the oids with positive catches (and recording their location in the total data.frame) and then identifying which ones are previously unknown. If we examine the occurrence of blacklip catches the data has the following appearance.

r tab_nums("T5", caption=" The first ten hexagon records of the blacklip catches from the eastern zone block 13, for the years 2012 - 2018. The oid number is the unique identifier used for each hexagon around Tasmania and repeat denotes the number of time a particular hexagon is visited over the seven years of data.")

#data(abdat)
 addat <- getsubblock(c("13C","13D","13E"),abdat)
 yrs <- 2012:2018
 pickcol <- paste0("blkg",yrs)
 nyr <- length(yrs)
 numoids <- numeric(nyr)
 kable(addat[1:10,c(5:11,51,54)],digits=c(3,3,3,3,3,3,3,0,0))

\newline

By plotting up the number of repeats it is possible to determine the number of oids which are visited in every year and how many are only visited once across the seven years.

parset()
outh <- inthist(addat[,"repeat"],col=2,width=0.9,border=3,xlabel="Years Visited",
                ylabel="Frequency")
text(2.75,1000,"Value  Count",cex=1.25,pos=4)
inc <- 60
for (i in 1:7) {
   label <- paste0(outh[i,"values"],"         ",outh[i,"counts"])
   text(3,(1000 - (i*inc)),label,cex=1.2,pos=4)
}

r fig_nums("F8",caption=" The count of how many hexagon grids in eastern zone Block 13 were visited at least once in each of seven years. Out of a total of 2560 hexagon grids 1078 were visited every year while 464 were only visited in one year out of seven.")

\newline

Then how the total number of hexagons currently know developed through the seven years can be determined. Of course, fishing has been occurring for many years so the first year of GPS observations will identify a large number of previously unknown hexagons, after the first year, however, the number of new hexagons visited can be expected to decline.

\newline

r tab_nums("T5a", caption=" The cumulative number of hexagonal grids each year from 2012 - 2018 for the Acteaons region (subblocks 13C, 13D, and 13E). In addition, the unique hexagons visited in each year and the total visted each year.")

 pickoid <- vector("list",nyr)
 names(pickoid) <- yrs
 pick <- which(addat[,pickcol[1]] > 0)
 pickoid[[1]] <- pick
 yra <- addat[pick,]
 buildoid <- unique(yra[,"oid"])
 numoids[1] <- length(buildoid)

 for (yr in 2:nyr) { # yr = 2
   pick <- which(addat[,pickcol[yr]] > 0)
   pickoid[[yr]] <- pick
   buildoid <- unique(c(buildoid,addat[pick,"oid"]))
   numoids[yr] <- length(buildoid)
 }
 eachyr <- sapply(pickoid,length)
 out <- cbind("year"=yrs,"cumul"=numoids,"byYear"=1:nyr,"eachyr"=eachyr) 
 rownames(out) <- yrs
 out[1,"byYear"] <- out[1,"cumul"]
 for (i in 2:nyr) out[i,"byYear"] <- out[i,"cumul"]-out[(i-1),"cumul"]
 kable(out)

\newline

The sum of the byYear column sums to the cumulative total (in this case r sum(out[,"byYear"])). Comparing the total number of hexagons visited each year (column eachyr) with how many unique hexagons occur each year it is confirmed that a relatively large number must be visited every year (r fig_nums("F8", display="cite")).

As a final examination of the influence of which hexagons are most important, we can sum the annual catches for the hexagons which are visited in different numbers of years across the 2012 - 2018 period. The expectation is that those visited only once would generate the least catch in each year.

label <- c(paste0("Ton",2012:2018),"Count")
rowlab <- c(1:7,"total")
result <- matrix(0,nrow=(nyr+1),ncol=(nyr+1),dimnames=list(rowlab,label))
for (rep in 1:nyr) {
  pick <- which(addat[,"occur"] == rep)
  result[rep,1:nyr] <- colSums(addat[pick,c(5:11)],na.rm=TRUE)/1000
}
result[(nyr+1),1:nyr] <- colSums(addat[,c(5:11)],na.rm=TRUE)/1000
result[,"Count"] <- c(outh[,"counts"],sum(outh[,"counts"]))

label <- paste0("Hrs",2012:2018)
rowlab <- c(1:7,"total")
resultE <- matrix(0,nrow=(nyr+1),ncol=nyr,dimnames=list(rowlab,label))
for (rep in 1:nyr) {
  pick <- which(addat[,"occur"] == rep)
  resultE[rep,] <- colSums(addat[pick,c(21:27)],na.rm=TRUE)/60
}
resultE[(nyr+1),] <- colSums(addat[,c(21:27)],na.rm=TRUE)/60

r tab_nums("T6", caption=" The blacklip catch and effort for each of the seven visitation types of hexagon grids for each year from 2012 - 2018 for the Acteaons region (subblocks 13C, 13D, and 13E). The 1 - 7 represent the number of years for which positive catches occurred. The Count is the frequency of such heaxgaons out of the total.")

kable(result,digits=c(3,3,3,3,3,3,3,0),row.names=TRUE)
kable(resultE,digits=c(3,3,3,3,3,3,3),row.names=TRUE)

\newline

r tab_nums("T6a", caption=" The proportion of catch and effort for each of the seven visitation types of hexagon grids for each year from 2012 - 2018 for the Acteaons region (subblocks 13C, 13D, and 13E).")

res1 <- prop.table(result[1:7,1:7],2) * 100.0
res2 <- prop.table(resultE[1:7,],2) * 100.0
kable(res1,digits=c(3,3,3,3,3,3,3),row.names=TRUE)
kable(res2,digits=c(3,3,3,3,3,3,3),row.names=TRUE)

\newline

Remarkably, the 1078 hexagons out of the total of 2560 (42%) that are visited in all seven years contribute 90% or greater of the total catch in each year, with an average of 92.4% across all seven years. Those grids visited in six out of seven years then contribute only between 2.6 - 5.8% of the catch, with a mean of 4.1%, and the mean for those hexagons visited in only five years was 1.5%. However, the amount of time/effort spent in these different categories of hexagon has a very similar distribution.

The Catch and Effort Distribution in the 7-year Group

We considered the distribution of catches and of effort among the seven different classes of hexagons and it was clear that the 7-year group (those visited at least once each year) were dominant. But it can be expected that not all such hexagons are equally productive. So we can select out the 7-year hexagons and examine the distribution of catches among them as well as the distribution of effort.

pick <- which(addat[,"occur"] == 7)
ab7 <- droplevels(addat[pick,])
label <- paste0("blkg",2012:2018)
columns <- colnames(ab7)
outh <- vector("list",7)
names(outh) <- 2012:2018
par(mfrow=c(4,2),mai=c(0.45,0.45,0.05,0.05),oma=c(0.0,0,0.0,0.0)) 
par(cex=0.85, mgp=c(1.35,0.35,0), font.axis=7,font=7,font.lab=7)  
for (yr in 1:7) {
   pickyr <- which(columns == label[yr])
   pickpos <- which(ab7[,pickyr] > 0)
   outh[[yr]] <- hist((ab7[pickpos,pickyr]),breaks=seq(0,1700,100),col=2,
                      main="",xlab="Catch Level Kgs")
   mtext(label[yr],side=3,line=-1.5,outer=FALSE)
}

r fig_nums("F9",caption=" The frequency distribution of catches from the 7-year class of hexagons within the eastern zone block 13 subblocks for the years 2012 - 2018.")

\newline

The counts by catch level can be tabulated.

\newline

r tab_nums("T6b", caption=" The frequency of different catch levels for the 7-year class of hexagons for each year from 2012 - 2018 for the Acteaons region (subblocks 13C,13D, and 13E). The rownames are the middle value of each catch-class in kgs and avprop is the average proportion of each total for each catch level.")

counts <- sapply(outh,"[[","counts")
rownames(counts) <- outh[[1]]$mids
avprop <- apply(apply(prop.table(counts,2),2,cumsum),1,mean)
countsP <- cbind(counts,avprop)
kable(countsP,digits=c(0,0,0,0,0,0,0,3))

\newline

It is clear that on average, over 95% of hexagons have catches of less than 600kg, with 48.9% (almost half) having total annual catches less than 100kg. We can plot up the r sum(out[,"byYear"]) hexagons, and then add, on top the 7-year sub-set, and on top of that we could add the sub-sub-set of 7-year hexagons having catches > 100kg (r fig_nums("F9a", display="cite")). Using the average catches across seven years will obscure some of the inter-annual variation as the proportion of average annual catches > 100kg was 588 out of 1078 (54.5% rather than 48.9%). Nevertheless, the focus of the fishery becomes more clear under such an analysis. Approximately 50% of the catches come from only 588 hexagons out of 2560 (about 23%).

\newline

Map the Classes

actaeons <- c(146.871,147.03,-43.5025,-43.64)# left, right, up and down
invar <- "blkg"
addat <- getpoints(actaeons,abdat) 
maptas(view=actaeons,gridon=0.05) 
pick <- which(addat[,"occur"] == 7)
ab7 <- droplevels(addat[pick,])
avcatch <- apply(ab7[,5:11],1,mean)
pickgt100 <- which(avcatch > 100.0)
mappoints(actaeons,addat)
mappoints(actaeons,ab7,incol=4)
mappoints(actaeons,ab7[pickgt100,],incol=3)
mapLand()

r fig_nums("F9a",caption=" The 2560 hexagon grids visited over the years 2012 - 2018 in the eastern zone Block 13 region. The red dots include all hexagons visited across the seven years, the blue dots are the locations visited every year, and the green dots are those hexagons in which the average annual catch > 100kg.")

\newline

l

Hexagon Usage by Year

We can dissect the usage of hexagons in more detail by examining how the usage alters each year. If we consider how the divers operate, each year, within a given region they will visit different reefs, which here have the 1-hectare hexagon grid laid over the top of them. Between two years we would expect to see an array of hexagons only visited in year 1, a different array only visited in year 2, and an array visited in both years. With respect to a current year it will have a previous year (e.g. if 2013 is the current year its previous year would be 2012; r fig_nums("F10", display="cite")). Thus, starting in 2012 it is possible to identify the hexagons in p, c, and pc, and further, we can then characterize the catch and effort in each of those categories. As we have already seen, the shared hexagons between years (pc) contribute the most to the productivity (as catches) and absorb the most effort.

canvas(xstart=5,xfinish=90,ystart=20,yfinish=100)
vals <- seq(0,100,10)
circle(origx=35,origy=60,radius=30,lwd=2)
circle(origx=55,origy=60,radius=30,lwd=2,col=1)
text(25,98,"Previous Year",cex=1.25,pos=1)
text(70,98,"Current Year",cex=1.25,pos=1)
text(15,65,"p",cex=2,pos=1)
text(75,65,"c",cex=2,pos=1)
text(45,65,"pc",cex=2,pos=1)

r fig_nums("F10",caption=" A Venn diagram illustrating the relationship between hexagons used in the current year relative to those used in the year previous and the following year. p = previous, c = current, and pc refers to hexagons shared between the two years.")

\newline

We go take this form of analysis further by extending the process to triplets of years. Thus, with the years 2012 - 2018 we would have the pair 2012 - 2013, then four triplets 2013 - 2015, 2014 - 2016, 2015 - 2017, and 2016 - 2018, and then the final pair 2017 - 2018 (r fig_nums("F11", display="cite")). It is again possible to identify each of the sub-sets of hexagons, which would enable the fine detail of fishing to be examined across years for the seven years of data available.

\newline

canvas(xstart=5,xfinish=95,ystart=8)
vals <- seq(0,100,10)
circle(origx=35,origy=70,radius=30,lwd=2)
circle(origx=65,origy=60,radius=30,lwd=2,col=1)
circle(origx=45,origy=40,radius=30,lwd=2,col=1)
text(35,105,"Previous Year",cex=1.25,pos=1)
text(70,95,"Current Year",cex=1.25,pos=1)
text(45,10,"Next Year",cex=1.25,pos=1)
text(30,80,"p",cex=2,pos=1)
text(80,65,"c",cex=2,pos=1)
text(40,30,"n",cex=2,pos=1)
text(53,80,"pc",cex=2,pos=1)
text(29,58,"pn",cex=2,pos=1)
text(62,47,"cn",cex=2,pos=1)
text(50,60,"pcn",cex=2,pos=1)

r fig_nums("F11",caption=" A Venn diagram illustrating the relationship between hexagons used in the current year relative to those used in the year previous and the following year. p = previous, c = current, n = next, and combinations of letters refer to combinations of years.")

\newline

r tab_nums("T9", caption=" A tabulation of the different compoents of the heaxgon usage in each year. Pairs of years were compared at the start and finish while triplets were compared between the ends. Records are hexagons with positive catches, Missed are how many known hexagons were not visited, Prev = p, PrevCurr = pc, PrevNext = pn, Shared = pcn, Curr = c, CurrNext = cn, and Next = n")

#data(abdat)
addat <- getsubblock(c("13C","13D","13E"),abdat)
addat[,"oid"] <- as.numeric(addat[,"oid"])
whchvar <- "blkg"
yrs <- 2012:2018
answer <- overlap(addat,whichvar=whchvar,yrs=yrs)
kable(answer$answer)

\newline

We have already seen (r fig_nums("F8", display="cite")), that the number of hexagons shared across all years across subblocks 13C, 13D, and 13E, was 1078, but the number shared between sequential years is either pc + pcn, or cn + pcn (so when there is no pcn it is just pc or cn). At the same time, the hexagons unique to each year is best characterized by c. Of course, there are also hexagons shared between the first year of a triplet and the last, and these can be examined to answer questions about return rates.



haddonm/abspatial documentation built on June 7, 2019, 9:54 a.m.