13/03/2018

Outline

Goal: give an overview of the most important packages to support you with preparing and exploring data for SDM and for presenting your results

  • Importing data
  • Getting data
  • Manipulating data
  • Visualizing data

Slides at https://iobis.github.io/sdmcourse/

Importing data

Text delimited

library(readr)

# comma separated
abra <- read_csv('data/Abra_alba_2000.csv')

# tab separated
abra <- read_delim('data/Abra_alba_2000.txt', delim = '\t')

Excel: openxlsx

# install.packages('openxlsx')
library(openxlsx)

# First sheet
abra <- read.xlsx('data/Abra_alba_2000.xlsx', 1)

# Sheet by name
abra <- read.xlsx('data/Abra_alba_2000.xlsx', sheet = 'Abra alba')

Zipfile

# Download a zip file
temp <- tempfile('nsbs', fileext = '.zip')
download.file('http://ipt.vliz.be/eurobis/archive.do?r=nsbs&v=1.1', 
              temp)

# Read occurence.txt file from the zip file
data <- read_delim(unz(temp, 'occurrence.txt'), delim = '\t')

Shapefile

Raster

library(raster)

sst <- raster('data/BO2_tempmean_ss_lonlat.tif')
sst
## class       : RasterLayer 
## dimensions  : 2160, 4320, 9331200  (nrow, ncol, ncell)
## resolution  : 0.08333333, 0.08333333  (x, y)
## extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
## coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
## data source : /Users/samuel/a/projects/sdmcourse/session7-GIS-R/data/BO2_tempmean_ss_lonlat.tif 
## names       : BO2_tempmean_ss_lonlat 
## values      : -1.797733, 30.17863  (min, max)

Getting data

Environmental

library(sdmpredictors)

# exploring the marine datasets
datasets <- list_datasets(terrestrial = FALSE, marine = TRUE)
View(datasets)

# exploring the layers
layers <- list_layers(datasets)
View(layers)

# download specific layers to the data directory
environment <- load_layers(c('BO2_tempmean_ss', 'BO_bathymean'), 
                           datadir = 'data')

Occurrences: OBIS

library(robis)
ptevol <- occurrence('Pterois volitans') # red lionfish
## 
Retrieved 2000 records of 2436 (82%)
Retrieved 2436 records of 2436 (100%)
colnames(ptevol)
##  [1] "id"                            "decimalLongitude"             
##  [3] "decimalLatitude"               "depth"                        
##  [5] "institutionCode"               "collectionCode"               
##  [7] "catalogNumber"                 "individualCount"              
##  [9] "datasetName"                   "phylum"                       
## [11] "order"                         "family"                       
## [13] "genus"                         "scientificName"               
## [15] "originalScientificName"        "scientificNameAuthorship"     
## [17] "obisID"                        "resourceID"                   
## [19] "species"                       "qc"                           
## [21] "aphiaID"                       "speciesID"                    
## [23] "scientificNameID"              "class"                        
## [25] "eventDate"                     "yearcollected"                
## [27] "basisOfRecord"                 "locality"                     
## [29] "accessRights"                  "collectionID"                 
## [31] "habitat"                       "higherClassification"         
## [33] "higherGeography"               "language"                     
## [35] "locationRemarks"               "modified"                     
## [37] "occurrenceID"                  "recordedBy"                   
## [39] "recordNumber"                  "rights"                       
## [41] "rightsHolder"                  "specificEpithet"              
## [43] "stateProvince"                 "type"                         
## [45] "identifiedBy"                  "geodeticDatum"                
## [47] "bibliographicCitation"         "minimumDepthInMeters"         
## [49] "maximumDepthInMeters"          "coordinateUncertaintyInMeters"
## [51] "eventID"                       "footprintWKT"                 
## [53] "occurrenceRemarks"             "occurrenceStatus"             
## [55] "waterBody"                     "fieldNumber"                  
## [57] "footprintSRS"                  "references"                   
## [59] "taxonRank"                     "county"                       
## [61] "lifestage"                     "dynamicProperties"            
## [63] "dateIdentified"                "vernacularName"               
## [65] "coordinatePrecision"           "eventTime"                    
## [67] "associatedMedia"               "datasetID"                    
## [69] "identificationRemarks"         "eventRemarks"                 
## [71] "ownerInstitutionCode"          "taxonomicStatus"              
## [73] "island"                        "islandGroup"                  
## [75] "materialSampleID"              "continent"

Filter by year

occurrence('Pterois volitans', year = 1991, 
           fields = c('id', 'decimalLongitude', 'decimalLatitude', 'year'))
## 
Retrieved 11 records of 11 (100%)
## Warning in handle_fields(data, fields): Following fields where not found
## and initialized to NA: year
##           id decimalLongitude decimalLatitude year
## 1    8317355         153.6300       -27.60000   NA
## 2   10918348          55.6000       -20.86667   NA
## 3  702259173         153.6670       -28.40000   NA
## 4  702263624         153.0330       -30.80000   NA
## 5  702428002         145.8500        -5.16667   NA
## 6  703286139         153.6330       -28.39166   NA
## 7  703690415         117.7808       -19.99333   NA
## 8  703690793         116.9650       -19.76167   NA
## 9  703690899         116.7983       -19.62833   NA
## 10 703691118         118.7017       -18.94334   NA
## 11 703691119         117.7317       -20.01917   NA

Filter by date

occurrence('Pterois volitans', startdate = '1980-03-01', enddate = '1980-10-30', 
           fields = c('id', 'decimalLongitude', 'decimalLatitude', 'eventDate'))
## 
Retrieved 3 records of 3 (100%)
##          id decimalLongitude decimalLatitude           eventDate
## 1    868932         158.1986        7.008333 1980-09-05 07:00:00
## 2 399697683        -177.8700      -29.240000 1980-08-06 10:00:00
## 3 702370348         116.0660      -20.283000 1980-05-31 10:00:00

Filter by depth

occurrence('Pterois volitans', startdepth = 100, enddepth = 200,
           fields = c('id', 'decimalLongitude', 'decimalLatitude', 'depth'))
## 
Retrieved 10 records of 10 (100%)
##           id decimalLongitude decimalLatitude depth
## 1  703597136         127.6836      -12.391670 116.0
## 2  703597267         127.9425      -12.925975 100.0
## 3  703597268         127.9511      -12.750695 102.5
## 4  703597370         134.9856       -8.843335 107.0
## 5  703598330         113.3336      -23.551390 120.0
## 6  703690903         114.9292      -20.414165 122.5
## 7  703691121         117.5433      -19.020835 131.0
## 8  703691470         118.1525      -18.963335 119.5
## 9  703691925         117.7925      -19.168335 101.5
## 10 732957007         120.1400       13.880000 131.5

Filter by polygon

With http://iobis.org/maptool) we can create a WKT for the Perhentian and Redang Islands and use this to query all occurrences.

islands <- occurrence(geometry = 
      paste('POLYGON ((102.68921 6.05862','102.57111 5.95346',
                      '103.07785 5.49980','103.25226 5.62555',
                      '103.07648 5.87970','102.68921 6.05862))',sep=', '))
## 
Retrieved 532 records of 532 (100%)

Filter by dataset

datasets <- dataset(q='Adriatic-INTERREG')
## 
Retrieved 6 records of 6 (100%)
datasets$name
## [1] "Meiobenthos North Adriatic-INTERREG-FVG-Projects" 
## [2] "Mesozooplankton North Adriatic-INTERREG Project"  
## [3] "Microzooplankton North Adriatic-INTERREG Project" 
## [4] "Microphytobenthos North Adriatic-INTERREG Project"
## [5] "Macrobenthos North Adriatic-INTERREG-FVG Project" 
## [6] "Phytoplankton North Adriatic-INTERREG-FVG Project"

Filter by dataset

occ <- occurrence(resourceid = datasets$id, year = 1998,
           fields = c('id', 'decimalLongitude', 'decimalLatitude', 'resourceID'))
## 
Retrieved 1553 records of 1553 (100%)
head(occ)
##          id decimalLongitude decimalLatitude resourceID
## 1 719561828         13.56467        45.69350       3494
## 2 719561980         13.59617        45.66383       3494
## 3 719561996         13.56467        45.69350       3494
## 4 719561997         13.56467        45.69350       3494
## 5 719561998         13.56467        45.69350       3494
## 6 719561999         13.56467        45.69350       3494

Filter by quality control

Vandepitte L., Bosch S., Tyberghein L., Waumans F., Vanhoorne B., Hernandez F., De Clerck O., & Mees J. (2015) Fishing for data and sorting the catch: assessing the data quality, completeness and fitness for use of data in marine biogeographic databases. Database, 2015. http://dx.doi.org/10.1093/database/bau125

?qcflags

Categories of quality control flags:

  • Data format
  • Taxonomy
  • Completeness
  • Geography
  • Depth
  • Outliers

Some filters: quality control

  • 3. Taxonomy: is the taxon level genus or lower?
  • 4. Geography (lat/lon): are the latitude/longitude values different from zero?
  • 5. Geography (lat/lon): are the latitude/longitude values within their possible boundaries? (world coordinates)
  • 7. Completeness (date/time): is the sampling year (start/end) completed and valid?
qc3457 <- occurrence(resourceid = datasets$id, qc = c(3,4,5,7), year = 1998)
## 
Retrieved 1005 records of 1005 (100%)

Occurrences: GBIF

library(rgbif)

