Sample Data: Bovine Tuberculosis

Source Notebook

Locations of cattle herds in Cornwall (UK) that tested positive for bovine tuberculosis

Details

Locations of cattle herds in Cornwall (United Kingdom) that have tested positive for bovine tuberculosis in the observation region, which is the polygon of Cornwall, annotated with marks including the year of testing, and spoligotype (a qualitative genetic marker).

Examples

Basic Examples (1) 

In[1]:=
ResourceData[\!\(\*
TagBox["\"\<Sample Data: Bovine Tuberculosis\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Bovine Tuberculosis-Input",
AutoDelete->True]\), "Data"]
Out[1]=

Summary of the spatial point data:

In[2]:=
ResourceData[\!\(\*
TagBox["\"\<Sample Data: Bovine Tuberculosis\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Bovine Tuberculosis-Input",
AutoDelete->True]\), "Data"]["Summary"]
Out[2]=

Visualizations (2) 

Plot the spatial point data:

In[3]:=
pplot = ListPlot[ResourceData[\!\(\*
TagBox["\"\<Sample Data: Bovine Tuberculosis\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Bovine Tuberculosis-Input",
AutoDelete->True]\), "Data"], AspectRatio -> 1, PlotStyle -> Black, AxesLabel -> {"Eastings", "Northings"}]
Out[3]=

Visualize smooth point density:

In[4]:=
density = SmoothPointDensity[ResourceData[\!\(\*
TagBox["\"\<Sample Data: Bovine Tuberculosis\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Bovine Tuberculosis-Input",
AutoDelete->True]\), "Data"]]
Out[4]=
In[5]:=
Show[ContourPlot[density[{x, y}], {x, y} \[Element] ResourceData[\!\(\*
TagBox["\"\<Sample Data: Bovine Tuberculosis\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Bovine Tuberculosis-Input",
AutoDelete->True]\), "ObservationRegion"], ColorFunction -> "Rainbow"], ListPlot[ResourceData[\!\(\*
TagBox["\"\<Sample Data: Bovine Tuberculosis\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Bovine Tuberculosis-Input",
AutoDelete->True]\), "Data"], PlotStyle -> Black]]
Out[5]=

Analysis (4) 

Compute probability of finding a point within given radius of an existing point - NearestNeighborG is the CDF of the nearest neighbor distribution:

In[6]:=
nnG = NearestNeighborG[ResourceData[\!\(\*
TagBox["\"\<Sample Data: Bovine Tuberculosis\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Bovine Tuberculosis-Input",
AutoDelete->True]\), "Data"]]
Out[6]=
In[7]:=
maxR = nnG["MaxRadius"]
Out[7]=
In[8]:=
DiscretePlot[nnG[r], {r, maxR/100, maxR, maxR/100}, AxesLabel -> {"radius", "probability"}]
Out[8]=

NearestNeighborG as the CDF of nearest neighbor distribution can be used to compute the mean distance between a typical point and its nearest neighbor - the mean of a positive support distribution can be approximated via a Riemann sum of 1- CDF. To use Riemann approximation create the partition of the support interval from 0 to maxR into 100 parts and compute the value of the NearestNeighborG at the middle of each subinterval:

In[9]:=
step = maxR/100;
middles = Subdivide[step/2, maxR - step/2, 99];
values = nnG[middles];

Now compute the Riemann sum to find the mean distance between a typical point and its nearest neighbor:

In[10]:=
Total[(1 - values)*step]
Out[10]=

Test for complete spatial randomness:

In[11]:=
SpatialRandomnessTest[ResourceData[\!\(\*
TagBox["\"\<Sample Data: Bovine Tuberculosis\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Bovine Tuberculosis-Input",
AutoDelete->True]\), "Data"], {"PValue", "TestConclusion"}] // Column
Out[11]=

Gosia Konwerska, "Sample Data: Bovine Tuberculosis" from the Wolfram Data Repository (2022)  

Data Resource History

Source Metadata

Publisher Information