occ_search(scientificName = 'Pterois volitans', limit = 10)
## Records found [22898] 
## Records returned [10] 
## No. unique hierarchies [1] 
## No. media records [4] 
## No. facets [0] 
## Args [limit=10, offset=0, scientificName=Pterois volitans, fields=all] 
## # A tibble: 10 x 81
##    name        key decimalLatitude decimalLongitude issues   datasetKey   
##    <chr>     <int>           <dbl>            <dbl> <chr>    <chr>        
##  1 Pteroi…  1.81e⁹         - 0.487            131   cdround… 50c9509d-22c…
##  2 Pteroi…  1.81e⁹          16.4             - 86.4 cdround… 50c9509d-22c…
##  3 Pteroi…  1.43e⁹           4.12             119   cdreps   66f6192f-6cc…
##  4 Pteroi…  1.43e⁹           4.11             119   cdreps   66f6192f-6cc…
##  5 Pteroi…  1.43e⁹           4.12             119   cdreps   66f6192f-6cc…
##  6 Pteroi…  1.43e⁹           4.24             119   cdreps   66f6192f-6cc…
##  7 Pteroi…  1.63e⁹         -16.9              146   cdround… 84a649ce-ff8…
##  8 Pteroi…  1.67e⁹         -28.0              153   gass84   50c9509d-22c…
##  9 Pteroi…  1.43e⁹           4.22             119   cdreps   66f6192f-6cc…
## 10 Pteroi…  1.43e⁹           9.51             124   cdreps   66f6192f-6cc…
## # ... with 75 more variables: publishingOrgKey <chr>,
## #   publishingCountry <chr>, protocol <chr>, lastCrawled <chr>,
## #   lastParsed <chr>, crawlId <int>, extensions <chr>,
## #   basisOfRecord <chr>, taxonKey <int>, kingdomKey <int>,
## #   phylumKey <int>, classKey <int>, orderKey <int>, familyKey <int>,
## #   genusKey <int>, speciesKey <int>, scientificName <chr>, kingdom <chr>,
## #   phylum <chr>, order <chr>, family <chr>, genus <chr>, species <chr>,
## #   genericName <chr>, specificEpithet <chr>, taxonRank <chr>,
## #   dateIdentified <chr>, coordinateUncertaintyInMeters <dbl>, year <int>,
## #   month <int>, day <int>, eventDate <chr>, modified <chr>,
## #   lastInterpreted <chr>, references <chr>, license <chr>,
## #   identifiers <chr>, facts <chr>, relations <chr>, geodeticDatum <chr>,
## #   class <chr>, countryCode <chr>, country <chr>, rightsHolder <chr>,
## #   identifier <chr>, verbatimEventDate <chr>, datasetName <chr>,
## #   verbatimLocality <chr>, gbifID <chr>, collectionCode <chr>,
## #   occurrenceID <chr>, taxonID <chr>, recordedBy <chr>,
## #   catalogNumber <chr>, http...unknown.org.occurrenceDetails <chr>,
## #   institutionCode <chr>, rights <chr>, eventTime <chr>,
## #   identificationID <chr>, elevation <dbl>, elevationAccuracy <dbl>,
## #   depth <dbl>, depthAccuracy <dbl>, waterBody <chr>, locality <chr>,
## #   type <chr>, ownerInstitutionCode <chr>, datasetID <chr>,
## #   samplingProtocol <chr>, identifiedBy <chr>, georeferenceSources <chr>,
## #   individualCount <int>, eventID <chr>, occurrenceStatus <chr>,
## #   institutionID <chr>

Manipulating data

Filtering

library(dplyr)

data <- occurrence('Sargassum')
data %>% filter(scientificName == 'Sargassum muticum' & yearcollected > 2005)

Reordering

data %>% arrange(datasetName, desc(eventDate)) %>% print(n=10)

Selecting and renaming columns

data %>% select(scientificName, eventDate, lon=decimalLongitude, lat=decimalLatitude) %>% print(n=10)

Unique combinations

select() can be used with distinct() to find unique combinations of values:

data %>% select(scientificName, locality) %>% distinct()

Adding columns

data %>% tbl_df %>% mutate(zone = .bincode(minimumDepthInMeters, breaks=c(0, 20, 100))) %>% 
  select(minimumDepthInMeters, zone) %>% 
  filter(!is.na(zone)) %>% 
  print(n = 10)

Aggregation

data %>% summarise(lat_mean = mean(decimalLatitude), lat_sd = sd(decimalLatitude))
data %>% group_by(scientificName) %>% summarise(records=n(), datasets=n_distinct(datasetName))

Extract data from raster

library(raster)
environment <- sdmpredictors::load_layers(c('BO2_tempmean_ss', 'BO_bathymean'), 
                                          datadir = 'data')
abra <- robis::occurrence("Abra alba", year=2000,
                          fields = c('id', 'decimalLongitude', 'decimalLatitude', 'qc', 'depth'))
## 
Retrieved 1532 records of 1532 (100%)
extract(environment, abra[,c('decimalLongitude', 'decimalLatitude'),drop=FALSE])
##         BO2_tempmean_ss BO_bathymean
##    [1,]       17.752947          -31
##    [2,]       11.261374          -15
##    [3,]       11.319418          -34
##    [4,]       11.302471          -18
##    [5,]       11.302471          -18
##    [6,]       11.314563           -9
##    [7,]       11.254721          -23
##    [8,]       11.242078          -38
##    [9,]       11.274275          -37
##   [10,]       11.274275          -37
##   [11,]       11.251269          -36
##   [12,]       11.261044          -38
##   [13,]       11.261044          -38
##   [14,]       11.389958          -37
##   [15,]       11.389958          -37
##   [16,]       11.321179          -36
##   [17,]       11.321179          -36
##   [18,]       11.251269          -36
##   [19,]       11.000007          -48
##   [20,]       11.022547          -50
##   [21,]       11.541866          -34
##   [22,]       11.284311          -32
##   [23,]       10.933965          -11
##   [24,]       11.541866          -34
##   [25,]       11.267932          -41
##   [26,]       10.854020          -45
##   [27,]       11.298409          -41
##   [28,]       11.130713          -40
##   [29,]       11.130713          -40
##   [30,]       11.433535          -42
##   [31,]       11.302471          -18
##   [32,]       11.302471          -18
##   [33,]       11.130713          -40
##   [34,]       11.261374          -15
##   [35,]       11.395638           -3
##   [36,]       11.395638           -3
##   [37,]       11.205565          -10
##   [38,]       11.205565          -10
##   [39,]       11.058029          -16
##   [40,]       11.058029          -16
##   [41,]       11.314656          -26
##   [42,]       11.314656          -26
##   [43,]       11.058029          -16
##   [44,]       11.058029          -16
##   [45,]       11.395638           -3
##   [46,]       11.395638           -3
##   [47,]       11.108848          -23
##   [48,]       11.045478          -36
##   [49,]       11.045478          -36
##   [50,]       10.870690          -47
##   [51,]       11.364580          -38
##   [52,]       11.364580          -38
##   [53,]       11.251269          -36
##   [54,]       11.251269          -36
##   [55,]       11.358304          -43
##   [56,]       11.077386          -19
##   [57,]       11.314656          -26
##   [58,]       11.267932          -41
##   [59,]       11.267932          -41
##   [60,]       11.553061          -30
##   [61,]       11.256056          -24
##   [62,]       11.314563           -9
##   [63,]       11.314656          -26
##   [64,]       11.314656          -26
##   [65,]       11.256056          -24
##   [66,]       11.267932          -41
##   [67,]       11.267932          -41
##   [68,]       11.330924          -39
##   [69,]       11.017372          -15
##   [70,]       11.319418          -34
##   [71,]       11.077386          -19
##   [72,]       11.220424          -26
##   [73,]       11.274275          -37
##   [74,]       11.274275          -37
##   [75,]       11.391125          -36
##   [76,]       11.391125          -36
##   [77,]       11.273553          -35
##   [78,]       11.273553          -35
##   [79,]       11.505789          -38
##   [80,]       11.002325          -41
##   [81,]       11.567629          -27
##   [82,]       11.317511          -48
##   [83,]       11.463365          -36
##   [84,]       11.050251          -43
##   [85,]       11.663542          -35
##   [86,]       11.149880          -45
##   [87,]       11.700148          -31
##   [88,]       11.526066          -32
##   [89,]              NA           NA
##   [90,]       11.208979          -40
##   [91,]       11.549198          -41
##   [92,]       11.464777          -31
##   [93,]       11.638855          -37
##   [94,]       11.662884          -30
##   [95,]       11.375820          -31
##   [96,]       11.083153          -36
##   [97,]       11.676999          -36
##   [98,]       10.950049          -36
##   [99,]       11.493977           -1
##  [100,]       12.185234          -14
##  [101,]       12.128371           -8
##  [102,]       12.100107          -12
##  [103,]       12.113578           -6
##  [104,]       12.118883           -2
##  [105,]       12.094747           -4
##  [106,]       12.106943            0
##  [107,]       12.092746           -5
##  [108,]       12.113271           -1
##  [109,]       12.090105           -3
##  [110,]       12.081017           -2
##  [111,]       12.072416           -4
##  [112,]       12.072416           -4
##  [113,]       12.113271           -1
##  [114,]       12.090105           -3
##  [115,]       12.072416           -4
##  [116,]       12.113578           -6
##  [117,]       12.098670           -1
##  [118,]       12.081017           -2
##  [119,]       12.113271           -1
##  [120,]       12.092746           -5
##  [121,]       12.089448           -4
##  [122,]       12.089448           -4
##  [123,]       12.100107          -12
##  [124,]       12.090105           -3
##  [125,]       12.092746           -5
##  [126,]       12.081017           -2
##  [127,]       12.096799            0
##  [128,]       12.096799            0
##  [129,]       12.100107          -12
##  [130,]       12.128371           -8
##  [131,]       12.128371           -8
##  [132,]       12.100107          -12
##  [133,]       12.106943            0
##  [134,]       12.090105           -3
##  [135,]       12.092746           -5
##  [136,]       12.081017           -2
##  [137,]       12.092746           -5
##  [138,]       12.128371           -8
##  [139,]       12.113271           -1
##  [140,]       12.081017           -2
##  [141,]       12.090105           -3
##  [142,]       12.092746           -5
##  [143,]       12.081017           -2
##  [144,]       12.081017           -2
##  [145,]       12.092746           -5
##  [146,]       12.092746           -5
##  [147,]       12.098670           -1
##  [148,]       12.092746           -5
##  [149,]       12.072416           -4
##  [150,]       12.092746           -5
##  [151,]       12.113271           -1
##  [152,]       12.106943            0
##  [153,]       12.128371           -8
##  [154,]       12.100107          -12
##  [155,]       12.100107          -12
##  [156,]       12.089448           -4
##  [157,]       12.090529            0
##  [158,]       12.096799            0
##  [159,]       12.096799            0
##  [160,]       12.095392           -9
##  [161,]       12.135448           -6
##  [162,]       12.163356           -7
##  [163,]       12.177266           -2
##  [164,]       12.096799            0
##  [165,]       12.115718           -5
##  [166,]       12.113578           -6
##  [167,]       12.088389           -4
##  [168,]       12.124864           -5
##  [169,]       12.072416           -4
##  [170,]       12.135448           -6
##  [171,]       12.163356           -7
##  [172,]       12.092746           -5
##  [173,]       12.128371           -8
##  [174,]       12.092746           -5
##  [175,]       12.072416           -4
##  [176,]       12.092746           -5
##  [177,]       12.096799            0
##  [178,]       12.128371           -8
##  [179,]       12.096799            0
##  [180,]       12.106943            0
##  [181,]       12.124864           -5
##  [182,]       12.118883           -2
##  [183,]       17.366812          -23
##  [184,]       17.366812          -23
##  [185,]       17.366812          -23
##  [186,]       17.366812          -23
##  [187,]       17.366812          -23
##  [188,]              NA           NA
##  [189,]              NA           NA
##  [190,]       10.100449          -62
##  [191,]       10.786431            1
##  [192,]              NA           NA
##  [193,]              NA           NA
##  [194,]       10.786195          -38
##  [195,]       10.786195          -38
##  [196,]       10.786195          -38
##  [197,]       11.123607          -27
##  [198,]              NA           NA
##  [199,]              NA           NA
##  [200,]              NA           NA
##  [201,]              NA           NA
##  [202,]              NA           NA
##  [203,]              NA           NA
##  [204,]              NA           NA
##  [205,]              NA           NA
##  [206,]              NA           NA
##  [207,]              NA           NA
##  [208,]              NA           NA
##  [209,]              NA           NA
##  [210,]              NA           NA
##  [211,]       10.786431            1
##  [212,]       10.786431            1
##  [213,]       10.786431            1
##  [214,]       10.786431            1
##  [215,]       10.786431            1
##  [216,]       10.786431            1
##  [217,]       10.786431            1
##  [218,]       10.786431            1
##  [219,]              NA           NA
##  [220,]              NA           NA
##  [221,]              NA           NA
##  [222,]              NA           NA
##  [223,]              NA           NA
##  [224,]       10.781072           -4
##  [225,]       10.781072           -4
##  [226,]       10.781072           -4
##  [227,]       10.781072           -4
##  [228,]       10.781072           -4
##  [229,]       10.781072           -4
##  [230,]              NA           NA
##  [231,]       10.781072           -4
##  [232,]       10.781072           -4
##  [233,]              NA           NA
##  [234,]              NA           NA
##  [235,]              NA           NA
##  [236,]              NA           NA
##  [237,]              NA           NA
##  [238,]              NA           NA
##  [239,]       11.123607          -27
##  [240,]              NA           NA
##  [241,]              NA           NA
##  [242,]              NA           NA
##  [243,]              NA           NA
##  [244,]              NA           NA
##  [245,]              NA           NA
##  [246,]              NA           NA
##  [247,]              NA           NA
##  [248,]              NA           NA
##  [249,]              NA           NA
##  [250,]              NA           NA
##  [251,]       10.789445           -7
##  [252,]       10.789445           -7
##  [253,]       10.789445           -7
##  [254,]       11.123607          -27
##  [255,]              NA           NA
##  [256,]              NA           NA
##  [257,]              NA           NA
##  [258,]              NA           NA
##  [259,]       11.123607          -27
##  [260,]              NA           NA
##  [261,]              NA           NA
##  [262,]       11.123607          -27
##  [263,]              NA           NA
##  [264,]              NA           NA
##  [265,]              NA           NA
##  [266,]              NA           NA
##  [267,]              NA           NA
##  [268,]              NA           NA
##  [269,]              NA           NA
##  [270,]              NA           NA
##  [271,]              NA           NA
##  [272,]              NA           NA
##  [273,]              NA           NA
##  [274,]              NA           NA
##  [275,]              NA           NA
##  [276,]       11.123607          -27
##  [277,]              NA           NA
##  [278,]       11.123607          -27
##  [279,]       11.123607          -27
##  [280,]              NA           NA
##  [281,]              NA           NA
##  [282,]              NA           NA
##  [283,]              NA           NA
##  [284,]              NA           NA
##  [285,]       10.786431            1
##  [286,]              NA           NA
##  [287,]       10.781072           -4
##  [288,]       10.781072           -4
##  [289,]              NA           NA
##  [290,]       10.789445           -7
##  [291,]              NA           NA
##  [292,]       10.786195          -38
##  [293,]              NA           NA
##  [294,]       11.123607          -27
##  [295,]       10.786195          -38
##  [296,]       10.786195          -38
##  [297,]       11.123607          -27
##  [298,]       12.187634          -30
##  [299,]       10.666198          -76
##  [300,]       12.203637           -3
##  [301,]       12.203637           -3
##  [302,]       12.203637           -3
##  [303,]       10.540134           -5
##  [304,]       10.533744          -13
##  [305,]       10.519570          -20
##  [306,]       10.519570          -20
##  [307,]       10.577470          -13
##  [308,]       10.577470          -13
##  [309,]       10.493071          -20
##  [310,]       10.525281          -24
##  [311,]        9.983971          -17
##  [312,]        9.983971          -17
##  [313,]        9.983971          -17
##  [314,]       10.234084           -6
##  [315,]       10.203547          -20
##  [316,]       10.142022          -11
##  [317,]       10.142022          -11
##  [318,]       10.163292          -13
##  [319,]       10.163292          -13
##  [320,]       10.163292          -13
##  [321,]       10.163292          -13
##  [322,]       10.163292          -13
##  [323,]       10.163292          -13
##  [324,]       10.163292          -13
##  [325,]       10.227952          -14
##  [326,]       10.142022          -11
##  [327,]       10.142022          -11
##  [328,]       10.142022          -11
##  [329,]       10.142022          -11
##  [330,]       10.142022          -11
##  [331,]       10.234084           -6
##  [332,]        9.983971          -17
##  [333,]        9.983971          -17
##  [334,]        9.983971          -17
##  [335,]        9.983971          -17
##  [336,]        9.983971          -17
##  [337,]        9.983971          -17
##  [338,]       10.255436           -6
##  [339,]       10.234084           -6
##  [340,]       10.142022          -11
##  [341,]       10.142022          -11
##  [342,]       10.142022          -11
##  [343,]       10.142022          -11
##  [344,]       10.142022          -11
##  [345,]       10.142022          -11
##  [346,]       10.142022          -11
##  [347,]       10.142022          -11
##  [348,]       10.142022          -11
##  [349,]       10.142022          -11
##  [350,]       10.163292          -13
##  [351,]       10.163292          -13
##  [352,]       10.196654          -21
##  [353,]       10.196654          -21
##  [354,]       10.226982           -4
##  [355,]       10.226982           -4
##  [356,]       10.252271          -16
##  [357,]       10.280288          -19
##  [358,]       10.226982           -4
##  [359,]       10.226982           -4
##  [360,]       10.163292          -13
##  [361,]       10.163292          -13
##  [362,]       10.163292          -13
##  [363,]       10.163292          -13
##  [364,]       10.163292          -13
##  [365,]       10.163292          -13
##  [366,]       10.163292          -13
##  [367,]       10.163292          -13
##  [368,]       10.163292          -13
##  [369,]       10.163292          -13
##  [370,]       10.234084           -6
##  [371,]       10.227952          -14
##  [372,]       10.415621           -4
##  [373,]       10.022824           -5
##  [374,]       10.022824           -5
##  [375,]       10.022824           -5
##  [376,]       10.022824           -5
##  [377,]       10.022824           -5
##  [378,]       10.022824           -5
##  [379,]       10.022824           -5
##  [380,]       10.022824           -5
##  [381,]       10.022824           -5
##  [382,]       10.022824           -5
##  [383,]       10.022824           -5
##  [384,]       10.022824           -5
##  [385,]       10.022824           -5
##  [386,]       10.022824           -5
##  [387,]       10.022824           -5
##  [388,]       10.022824           -5
##  [389,]       10.022824           -5
##  [390,]       10.022824           -5
##  [391,]       10.022824           -5
##  [392,]       10.022824           -5
##  [393,]       10.022824           -5
##  [394,]       10.022824           -5
##  [395,]       10.022824           -5
##  [396,]       10.022824           -5
##  [397,]       10.022824           -5
##  [398,]       10.022824           -5
##  [399,]       10.022824           -5
##  [400,]       10.022824           -5
##  [401,]       10.022824           -5
##  [402,]       10.022824           -5
##  [403,]       10.022824           -5
##  [404,]       10.022824           -5
##  [405,]       10.022824           -5
##  [406,]       10.022824           -5
##  [407,]       10.022824           -5
##  [408,]       10.022824           -5
##  [409,]       10.022824           -5
##  [410,]       10.022824           -5
##  [411,]       10.022824           -5
##  [412,]       10.022824           -5
##  [413,]       10.022824           -5
##  [414,]       10.022824           -5
##  [415,]       10.022824           -5
##  [416,]       10.022824           -5
##  [417,]       10.022824           -5
##  [418,]       10.022824           -5
##  [419,]       10.022824           -5
##  [420,]       10.022824           -5
##  [421,]       10.022824           -5
##  [422,]       10.022824           -5
##  [423,]       10.022824           -5
##  [424,]       10.022824           -5
##  [425,]       10.022824           -5
##  [426,]       10.022824           -5
##  [427,]       10.022824           -5
##  [428,]       10.288356          -19
##  [429,]       10.200673          -10
##  [430,]       10.200673          -10
##  [431,]       10.200673          -10
##  [432,]       10.200673          -10
##  [433,]       10.152607          -15
##  [434,]       10.152607          -15
##  [435,]       10.152607          -15
##  [436,]       10.152607          -15
##  [437,]       10.200673          -10
##  [438,]       10.429666           -4
##  [439,]       10.264994          -10
##  [440,]       10.415621           -4
##  [441,]       10.415621           -4
##  [442,]       10.200673          -10
##  [443,]       10.200673          -10
##  [444,]       10.200673          -10
##  [445,]       10.200673          -10
##  [446,]       10.200673          -10
##  [447,]       10.200673          -10
##  [448,]       10.200673          -10
##  [449,]       10.200673          -10
##  [450,]       10.310186           -7
##  [451,]       10.310186           -7
##  [452,]       10.163292          -13
##  [453,]       10.163292          -13
##  [454,]       10.245890          -11
##  [455,]       10.255436           -6
##  [456,]       10.163292          -13
##  [457,]       10.234084           -6
##  [458,]       10.163292          -13
##  [459,]       10.163292          -13
##  [460,]       10.163292          -13
##  [461,]       10.163292          -13
##  [462,]       10.163292          -13
##  [463,]       10.163292          -13
##  [464,]       10.163292          -13
##  [465,]       10.163292          -13
##  [466,]       10.163292          -13
##  [467,]       10.163292          -13
##  [468,]       10.163292          -13
##  [469,]       10.163292          -13
##  [470,]       10.152607          -15
##  [471,]       10.152607          -15
##  [472,]       10.152607          -15
##  [473,]       10.152607          -15
##  [474,]       10.152607          -15
##  [475,]       10.152607          -15
##  [476,]       10.522942            1
##  [477,]       10.252271          -16
##  [478,]        9.983971          -17
##  [479,]       10.196654          -21
##  [480,]       10.252271          -16
##  [481,]       10.163292          -13
##  [482,]       10.234084           -6
##  [483,]       10.521104            1
##  [484,]       10.521104            1
##  [485,]       10.521104            1
##  [486,]       10.521104            1
##  [487,]        9.983971          -17
##  [488,]        9.983971          -17
##  [489,]       10.200673          -10
##  [490,]       10.200673          -10
##  [491,]       10.244171           -7
##  [492,]       10.244171           -7
##  [493,]       10.234084           -6
##  [494,]       10.234084           -6
##  [495,]       10.245890          -11
##  [496,]       10.163292          -13
##  [497,]       10.502792          -13
##  [498,]       10.502792          -13
##  [499,]       10.502792          -13
##  [500,]       10.502792          -13
##  [501,]       10.288356          -19
##  [502,]       10.216941          -19
##  [503,]       10.245890          -11
##  [504,]       10.245890          -11
##  [505,]       10.245890          -11
##  [506,]        9.983971          -17
##  [507,]        9.983971          -17
##  [508,]       10.152607          -15
##  [509,]       10.152607          -15
##  [510,]       10.163292          -13
##  [511,]       10.163292          -13
##  [512,]       10.163292          -13
##  [513,]       10.163292          -13
##  [514,]       10.163292          -13
##  [515,]       10.502792          -13
##  [516,]       10.502792          -13
##  [517,]       10.502792          -13
##  [518,]       10.502792          -13
##  [519,]       10.502792          -13
##  [520,]       10.502792          -13
##  [521,]       10.502792          -13
##  [522,]       10.502792          -13
##  [523,]       10.142022          -11
##  [524,]       10.196654          -21
##  [525,]       10.522942            1
##  [526,]       10.142022          -11
##  [527,]       10.142022          -11
##  [528,]       10.142022          -11
##  [529,]       10.142022          -11
##  [530,]       10.142022          -11
##  [531,]       10.142022          -11
##  [532,]       10.142022          -11
##  [533,]       10.142022          -11
##  [534,]       10.142022          -11
##  [535,]       10.142022          -11
##  [536,]       10.173799          -13
##  [537,]       10.173799          -13
##  [538,]       10.173799          -13
##  [539,]       10.173799          -13
##  [540,]       10.173799          -13
##  [541,]       10.163292          -13
##  [542,]       10.244171           -7
##  [543,]       10.244171           -7
##  [544,]       10.283709           -7
##  [545,]       10.173799          -13
##  [546,]       10.173799          -13
##  [547,]       10.173799          -13
##  [548,]       10.022824           -5
##  [549,]       10.022824           -5
##  [550,]       10.022824           -5
##  [551,]       10.022824           -5
##  [552,]       10.142022          -11
##  [553,]       10.142022          -11
##  [554,]       10.142022          -11
##  [555,]       10.142022          -11
##  [556,]       10.244572           -2
##  [557,]       10.142022          -11
##  [558,]       10.142022          -11
##  [559,]       10.142022          -11
##  [560,]       10.142022          -11
##  [561,]       10.142022          -11
##  [562,]       10.142022          -11
##  [563,]       10.142022          -11
##  [564,]       10.142022          -11
##  [565,]       10.142022          -11
##  [566,]       10.142022          -11
##  [567,]       10.142022          -11
##  [568,]       10.142022          -11
##  [569,]       10.142022          -11
##  [570,]       10.142022          -11
##  [571,]       10.142022          -11
##  [572,]       10.142022          -11
##  [573,]       10.142022          -11
##  [574,]       10.142022          -11
##  [575,]       10.142022          -11
##  [576,]       10.142022          -11
##  [577,]       10.142022          -11
##  [578,]       10.216941          -19
##  [579,]       10.257658          -12
##  [580,]       10.196654          -21
##  [581,]       10.196654          -21
##  [582,]       10.196654          -21
##  [583,]       10.142022          -11
##  [584,]       10.163292          -13
##  [585,]       10.163292          -13
##  [586,]       10.226982           -4
##  [587,]       10.255436           -6
##  [588,]       10.255436           -6
##  [589,]       10.288356          -19
##  [590,]       10.257658          -12
##  [591,]       10.257658          -12
##  [592,]       10.257658          -12
##  [593,]       10.257658          -12
##  [594,]       10.257658          -12
##  [595,]       10.257658          -12
##  [596,]       10.255436           -6
##  [597,]       10.226982           -4
##  [598,]       10.226982           -4
##  [599,]       10.163292          -13
##  [600,]       10.163292          -13
##  [601,]       10.163292          -13
##  [602,]       10.288356          -19
##  [603,]       10.197565          -15
##  [604,]       10.197565          -15
##  [605,]       10.257658          -12
##  [606,]       10.257658          -12
##  [607,]       10.257658          -12
##  [608,]       10.257658          -12
##  [609,]       10.280288          -19
##  [610,]       10.415621           -4
##  [611,]       10.415621           -4
##  [612,]       10.415621           -4
##  [613,]       10.415621           -4
##  [614,]       10.415621           -4
##  [615,]       10.203547          -20
##  [616,]       10.196654          -21
##  [617,]       10.522942            1
##  [618,]       10.163292          -13
##  [619,]       10.163292          -13
##  [620,]       10.163292          -13
##  [621,]       10.163292          -13
##  [622,]       10.163292          -13
##  [623,]       10.163292          -13
##  [624,]       10.163292          -13
##  [625,]       10.163292          -13
##  [626,]       10.142022          -11
##  [627,]       10.142022          -11
##  [628,]       10.142022          -11
##  [629,]       10.142022          -11
##  [630,]       10.142022          -11
##  [631,]       10.142022          -11
##  [632,]       10.521104            1
##  [633,]       10.521104            1
##  [634,]       10.521104            1
##  [635,]       10.415621           -4
##  [636,]       10.415621           -4
##  [637,]       10.415621           -4
##  [638,]       10.227952          -14
##  [639,]       10.234084           -6
##  [640,]       10.142022          -11
##  [641,]       10.142022          -11
##  [642,]       10.142022          -11
##  [643,]       10.257658          -12
##  [644,]       10.257658          -12
##  [645,]       10.163292          -13
##  [646,]       10.522942            1
##  [647,]       10.288356          -19
##  [648,]       10.415621           -4
##  [649,]       10.163292          -13
##  [650,]       10.142022          -11
##  [651,]       10.142022          -11
##  [652,]       10.142022          -11
##  [653,]       10.142022          -11
##  [654,]       10.300684           -7
##  [655,]       10.200673          -10
##  [656,]       10.200673          -10
##  [657,]       10.163292          -13
##  [658,]       10.163292          -13
##  [659,]       10.163292          -13
##  [660,]       10.163292          -13
##  [661,]       10.163292          -13
##  [662,]       10.163292          -13
##  [663,]       10.163292          -13
##  [664,]       10.163292          -13
##  [665,]       10.163292          -13
##  [666,]       10.163292          -13
##  [667,]       10.050952          -13
##  [668,]       10.288356          -19
##  [669,]       10.077607          -20
##  [670,]       10.077607          -20
##  [671,]       10.077607          -20
##  [672,]       10.077607          -20
##  [673,]       10.077607          -20
##  [674,]       10.077607          -20
##  [675,]       10.077607          -20
##  [676,]       10.077607          -20
##  [677,]       10.077607          -20
##  [678,]       10.077607          -20
##  [679,]       10.396488          -20
##  [680,]       10.396488          -20
##  [681,]       10.396488          -20
##  [682,]       10.396488          -20
##  [683,]       10.396488          -20
##  [684,]       10.396488          -20
##  [685,]       10.396488          -20
##  [686,]       10.396488          -20
##  [687,]       10.396488          -20
##  [688,]       10.077607          -20
##  [689,]       10.077607          -20
##  [690,]       10.077607          -20
##  [691,]       10.077607          -20
##  [692,]       10.077607          -20
##  [693,]       10.077607          -20
##  [694,]       10.077607          -20
##  [695,]       10.077607          -20
##  [696,]       10.077607          -20
##  [697,]       10.077607          -20
##  [698,]       10.077607          -20
##  [699,]       10.077607          -20
##  [700,]       10.077607          -20
##  [701,]       10.077607          -20
##  [702,]       10.077607          -20
##  [703,]       10.077607          -20
##  [704,]       10.077607          -20
##  [705,]       10.077607          -20
##  [706,]       10.077607          -20
##  [707,]       10.108658          -13
##  [708,]       10.108658          -13
##  [709,]       10.108658          -13
##  [710,]       10.108658          -13
##  [711,]       10.108658          -13
##  [712,]       10.108658          -13
##  [713,]       10.108658          -13
##  [714,]       10.108658          -13
##  [715,]       10.108658          -13
##  [716,]       10.108658          -13
##  [717,]       10.077607          -20
##  [718,]       10.077607          -20
##  [719,]       10.077607          -20
##  [720,]       10.077607          -20
##  [721,]       10.077607          -20
##  [722,]       10.077607          -20
##  [723,]       10.077607          -20
##  [724,]       10.077607          -20
##  [725,]       10.077607          -20
##  [726,]       10.077607          -20
##  [727,]       10.206088           -9
##  [728,]       10.163292          -13
##  [729,]       10.163292          -13
##  [730,]       10.163292          -13
##  [731,]       10.163292          -13
##  [732,]       10.163292          -13
##  [733,]       10.396488          -20
##  [734,]       10.396488          -20
##  [735,]       10.396488          -20
##  [736,]       10.396488          -20
##  [737,]       10.396488          -20
##  [738,]       10.396488          -20
##  [739,]       10.396488          -20
##  [740,]       10.396488          -20
##  [741,]       10.396488          -20
##  [742,]       10.522942            1
##  [743,]       10.142022          -11
##  [744,]       10.142022          -11
##  [745,]       10.142022          -11
##  [746,]       10.142022          -11
##  [747,]       10.142022          -11
##  [748,]       10.142022          -11
##  [749,]       10.142022          -11
##  [750,]       10.142022          -11
##  [751,]       10.142022          -11
##  [752,]        9.867139           -7
##  [753,]        9.867139           -7
##  [754,]        9.867139           -7
##  [755,]        9.867139           -7
##  [756,]        9.867139           -7
##  [757,]        9.867139           -7
##  [758,]        9.867139           -7
##  [759,]        9.867139           -7
##  [760,]        9.867139           -7
##  [761,]        9.867139           -7
##  [762,]       10.288356          -19
##  [763,]        9.867139           -7
##  [764,]        9.867139           -7
##  [765,]        9.867139           -7
##  [766,]        9.867139           -7
##  [767,]        9.867139           -7
##  [768,]        9.867139           -7
##  [769,]        9.867139           -7
##  [770,]        9.867139           -7
##  [771,]        9.867139           -7
##  [772,]        9.867139           -7
##  [773,]       10.163292          -13
##  [774,]       10.163292          -13
##  [775,]       10.163292          -13
##  [776,]       10.163292          -13
##  [777,]       10.163292          -13
##  [778,]       10.163292          -13
##  [779,]       10.163292          -13
##  [780,]       10.163292          -13
##  [781,]       10.163292          -13
##  [782,]       10.245484           -3
##  [783,]       10.163292          -13
##  [784,]       10.163292          -13
##  [785,]       10.163292          -13
##  [786,]       10.163292          -13
##  [787,]       10.163292          -13
##  [788,]       10.227952          -14
##  [789,]       10.264994          -10
##  [790,]       10.522942            1
##  [791,]       10.163292          -13
##  [792,]       10.163292          -13
##  [793,]       10.163292          -13
##  [794,]       10.163292          -13
##  [795,]       10.163292          -13
##  [796,]       10.163292          -13
##  [797,]       10.226982           -4
##  [798,]       10.196108          -10
##  [799,]       10.196108          -10
##  [800,]       10.196108          -10
##  [801,]       10.196108          -10
##  [802,]       10.196108          -10
##  [803,]       10.196108          -10
##  [804,]       10.196108          -10
##  [805,]       10.196108          -10
##  [806,]       10.196108          -10
##  [807,]       10.226982           -4
##  [808,]       10.219991          -15
##  [809,]       10.197565          -15
##  [810,]       10.216941          -19
##  [811,]       10.142022          -11
##  [812,]       10.142022          -11
##  [813,]       10.142022          -11
##  [814,]       10.142022          -11
##  [815,]       10.264994          -10
##  [816,]       10.414397           -9
##  [817,]       10.414397           -9
##  [818,]       10.219991          -15
##  [819,]       10.219991          -15
##  [820,]       10.219991          -15
##  [821,]       10.219991          -15
##  [822,]       10.219991          -15
##  [823,]       10.219991          -15
##  [824,]       10.219991          -15
##  [825,]       10.219991          -15
##  [826,]       10.288356          -19
##  [827,]       10.245484           -3
##  [828,]       10.163292          -13
##  [829,]       10.163292          -13
##  [830,]       10.163292          -13
##  [831,]       10.288356          -19
##  [832,]       10.108658          -13
##  [833,]       10.108658          -13
##  [834,]       10.108658          -13
##  [835,]       10.108658          -13
##  [836,]       10.108658          -13
##  [837,]       10.108658          -13
##  [838,]       10.108658          -13
##  [839,]       10.108658          -13
##  [840,]       10.108658          -13
##  [841,]       10.108658          -13
##  [842,]       10.142022          -11
##  [843,]       10.142022          -11
##  [844,]       10.142022          -11
##  [845,]       10.142022          -11
##  [846,]       10.318107          -24
##  [847,]       10.556763            1
##  [848,]       10.227952          -14
##  [849,]       10.163292          -13
##  [850,]       10.163292          -13
##  [851,]       10.163292          -13
##  [852,]       10.163292          -13
##  [853,]       10.163292          -13
##  [854,]       10.163292          -13
##  [855,]       10.244171           -7
##  [856,]       10.244171           -7
##  [857,]       10.244171           -7
##  [858,]       10.244171           -7
##  [859,]       10.244171           -7
##  [860,]       10.050952          -13
##  [861,]       10.050952          -13
##  [862,]       10.050952          -13
##  [863,]       10.050952          -13
##  [864,]       10.050952          -13
##  [865,]       10.050952          -13
##  [866,]       10.050952          -13
##  [867,]       10.050952          -13
##  [868,]       10.050952          -13
##  [869,]       10.522942            1
##  [870,]       10.163292          -13
##  [871,]       10.163292          -13
##  [872,]       10.298759          -10
##  [873,]       10.298759          -10
##  [874,]       10.298759          -10
##  [875,]       10.298759          -10
##  [876,]       10.298759          -10
##  [877,]       10.298759          -10
##  [878,]       10.298759          -10
##  [879,]       10.298759          -10
##  [880,]       10.318107          -24
##  [881,]       10.195828          -23
##  [882,]       10.195828          -23
##  [883,]       10.195828          -23
##  [884,]       10.195828          -23
##  [885,]       10.195828          -23
##  [886,]       10.195828          -23
##  [887,]       10.195828          -23
##  [888,]       10.142022          -11
##  [889,]       10.142022          -11
##  [890,]       10.142022          -11
##  [891,]       10.142022          -11
##  [892,]       10.142022          -11
##  [893,]       10.142022          -11
##  [894,]       10.142022          -11
##  [895,]       10.142022          -11
##  [896,]       10.142022          -11
##  [897,]       10.142022          -11
##  [898,]              NA           NA
##  [899,]              NA           NA
##  [900,]              NA           NA
##  [901,]              NA           NA
##  [902,]              NA           NA
##  [903,]              NA           NA
##  [904,]              NA           NA
##  [905,]              NA           NA
##  [906,]              NA           NA
##  [907,]              NA           NA
##  [908,]              NA           NA
##  [909,]              NA           NA
##  [910,]              NA           NA
##  [911,]              NA           NA
##  [912,]              NA           NA
##  [913,]              NA           NA
##  [914,]              NA           NA
##  [915,]              NA           NA
##  [916,]              NA           NA
##  [917,]              NA           NA
##  [918,]              NA           NA
##  [919,]              NA           NA
##  [920,]              NA           NA
##  [921,]              NA           NA
##  [922,]              NA           NA
##  [923,]              NA           NA
##  [924,]              NA           NA
##  [925,]       10.195828          -23
##  [926,]       10.195828          -23
##  [927,]       10.195828          -23
##  [928,]       10.415621           -4
##  [929,]       10.318107          -24
##  [930,]       10.461926           -6
##  [931,]       10.195828          -23
##  [932,]       10.195828          -23
##  [933,]       10.415621           -4
##  [934,]       10.415621           -4
##  [935,]       10.415621           -4
##  [936,]       10.415621           -4
##  [937,]       10.195828          -23
##  [938,]       10.195828          -23
##  [939,]       10.195828          -23
##  [940,]       10.195828          -23
##  [941,]       10.245484           -3
##  [942,]       10.257658          -12
##  [943,]       10.257658          -12
##  [944,]       10.257658          -12
##  [945,]       10.406678          -20
##  [946,]       10.257658          -12
##  [947,]       10.257658          -12
##  [948,]       10.257658          -12
##  [949,]       10.257658          -12
##  [950,]       10.257658          -12
##  [951,]       10.257658          -12
##  [952,]       10.257658          -12
##  [953,]       10.257658          -12
##  [954,]       10.257658          -12
##  [955,]       10.257658          -12
##  [956,]       10.257658          -12
##  [957,]       10.257658          -12
##  [958,]       10.257658          -12
##  [959,]       10.257658          -12
##  [960,]       10.461926           -6
##  [961,]       10.461926           -6
##  [962,]       10.461926           -6
##  [963,]       10.257658          -12
##  [964,]       10.257658          -12
##  [965,]       10.257658          -12
##  [966,]       10.257658          -12
##  [967,]       10.461926           -6
##  [968,]       10.461926           -6
##  [969,]       10.461926           -6
##  [970,]       10.057503           -4
##  [971,]       10.057503           -4
##  [972,]       10.057503           -4
##  [973,]       10.057503           -4
##  [974,]       10.057503           -4
##  [975,]       10.057503           -4
##  [976,]       10.057503           -4
##  [977,]       10.057503           -4
##  [978,]       10.057503           -4
##  [979,]       10.057503           -4
##  [980,]       10.057503           -4
##  [981,]       10.057503           -4
##  [982,]       10.057503           -4
##  [983,]       10.057503           -4
##  [984,]       10.057503           -4
##  [985,]       10.057503           -4
##  [986,]       10.142022          -11
##  [987,]       10.142022          -11
##  [988,]       10.142022          -11
##  [989,]       10.142022          -11
##  [990,]       10.142022          -11
##  [991,]       10.142022          -11
##  [992,]       10.142022          -11
##  [993,]       10.142022          -11
##  [994,]       10.142022          -11
##  [995,]       10.057503           -4
##  [996,]       10.057503           -4
##  [997,]       10.057503           -4
##  [998,]       10.057503           -4
##  [999,]       10.057503           -4
## [1000,]       10.057503           -4
## [1001,]       10.057503           -4
## [1002,]       10.057503           -4
## [1003,]       10.057503           -4
## [1004,]       10.057503           -4
## [1005,]       10.057503           -4
## [1006,]       10.057503           -4
## [1007,]       10.057503           -4
## [1008,]       10.057503           -4
## [1009,]       10.057503           -4
## [1010,]       10.057503           -4
## [1011,]       10.057503           -4
## [1012,]       10.057503           -4
## [1013,]       10.057503           -4
## [1014,]        9.983971          -17
## [1015,]        9.983971          -17
## [1016,]        9.983971          -17
## [1017,]        9.983971          -17
## [1018,]        9.983971          -17
## [1019,]        9.983971          -17
## [1020,]        9.983971          -17
## [1021,]        9.983971          -17
## [1022,]        9.983971          -17
## [1023,]        9.983971          -17
## [1024,]       10.461926           -6
## [1025,]       10.414397           -9
## [1026,]       10.414397           -9
## [1027,]       10.414397           -9
## [1028,]       10.414397           -9
## [1029,]       10.414397           -9
## [1030,]       10.414397           -9
## [1031,]       10.414397           -9
## [1032,]       10.414397           -9
## [1033,]       10.414397           -9
## [1034,]       10.414397           -9
## [1035,]       10.252271          -16
## [1036,]       10.163292          -13
## [1037,]       10.163292          -13
## [1038,]       10.163292          -13
## [1039,]       10.163292          -13
## [1040,]       10.163292          -13
## [1041,]       10.163292          -13
## [1042,]       10.163292          -13
## [1043,]       10.163292          -13
## [1044,]       10.163292          -13
## [1045,]       10.163292          -13
## [1046,]       10.016996          -17
## [1047,]       10.016996          -17
## [1048,]       10.016996          -17
## [1049,]       10.016996          -17
## [1050,]       10.016996          -17
## [1051,]       10.016996          -17
## [1052,]       10.016996          -17
## [1053,]       10.016996          -17
## [1054,]       10.041239          -11
## [1055,]       10.041239          -11
## [1056,]       10.041239          -11
## [1057,]       10.041239          -11
## [1058,]       10.041239          -11
## [1059,]       10.398586           -2
## [1060,]       10.041239          -11
## [1061,]       10.041239          -11
## [1062,]       10.041239          -11
## [1063,]       10.219991          -15
## [1064,]       10.219991          -15
## [1065,]       10.219991          -15
## [1066,]       10.219991          -15
## [1067,]       10.219991          -15
## [1068,]       10.219991          -15
## [1069,]       10.219991          -15
## [1070,]       10.219991          -15
## [1071,]       10.219991          -15
## [1072,]       10.219991          -15
## [1073,]       10.288356          -19
## [1074,]       10.142022          -11
## [1075,]       10.142022          -11
## [1076,]       10.142022          -11
## [1077,]       10.142022          -11
## [1078,]       10.142022          -11
## [1079,]       10.142022          -11
## [1080,]       10.142022          -11
## [1081,]       10.142022          -11
## [1082,]       10.142022          -11
## [1083,]       10.142022          -11
## [1084,]       10.142022          -11
## [1085,]       10.142022          -11
## [1086,]       10.142022          -11
## [1087,]       10.142022          -11
## [1088,]       10.142022          -11
## [1089,]       10.435394           -9
## [1090,]       10.435394           -9
## [1091,]       10.127710          -22
## [1092,]       10.127710          -22
## [1093,]       10.127710          -22
## [1094,]       10.127710          -22
## [1095,]       10.127710          -22
## [1096,]       10.127710          -22
## [1097,]       10.127710          -22
## [1098,]       10.313128          -24
## [1099,]       10.313128          -24
## [1100,]       10.313128          -24
## [1101,]       10.313128          -24
## [1102,]       10.415621           -4
## [1103,]       10.142022          -11
## [1104,]       10.142022          -11
## [1105,]       10.142022          -11
## [1106,]       10.142022          -11
## [1107,]       10.142022          -11
## [1108,]       10.182139           -8
## [1109,]       10.435394           -9
## [1110,]       10.226982           -4
## [1111,]       10.226982           -4
## [1112,]       10.226982           -4
## [1113,]       10.226982           -4
## [1114,]       10.226982           -4
## [1115,]       10.226982           -4
## [1116,]       10.226982           -4
## [1117,]       10.226982           -4
## [1118,]       10.318107          -24
## [1119,]       10.318107          -24
## [1120,]       10.318107          -24
## [1121,]       10.318107          -24
## [1122,]       10.318107          -24
## [1123,]       10.318107          -24
## [1124,]       10.318107          -24
## [1125,]       10.318107          -24
## [1126,]       10.318107          -24
## [1127,]       10.318107          -24
## [1128,]       10.318107          -24
## [1129,]       10.318107          -24
## [1130,]       10.318107          -24
## [1131,]       10.318107          -24
## [1132,]       10.318107          -24
## [1133,]       10.318107          -24
## [1134,]       10.318107          -24
## [1135,]       10.318107          -24
## [1136,]       10.318107          -24
## [1137,]       10.318107          -24
## [1138,]       10.318107          -24
## [1139,]       10.318107          -24
## [1140,]       10.318107          -24
## [1141,]       10.318107          -24
## [1142,]       10.318107          -24
## [1143,]       10.318107          -24
## [1144,]       10.318107          -24
## [1145,]       10.318107          -24
## [1146,]       10.318107          -24
## [1147,]       10.318107          -24
## [1148,]       10.318107          -24
## [1149,]       10.318107          -24
## [1150,]       10.318107          -24
## [1151,]       10.318107          -24
## [1152,]       10.152607          -15
## [1153,]       10.152607          -15
## [1154,]       10.152607          -15
## [1155,]       10.152607          -15
## [1156,]       10.142022          -11
## [1157,]       10.142022          -11
## [1158,]       10.142022          -11
## [1159,]       10.142022          -11
## [1160,]       10.142022          -11
## [1161,]       10.142022          -11
## [1162,]       10.142022          -11
## [1163,]       10.142022          -11
## [1164,]       10.237464            0
## [1165,]       10.182139           -8
## [1166,]       10.182139           -8
## [1167,]       10.182139           -8
## [1168,]       10.506199            3
## [1169,]       10.506199            3
## [1170,]       10.406678          -20
## [1171,]       10.253744           -5
## [1172,]       10.253744           -5
## [1173,]       10.253744           -5
## [1174,]       10.253744           -5
## [1175,]       10.152607          -15
## [1176,]       10.152607          -15
## [1177,]       10.152607          -15
## [1178,]              NA           NA
## [1179,]       10.226982           -4
## [1180,]       10.163292          -13
## [1181,]       10.163292          -13
## [1182,]       10.163292          -13
## [1183,]       10.163292          -13
## [1184,]       10.163292          -13
## [1185,]       10.264994          -10
## [1186,]       10.242139          -16
## [1187,]       10.242139          -16
## [1188,]       10.242139          -16
## [1189,]       10.242139          -16
## [1190,]       10.242139          -16
## [1191,]       10.242139          -16
## [1192,]       10.242139          -16
## [1193,]       10.242139          -16
## [1194,]       10.242139          -16
## [1195,]       10.242139          -16
## [1196,]       10.264994          -10
## [1197,]       10.542903          -18
## [1198,]       10.542903          -18
## [1199,]       10.542903          -18
## [1200,]       10.542903          -18
## [1201,]       10.542903          -18
## [1202,]       10.542903          -18
## [1203,]       10.542903          -18
## [1204,]       10.542903          -18
## [1205,]       10.542903          -18
## [1206,]       10.542903          -18
## [1207,]       10.542903          -18
## [1208,]       10.542903          -18
## [1209,]       10.542903          -18
## [1210,]       10.542903          -18
## [1211,]       10.542903          -18
## [1212,]       10.542903          -18
## [1213,]       10.542903          -18
## [1214,]       10.542903          -18
## [1215,]       10.542903          -18
## [1216,]       10.542903          -18
## [1217,]       10.542903          -18
## [1218,]       10.542903          -18
## [1219,]       10.542903          -18
## [1220,]       10.542903          -18
## [1221,]       10.542903          -18
## [1222,]       10.542903          -18
## [1223,]       10.542903          -18
## [1224,]       10.542903          -18
## [1225,]       10.542903          -18
## [1226,]       10.542903          -18
## [1227,]       10.542903          -18
## [1228,]       10.542903          -18
## [1229,]       10.542903          -18
## [1230,]       10.542903          -18
## [1231,]       10.542903          -18
## [1232,]       17.836506          -11
## [1233,]       17.836506          -11
## [1234,]       10.493071          -20
## [1235,]       10.493071          -20
## [1236,]       10.525281          -24
## [1237,]       10.577470          -13
## [1238,]       10.577470          -13
## [1239,]       10.577470          -13
## [1240,]       10.577470          -13
## [1241,]       10.525281          -24
## [1242,]       10.918200          -13
## [1243,]       10.972166          -13
## [1244,]       11.037635          -16
## [1245,]       11.206452          -11
## [1246,]       11.206452          -11
## [1247,]       11.236001           -8
## [1248,]       11.379585          -22
## [1249,]       11.379585          -22
## [1250,]       12.535340           -3
## [1251,]       12.535340           -3
## [1252,]       12.535340           -3
## [1253,]       12.535340           -3
## [1254,]       12.535340           -3
## [1255,]       12.535340           -3
## [1256,]       12.535340           -3
## [1257,]       12.535340           -3
## [1258,]       12.535340           -3
## [1259,]       12.535340           -3
## [1260,]       12.535340           -3
## [1261,]       12.362607           -4
## [1262,]       12.384124           -5
## [1263,]       12.290285           -8
## [1264,]       12.362607           -4
## [1265,]       12.384124           -5
## [1266,]       12.384124           -5
## [1267,]       12.290285           -8
## [1268,]       12.537380           -5
## [1269,]       12.537380           -5
## [1270,]       12.535340           -3
## [1271,]       12.535340           -3
## [1272,]       12.537380           -5
## [1273,]       12.535340           -3
## [1274,]       12.535340           -3
## [1275,]       12.537380           -5
## [1276,]       12.535340           -3
## [1277,]       12.290285           -8
## [1278,]       12.290285           -8
## [1279,]       12.383136           -4
## [1280,]       12.383136           -4
## [1281,]       12.535340           -3
## [1282,]       12.535340           -3
## [1283,]       12.535340           -3
## [1284,]       12.535340           -3
## [1285,]       12.483668           -1
## [1286,]       12.535340           -3
## [1287,]       12.428786           -5
## [1288,]       12.535340           -3
## [1289,]       12.535340           -3
## [1290,]       12.428786           -5
## [1291,]       12.428786           -5
## [1292,]       12.428786           -5
## [1293,]       12.535340           -3
## [1294,]       12.428786           -5
## [1295,]       12.428786           -5
## [1296,]       12.483668           -1
## [1297,]       12.290285           -8
## [1298,]       12.290285           -8
## [1299,]       12.428786           -5
## [1300,]       12.535340           -3
## [1301,]       12.535340           -3
## [1302,]       12.535340           -3
## [1303,]       12.535340           -3
## [1304,]       12.483668           -1
## [1305,]       12.483668           -1
## [1306,]       12.535340           -3
## [1307,]       12.535340           -3
## [1308,]       12.535340           -3
## [1309,]       12.483668           -1
## [1310,]       12.483668           -1
## [1311,]       12.535340           -3
## [1312,]       12.535340           -3
## [1313,]       12.535340           -3
## [1314,]       12.535340           -3
## [1315,]       12.537380           -5
## [1316,]       12.535340           -3
## [1317,]       12.535340           -3
## [1318,]       12.535340           -3
## [1319,]       12.535340           -3
## [1320,]       12.535340           -3
## [1321,]       12.535340           -3
## [1322,]       12.535340           -3
## [1323,]       12.537380           -5
## [1324,]       12.535340           -3
## [1325,]       12.535340           -3
## [1326,]       12.535340           -3
## [1327,]       12.535340           -3
## [1328,]       12.537380           -5
## [1329,]       12.535340           -3
## [1330,]       12.537380           -5
## [1331,]       12.535340           -3
## [1332,]       12.535340           -3
## [1333,]       12.535340           -3
## [1334,]       12.535340           -3
## [1335,]       12.535340           -3
## [1336,]       12.535340           -3
## [1337,]       12.535340           -3
## [1338,]       12.535340           -3
## [1339,]       12.535340           -3
## [1340,]       12.535340           -3
## [1341,]       12.535340           -3
## [1342,]       12.537380           -5
## [1343,]       12.535340           -3
## [1344,]       12.535340           -3
## [1345,]       12.535340           -3
## [1346,]       12.428786           -5
## [1347,]       12.290285           -8
## [1348,]       12.535340           -3
## [1349,]       12.535340           -3
## [1350,]       11.464777          -31
## [1351,]       11.549198          -41
## [1352,]       11.662884          -30
## [1353,]       11.505789          -38
## [1354,]       11.663542          -35
## [1355,]       11.375820          -31
## [1356,]       11.567629          -27
## [1357,]              NA           NA
## [1358,]       11.493977           -1
## [1359,]       10.950049          -36
## [1360,]       11.700148          -31
## [1361,]       11.463365          -36
## [1362,]       11.638855          -37
## [1363,]       11.050251          -43
## [1364,]       11.208979          -40
## [1365,]       11.149880          -45
## [1366,]       11.676999          -36
## [1367,]       11.002325          -41
## [1368,]       11.526066          -32
## [1369,]       11.317511          -48
## [1370,]       11.083153          -36
## [1371,]       10.634622          -39
## [1372,]       10.633445          -38
## [1373,]       10.634622          -39
## [1374,]       10.634622          -39
## [1375,]       17.366812          -23
## [1376,]       17.366812          -23
## [1377,]       17.366812          -23
## [1378,]       17.366812          -23
## [1379,]       17.366812          -23
## [1380,]       10.351409          -91
## [1381,]       10.208289          -12
## [1382,]       10.351409          -91
## [1383,]       10.351409          -91
## [1384,]       10.351409          -91
## [1385,]       10.157583           -3
## [1386,]       10.157583           -3
## [1387,]       10.153895          -20
## [1388,]       10.153895          -20
## [1389,]       10.256017          -21
## [1390,]       10.256017          -21
## [1391,]       10.256017          -21
## [1392,]       10.256017          -21
## [1393,]       10.256017          -21
## [1394,]       10.298089          -18
## [1395,]       10.298089          -18
## [1396,]       10.298089          -18
## [1397,]       10.298089          -18
## [1398,]       10.298089          -18
## [1399,]       10.298089          -18
## [1400,]       10.298089          -18
## [1401,]       10.298089          -18
## [1402,]       10.298089          -18
## [1403,]       10.298089          -18
## [1404,]       10.315656          -26
## [1405,]       10.315656          -26
## [1406,]       10.331846          -36
## [1407,]       10.331846          -36
## [1408,]       10.207336          -13
## [1409,]       10.207336          -13
## [1410,]       10.224140          -19
## [1411,]       10.135781          -15
## [1412,]       10.315656          -26
## [1413,]       10.315656          -26
## [1414,]       10.315656          -26
## [1415,]       12.573071            1
## [1416,]       12.573071            1
## [1417,]       12.547369           -5
## [1418,]       12.547369           -5
## [1419,]       12.572894            0
## [1420,]       12.572894            0
## [1421,]       12.804593           -5
## [1422,]       12.807024           -5
## [1423,]       12.807493           -7
## [1424,]       12.788178           -4
## [1425,]       12.740981            5
## [1426,]       12.740981            5
## [1427,]       12.721101           -3
## [1428,]       12.721101           -3
## [1429,]       12.714361           -5
## [1430,]       12.714361           -5
## [1431,]       12.611982          -16
## [1432,]       12.603058           -2
## [1433,]       12.611982          -16
## [1434,]       12.603058           -2
## [1435,]       12.603058           -2
## [1436,]       12.611982          -16
## [1437,]       12.611982          -16
## [1438,]       12.577116          -14
## [1439,]       12.572894            0
## [1440,]       12.572894            0
## [1441,]       12.573071            1
## [1442,]       12.573071            1
## [1443,]       12.573071            1
## [1444,]       12.573071            1
## [1445,]       12.573071            1
## [1446,]       12.573071            1
## [1447,]       12.573071            1
## [1448,]       12.573071            1
## [1449,]       12.573071            1
## [1450,]       12.573071            1
## [1451,]       12.567237          -13
## [1452,]       12.567237          -13
## [1453,]       12.555981           -7
## [1454,]       12.548070           -6
## [1455,]       12.547369           -5
## [1456,]       12.547369           -5
## [1457,]       12.535340           -3
## [1458,]       12.535340           -3
## [1459,]       12.547369           -5
## [1460,]       12.547369           -5
## [1461,]       12.632957          -16
## [1462,]       12.632957          -16
## [1463,]       12.509810           -6
## [1464,]       12.283858           -6
## [1465,]       12.414593           -5
## [1466,]       12.336293           -1
## [1467,]       12.336293           -1
## [1468,]       12.498948          -11
## [1469,]       12.498948          -11
## [1470,]       12.498948          -11
## [1471,]       12.346070           -7
## [1472,]       12.378994          -12
## [1473,]       12.378994          -12
## [1474,]       12.512078          -13
## [1475,]       12.512078          -13
## [1476,]       12.512078          -13
## [1477,]       12.512078          -13
## [1478,]       11.463365          -36
## [1479,]       11.638855          -37
## [1480,]       11.050251          -43
## [1481,]       11.100461          -36
## [1482,]       11.464777          -31
## [1483,]       11.549198          -41
## [1484,]       11.567629          -27
## [1485,]              NA           NA
## [1486,]       10.950049          -36
## [1487,]       11.493977           -1
## [1488,]       11.546629          -28
## [1489,]       11.317511          -48
## [1490,]       11.662884          -30
## [1491,]       11.505789          -38
## [1492,]       11.663542          -35
## [1493,]       11.400824          -30
## [1494,]       11.676999          -36
## [1495,]       11.208979          -40
## [1496,]       11.150796          -58
## [1497,]       11.002325          -41
## [1498,]       11.700148          -31
## [1499,]       11.965951          -35
## [1500,]       12.107245          -47
## [1501,]       12.068426          -44
## [1502,]       11.946438          -20
## [1503,]       12.003528          -14
## [1504,]       11.965951          -35
## [1505,]       11.965951          -35
## [1506,]       12.068426          -44
## [1507,]       11.946438          -20
## [1508,]       12.054779          -23
## [1509,]       12.054779          -23
## [1510,]       11.946438          -20
## [1511,]       12.003528          -14
## [1512,]       12.068426          -44
## [1513,]       11.946438          -20
## [1514,]       12.003528          -14
## [1515,]       12.054779          -23
## [1516,]       12.054779          -23
## [1517,]       12.068426          -44
## [1518,]       12.068426          -44
## [1519,]       12.003528          -14
## [1520,]       11.946438          -20
## [1521,]       11.946438          -20
## [1522,]       12.054779          -23
## [1523,]       12.068426          -44
## [1524,]       12.054779          -23
## [1525,]       11.946438          -20
## [1526,]       12.054779          -23
## [1527,]       12.068426          -44
## [1528,]       12.003528          -14
## [1529,]       11.965951          -35
## [1530,]       11.946438          -20
## [1531,]       12.054779          -23
## [1532,]       12.068426          -44

Overlap with polygons

library(sf)
abra_points <- st_as_sf(abra, coords = c('decimalLongitude', 'decimalLatitude'), crs = 4326)
meow <- read_sf('data/MEOW/meow_ecos.shp')

abra_meow <- st_intersection(abra_points, meow)
## Warning: attribute variables are assumed to be spatially constant
## throughout all geometries
colnames(abra_meow)
##  [1] "id"         "qc"         "depth"      "ECO_CODE"   "ECOREGION" 
##  [6] "PROV_CODE"  "PROVINCE"   "RLM_CODE"   "REALM"      "ALT_CODE"  
## [11] "ECO_CODE_X" "Lat_Zone"   "geometry"

Spatial thinning

if (!require('devtools')) {
    install.packages('devtools', repo='http://cran.rstudio.com', dep=TRUE)
}
devtools:::install_github('mlammens/spThin')

Spatial thinning

library(spThin)

abra_thin <- spThin(abra, x.col = 'decimalLongitude', y.col = 'decimalLatitude',
                    dist = 10, great.circle.distance = TRUE)
NROW(abra)
## [1] 1532
NROW(abra[abra_thin@samples[[1]],,drop=FALSE])
## [1] 480

Create coastline raster

coast_mask <- function(layer) {
  edges <- raster::boundaries(layer, type="inner")
  values <- getValues(edges)
  is.na(values) | values == 0
}
l <- raster('data/BO2_tempmean_ss_lonlat.tif')
mask <- coast_mask(l)
l[mask] <- NA

Visualizing data

ggplot2

http://ggplot2.tidyverse.org/reference/

All ggplot2 plots with a call to ggplot(), supplying default data and aesthethic mappings, specified by aes(). You then add layers, scales, coords and facets with +. To save a plot to disk, use ggsave().

Preparing data

library(dplyr)
envabra <- extract(environment, abra[,c('decimalLongitude', 'decimalLatitude')])
data <- cbind(abra, envabra) %>% 
  mutate(ObservationDepth = -1*depth, Bathymetry = BO_bathymean) %>%
  select(ObservationDepth, Bathymetry)
data <- data[complete.cases(data),,drop=FALSE]
data_long <- tidyr::gather(data)

Points

library(ggplot2)
ggplot(data, aes(x=Bathymetry, y=ObservationDepth)) +
  geom_point()

Boxplots

ggplot(data_long, aes(x=key, y=value)) + 
  geom_boxplot()

Histogram

ggplot(data_long, aes(x=value)) +
  geom_histogram(binwidth = 5, alpha = 0.5) +
  facet_grid(key ~ .)

Frequency polygons

ggplot(data_long, aes(x=value, colour=key)) +
  geom_freqpoly(binwidth = 5)

Density

ggplot(data_long, aes(x=value, fill=key, colour=key)) +
  geom_density(alpha=0.5)

Correlation between rasters

library(sdmpredictors)
layers <- list_layers('Bio-ORACLE', version = 2)
meanss <- layers %>% filter(is_surface & grepl('mean[_]', layer_code))
corr <- layers_correlation(meanss$layer_code)
corr <- corr[unlist(correlation_groups(corr)), unlist(correlation_groups(corr))]
corr[corr==1] <- NA
plot_correlation(corr)

Visualize QC

  • 28. Species outliers (geography): is the observation within three IQRs from the first & third quartile distance to the geographic centroid of this taxon?
acistu <- occurrence("Acipenser sturio") # European sea sturgeon
## 
Retrieved 66 records of 66 (100%)
acistu$qcnum <- qcflags(acistu$qc, c(28))
colors <- c("#ee3300", "#86b300")[acistu$qcnum + 1]
popup <- paste0(acistu$datasetName, "<br/>", acistu$catalogNumber, 
                "<br/><a href=\"http://www.iobis.org/explore/#/dataset/", 
                acistu$resourceID, "\">OBIS dataset page</a>")

Visualize QC

library(leaflet)
leaflet() %>% addProviderTiles("CartoDB.Positron") %>%
  addCircleMarkers(
    popup = popup, radius = 3.5, weight = 0, fillColor = colors, fillOpacity = 1,
    lat = acistu$decimalLatitude, lng = acistu$decimalLongitude)

Visualize QC

acistu$qctxt <- c("Not ok", "Ok")[acistu$qcnum + 1]
ggplot() +
  geom_polygon(data=map_data("world"),aes(x=long,y=lat,group=group),fill="#dddddd")+
  geom_point(data=acistu, aes(x=decimalLongitude, y=decimalLatitude, color=qctxt))

Visualize environmental data

# devtools::install_github('iobis/obistools')
env <- obistools::lookup_xy(acistu)
envacistu <- cbind(acistu[complete.cases(env),], env[complete.cases(env),])
ggplot(envacistu, aes(x=sssalinity, y=sstemperature, color=qctxt)) +
  geom_point()

World + SST + MEOW + Abra alba

meow <- read_sf('data/MEOW/meow_ecos.shp')
sst <- raster('data/BO2_tempmean_ss_lonlat.tif')
extent <- extent(-87, 25, 24, 70)
sst <- raster::crop(sst, extent)
sst_df <- as.data.frame(as(sst, "SpatialPixelsDataFrame"))
colnames(sst_df) <- c("value", "x", "y")
map <- ggplot() +
  geom_tile(data=sst_df, aes(x=x, y=y, fill=value), alpha=0.8) +
  geom_sf(data=meow, fill="darkgreen", alpha=0.1) +
  geom_polygon(data=map_data("world"),aes(x=long,y=lat,group=group),fill="#dddddd") +
  geom_point(data=abra, aes(x=decimalLongitude, y=decimalLatitude)) +
  coord_sf(xlim = c(extent@xmin+10, extent@xmax-10), 
           ylim = c(extent@ymin+10, extent@ymax-10)) +
  scale_fill_distiller(palette = "Spectral") +
  labs(x="longitude", y="latitude", fill = "SST")

World + SST + MEOW + Abra alba

Ten Simple Rules for Reproducible Computational Research

Sandve GK, Nekrutenko A, Taylor J, Hovig E (2013) Ten Simple Rules for Reproducible Computational Research. PLoS Comput Biol 9(10): e1003285. https://doi.org/10.1371/journal.pcbi.1003285

Rule 1: For Every Result, Keep Track of How It Was Produced

Rule 2: Avoid Manual Data Manipulation Steps

Rule 3: Archive the Exact Versions of All External Programs Used

Rule 4: Version Control All Custom Scripts

Rule 5: Record All Intermediate Results, When Possible in Standardized Formats

Ten Simple Rules for Reproducible Computational Research

Rule 6: For Analyses That Include Randomness, Note Underlying Random Seeds

set.seed(42)

Rule 7: Always Store Raw Data behind Plots

write_csv  
saveRDS

Rule 8: Generate Hierarchical Analysis Output, Allowing Layers of Increasing Detail to Be Inspected

Rule 9: Connect Textual Statements to Underlying Results

Rule 10: Provide Public Access to Scripts, Runs, and Results

Extra

Exercises

  • Plot thinned records and original records for e.g. Abra alba, zoom in on the European distribution
  • Plot surface and benthic temperature against depth for Europe