A_02_Preprocess_data.R

A - 02: Preprocess data

Code
tictoc::tic()

Source 00_Configuration.R

Code
source(here::here("Code/00_Configuration.R"))
x <- lapply(package_list, require, character = TRUE)
sf_use_s2(TRUE)
rm(x)

Load data produced from script: A_01_Get_data

Code
grids <-
  readRDS(vars$grid)

data_sf <-
  readRDS(vars$data_sf)

Add filtering columns

1. Spatial filter

get list of cells and sampling repeats get list of species and filters (or whether to include them)

1.1. Cell-indicator for repeated sampling

Code
cells <-
  data_sf %>%
  st_drop_geometry() %>%
  group_by(datasetID, scalingID, siteID, samplingPeriodID) %>%
  mutate(cell_sampled = if_else(is.na(verbatimIdentification), 0, 1)) %>%
  ungroup() %>%
  distinct(datasetID, scalingID, siteID, samplingPeriodID, cell_sampled, croppedArea, time_span) %>%
  group_by(datasetID, scalingID, siteID, croppedArea) %>%
  dplyr::summarise(
    cell_sampling_repeats = n_distinct(samplingPeriodID, na.rm = TRUE),
    .groups = "keep") %>%
  mutate(cells_keep =
           case_when(
             cell_sampling_repeats == 2 & !is.na(croppedArea) ~ 1,
             cell_sampling_repeats %in% c(0,1) | is.na(croppedArea) ~ 0,
            .default = NA)) %>%
  unique()

Checks:

Code
glimpse(cells)
Rows: 17,286
Columns: 6
Groups: datasetID, scalingID, siteID, croppedArea [17,286]
$ datasetID             <int> 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, …
$ scalingID             <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
$ siteID                <int> 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, …
$ croppedArea           <dbl> 21.076318, 41.363317, 8.586563, 1.390874, 16.092…
$ cell_sampling_repeats <int> 0, 2, 0, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 2, 2, 2, …
$ cells_keep            <dbl> 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, …
Code
colSums(is.na(cells)) # 14 cells without area
            datasetID             scalingID                siteID 
                    0                     0                     0 
          croppedArea cell_sampling_repeats            cells_keep 
                   14                     0                     0 

2. Species filter

Code
species_df <-
  data_sf %>%
  st_drop_geometry() %>%
  filter(scalingID == 1) %>%
  distinct(datasetID, verbatimIdentification, scientificName, samplingPeriodID, time_span) %>%
  filter(!is.na(verbatimIdentification))

Checks:

Code
glimpse(species_df)
Rows: 2,272
Columns: 5
$ datasetID              <int> 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,…
$ verbatimIdentification <chr> "Carpodacus erythrinus", "Garrulus glandarius",…
$ scientificName         <chr> "Carpodacus erythrinus", "Garrulus glandarius",…
$ samplingPeriodID       <dbl> 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2,…
$ time_span              <int> 2, 2, 4, 2, 4, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2,…
Code
colSums(is.na(species_df))
             datasetID verbatimIdentification         scientificName 
                     0                      0                      0 
      samplingPeriodID              time_span 
                     0                      0 

2.1 Under-sampled species from Japan

Code
jp_sp_remove <-
  read.csv(here("Data/input/META_removed_sp_Japan_expert_knowledge.csv"),
           header = FALSE,
           strip.white = TRUE) %>%
  pull(V1)

jp_sp_remove
 [1] "Haliaeetus albicilla " "Spilornis cheela "     "Circus spilonotus "   
 [4] "Accipiter gularis "    "Accipiter nisus "      "Accipiter gentilis "  
 [7] "Butastur indicus "     "Buteo buteo "          "Nisaetus nipalensis " 
[10] "Otus lempiji "         "Otus sunia "           "Otus elegans "        
[13] "Strix uralensis "      "Ninox scutulata "      "Asio otus "           
[16] "Dendrocopos leucotos " "Dendrocopos major "    "Dryocopus martius "   
[19] "Picus awokera "        "Picus canus "          "Falco tinnunculus "   
[22] "Falco subbuteo "       "Falco peregrinus "     "Zoothera sibirica "   
[25] "Zoothera dauma "       "Caprimulgus indicus " 
Code
species_df2 <- species_df %>%
  mutate(
    sp_remove_expert =
      case_when(
        verbatimIdentification %in% jp_sp_remove & datasetID == 13 ~ 1,
        TRUE ~ 0))

head(species_df2)
  datasetID verbatimIdentification        scientificName samplingPeriodID
1         5  Carpodacus erythrinus Carpodacus erythrinus                2
2         5    Garrulus glandarius   Garrulus glandarius                2
3         5   Emberiza schoeniclus  Emberiza schoeniclus                1
4         5        Parus cristatus Lophophanes cristatus                2
5         5    Streptopelia turtur   Streptopelia turtur                1
6         5          Ciconia nigra         Ciconia nigra                2
  time_span sp_remove_expert
1         2                0
2         2                0
3         4                0
4         2                0
5         4                0
6         2                0

2.2. Native vs. Introduced

Read grid shapefiles at largest resolution(1-cell-aggregations)

Code
sf_use_s2(FALSE) # fixes error with crossing geometries in EBBA

countries <-
  grids %>%
  group_by(datasetID) %>%
  filter(scalingID == max(scalingID)) %>%
  select(datasetID, geometry) %>%
  summarize(
    geometry = st_union(geometry),
    .groups = "keep"
  ) %>%
  st_make_valid()

head(countries)
Simple feature collection with 4 features and 1 field
Geometry type: GEOMETRY
Dimension:     XY
Bounding box:  xmin: -79.79188 ymin: 24 xmax: 146 ymax: 81.95675
Geodetic CRS:  WGS 84
# A tibble: 4 × 2
# Groups:   datasetID [4]
  datasetID                                                             geometry
      <int>                                                       <GEOMETRY [°]>
1         5 POLYGON ((18.16496 49.19965, 18.16496 49.09965, 18.16497 48.99964, …
2         6 MULTIPOLYGON (((-71.95444 41.28819, -71.95234 41.33317, -71.89268 4…
3        13 MULTIPOLYGON (((123.25 24.33333, 123 24.33333, 122.75 24.33333, 122…
4        26 MULTIPOLYGON (((-18.45763 28.00178, -17.99985 27.99255, -17.54207 2…

Load range maps for introduced species

Code
BirdLife_introduced <-
  st_read(here("Data/input/shp_introduced/")) %>%
  st_transform(crs = st_crs(countries))
Reading layer `BirdLife_introduced' from data source 
  `C:\Users\wolke\OneDrive - CZU v Praze\Frieda_PhD_files\02_StaticPatterns\Git\Data\input\shp_introduced' 
  using driver `ESRI Shapefile'
Simple feature collection with 90 features and 4 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: -180 ymin: -55.97681 xmax: 180 ymax: 66.6413
Geodetic CRS:  WGS 84

check if they are identical now:

Code
st_crs(countries) == st_crs(BirdLife_introduced)
[1] TRUE

Spatial join: Countries and introduced ranges

Code
introduced_sp <-
  st_join(countries, BirdLife_introduced,
          join = st_intersects) %>%
  rename("scientificName" = "sci_name") %>%
  mutate(introduced = 1) %>%
  st_drop_geometry() %>%
  select(datasetID, scientificName, introduced) %>%
  arrange(datasetID)

create new filtering column for introduced species in sp data

Code
species_df3 <-
  species_df2 %>%
  left_join(introduced_sp) %>%
  mutate(introduced = case_when(is.na(introduced) ~ 0,
                                .default = introduced))
head(species_df3)
  datasetID verbatimIdentification        scientificName samplingPeriodID
1         5  Carpodacus erythrinus Carpodacus erythrinus                2
2         5    Garrulus glandarius   Garrulus glandarius                2
3         5   Emberiza schoeniclus  Emberiza schoeniclus                1
4         5        Parus cristatus Lophophanes cristatus                2
5         5    Streptopelia turtur   Streptopelia turtur                1
6         5          Ciconia nigra         Ciconia nigra                2
  time_span sp_remove_expert introduced
1         2                0          0
2         2                0          0
3         4                0          0
4         2                0          0
5         4                0          0
6         2                0          0

2.3. Species lost or gained

excluding species that are introduced or under-sampled

Code
common_sp <-
  data_sf %>%
  st_drop_geometry() %>%
  filter(scalingID == 1) %>%
  left_join(species_df3) %>%
  left_join(cells %>% filter(scalingID == 1)) %>%
  na.omit() %>%
  filter(cells_keep == 1 & introduced == 0 & sp_remove_expert == 0) %>%
  group_by(datasetID, verbatimIdentification) %>%
  dplyr::summarise(sp_sampling_repeats = n_distinct(samplingPeriodID),
                   .groups = "drop")

checks species with sp_sampling_repeats != 2 will be removed from the data

Code
common_sp %>%
  group_by(datasetID, sp_sampling_repeats) %>%
  dplyr::summarise(n_sp = n_distinct(verbatimIdentification),
                   .groups = "keep")
# A tibble: 8 × 3
# Groups:   datasetID, sp_sampling_repeats [8]
  datasetID sp_sampling_repeats  n_sp
      <int>               <int> <int>
1         5                   1    18
2         5                   2   201
3         6                   1    16
4         6                   2   233
5        13                   1    33
6        13                   2   208
7        26                   1     9
8        26                   2   412

add filtering column for species that are kept for analysis

Code
species_df4 <-
  species_df3 %>%
  left_join(common_sp) %>%
  mutate(
    species_keep =
      case_when(
        sp_remove_expert == 0 & sp_sampling_repeats == 2 & introduced == 0 ~ 1,
        TRUE ~ 0))
head(species_df4)
  datasetID verbatimIdentification        scientificName samplingPeriodID
1         5  Carpodacus erythrinus Carpodacus erythrinus                2
2         5    Garrulus glandarius   Garrulus glandarius                2
3         5   Emberiza schoeniclus  Emberiza schoeniclus                1
4         5        Parus cristatus Lophophanes cristatus                2
5         5    Streptopelia turtur   Streptopelia turtur                1
6         5          Ciconia nigra         Ciconia nigra                2
  time_span sp_remove_expert introduced sp_sampling_repeats species_keep
1         2                0          0                   2            1
2         2                0          0                   2            1
3         4                0          0                   2            1
4         2                0          0                   2            1
5         4                0          0                   2            1
6         2                0          0                   2            1

Apply data filters

Code
data_sf2 <-
  data_sf %>%
  left_join(cells) %>%
  left_join(species_df4)

head(data_sf2)
Simple feature collection with 6 features and 32 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: 14.16488 ymin: 50.99961 xmax: 14.49822 ymax: 51.09962
Geodetic CRS:  WGS 84
  datasetID scalingID siteID footprintSRS verbatimFootprintSRS     area
1         5         1      1    epsg:4326            epsg:5514 130.0203
2         5         1      2    epsg:4326            epsg:5514 130.0204
3         5         1      2    epsg:4326            epsg:5514 130.0204
4         5         1      2    epsg:4326            epsg:5514 130.0204
5         5         1      2    epsg:4326            epsg:5514 130.0204
6         5         1      2    epsg:4326            epsg:5514 130.0204
  croppedArea areaUnit croppedAreaPercent centroidDecimalLongitude
1    21.07632      km2          0.1621002                 14.24822
2    41.36332      km2          0.3181295                 14.41488
3    41.36332      km2          0.3181295                 14.41488
4    41.36332      km2          0.3181295                 14.41488
5    41.36332      km2          0.3181295                 14.41488
6    41.36332      km2          0.3181295                 14.41488
  centroidDecimalLatitude croppedDecimalLongitude croppedDecimalLatitude
1                51.04961                14.30475               51.02347
2                51.04962                14.40960               51.01669
3                51.04962                14.40960               51.01669
4                51.04962                14.40960               51.01669
5                51.04962                14.40960               51.01669
6                51.04962                14.40960               51.01669
  northSouthLength eastWestLength maxLength croppedNorthSouthLength
1         11.12540       11.69999  16.13557                6.239639
2         11.12541       11.70000  16.13557                5.178504
3         11.12541       11.70000  16.13557                5.178504
4         11.12541       11.70000  16.13557                5.178504
5         11.12541       11.70000  16.13557                5.178504
6         11.12541       11.70000  16.13557                5.178504
  croppedEastWestLength croppedMaxLength lengthUnit startYear endYear
1              4.989069         7.069381         km        NA      NA
2             11.699831        12.789048         km      2001    2003
3             11.699831        12.789048         km      2001    2003
4             11.699831        12.789048         km      1985    1989
5             11.699831        12.789048         km      2001    2003
6             11.699831        12.789048         km      1985    1989
  verbatimIdentification        scientificName samplingPeriodID time_span
1                   <NA>                  <NA>               NA        NA
2  Carpodacus erythrinus Carpodacus erythrinus                2         2
3    Garrulus glandarius   Garrulus glandarius                2         2
4   Emberiza schoeniclus  Emberiza schoeniclus                1         4
5        Parus cristatus Lophophanes cristatus                2         2
6    Streptopelia turtur   Streptopelia turtur                1         4
  cell_sampling_repeats cells_keep sp_remove_expert introduced
1                     0          0               NA         NA
2                     2          1                0          0
3                     2          1                0          0
4                     2          1                0          0
5                     2          1                0          0
6                     2          1                0          0
  sp_sampling_repeats species_keep                       geometry
1                  NA           NA MULTIPOLYGON (((14.16488 51...
2                   2            1 MULTIPOLYGON (((14.33155 51...
3                   2            1 MULTIPOLYGON (((14.33155 51...
4                   2            1 MULTIPOLYGON (((14.33155 51...
5                   2            1 MULTIPOLYGON (((14.33155 51...
6                   2            1 MULTIPOLYGON (((14.33155 51...

keep only species and cells sampled twice

Code
data_filt <-
  data_sf2 %>%
  st_drop_geometry() %>%
  filter(!is.na(verbatimIdentification) & species_keep == 1 & cells_keep == 1)

Checks:

Code
data_filt %>%
  group_by(datasetID, samplingPeriodID) %>%
  skimr::skim()
Data summary
Name Piped data
Number of rows 2508543
Number of columns 32
_______________________
Column type frequency:
character 6
numeric 24
________________________
Group variables datasetID, samplingPeriodID

Variable type: character

skim_variable datasetID samplingPeriodID n_missing complete_rate min max empty n_unique whitespace
footprintSRS 5 1 0 1 9 9 0 1 0
footprintSRS 5 2 0 1 9 9 0 1 0
footprintSRS 6 1 0 1 9 9 0 1 0
footprintSRS 6 2 0 1 9 9 0 1 0
footprintSRS 13 1 0 1 9 9 0 1 0
footprintSRS 13 2 0 1 9 9 0 1 0
footprintSRS 26 1 0 1 9 9 0 1 0
footprintSRS 26 2 0 1 9 9 0 1 0
verbatimFootprintSRS 5 1 0 1 9 9 0 1 0
verbatimFootprintSRS 5 2 0 1 9 9 0 1 0
verbatimFootprintSRS 6 1 0 1 10 10 0 1 0
verbatimFootprintSRS 6 2 0 1 10 10 0 1 0
verbatimFootprintSRS 13 1 0 1 9 9 0 1 0
verbatimFootprintSRS 13 2 0 1 9 9 0 1 0
verbatimFootprintSRS 26 1 0 1 9 9 0 1 0
verbatimFootprintSRS 26 2 0 1 9 9 0 1 0
areaUnit 5 1 0 1 3 3 0 1 0
areaUnit 5 2 0 1 3 3 0 1 0
areaUnit 6 1 0 1 3 3 0 1 0
areaUnit 6 2 0 1 3 3 0 1 0
areaUnit 13 1 0 1 3 3 0 1 0
areaUnit 13 2 0 1 3 3 0 1 0
areaUnit 26 1 0 1 3 3 0 1 0
areaUnit 26 2 0 1 3 3 0 1 0
lengthUnit 5 1 0 1 2 2 0 1 0
lengthUnit 5 2 0 1 2 2 0 1 0
lengthUnit 6 1 0 1 2 2 0 1 0
lengthUnit 6 2 0 1 2 2 0 1 0
lengthUnit 13 1 0 1 2 2 0 1 0
lengthUnit 13 2 0 1 2 2 0 1 0
lengthUnit 26 1 0 1 2 2 0 1 0
lengthUnit 26 2 0 1 2 2 0 1 0
verbatimIdentification 5 1 0 1 9 29 0 201 0
verbatimIdentification 5 2 0 1 9 29 0 201 0
verbatimIdentification 6 1 0 1 9 32 0 233 0
verbatimIdentification 6 2 0 1 9 32 0 233 0
verbatimIdentification 13 1 0 1 9 29 0 208 0
verbatimIdentification 13 2 0 1 9 29 0 208 0
verbatimIdentification 26 1 0 1 9 29 0 412 0
verbatimIdentification 26 2 0 1 9 29 0 412 0
scientificName 5 1 0 1 9 29 0 198 0
scientificName 5 2 0 1 9 29 0 198 0
scientificName 6 1 0 1 9 39 0 233 0
scientificName 6 2 0 1 9 39 0 233 0
scientificName 13 1 0 1 9 29 0 208 0
scientificName 13 2 0 1 9 29 0 208 0
scientificName 26 1 0 1 9 29 0 412 0
scientificName 26 2 0 1 9 29 0 412 0

Variable type: numeric

skim_variable datasetID samplingPeriodID n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
scalingID 5 1 0 1 2.07 3.92 1.00 1.00 1.00 2.00 64.00 ▇▁▁▁▁
scalingID 5 2 0 1 2.05 3.85 1.00 1.00 1.00 2.00 64.00 ▇▁▁▁▁
scalingID 6 1 0 1 2.13 4.91 1.00 1.00 1.00 2.00 128.00 ▇▁▁▁▁
scalingID 6 2 0 1 2.09 4.76 1.00 1.00 1.00 2.00 128.00 ▇▁▁▁▁
scalingID 13 1 0 1 3.46 9.17 1.00 1.00 1.00 2.00 128.00 ▇▁▁▁▁
scalingID 13 2 0 1 3.39 8.80 1.00 1.00 1.00 2.00 128.00 ▇▁▁▁▁
scalingID 26 1 0 1 2.23 5.50 1.00 1.00 1.00 2.00 128.00 ▇▁▁▁▁
scalingID 26 2 0 1 2.18 5.31 1.00 1.00 1.00 2.00 128.00 ▇▁▁▁▁
siteID 5 1 0 1 250.54 204.87 1.00 65.00 183.00 425.00 673.00 ▇▅▃▃▃
siteID 5 2 0 1 252.28 206.62 1.00 64.00 183.00 431.00 673.00 ▇▃▃▃▃
siteID 6 1 0 1 2150.86 1484.84 1.00 872.00 1921.00 3225.00 5335.00 ▇▇▆▃▃
siteID 6 2 0 1 2128.88 1473.71 1.00 859.00 1905.00 3175.00 5335.00 ▇▇▆▃▃
siteID 13 1 0 1 492.31 423.73 1.00 122.00 365.00 814.00 1464.00 ▇▃▂▂▂
siteID 13 2 0 1 490.33 425.59 1.00 118.00 350.00 828.00 1464.00 ▇▃▂▂▂
siteID 26 1 0 1 1553.41 945.02 1.00 787.00 1476.00 2187.00 5225.00 ▇▇▆▁▁
siteID 26 2 0 1 1574.18 957.70 1.00 788.00 1499.00 2226.00 5225.00 ▇▇▆▁▁
area 5 1 0 1 1031.30 5730.33 130.02 133.05 134.95 531.66 90569.14 ▇▁▁▁▁
area 5 2 0 1 1008.82 5625.60 130.02 133.05 134.95 531.66 90569.14 ▇▁▁▁▁
area 6 1 0 1 291.59 3264.13 24.93 25.01 25.02 100.05 133087.29 ▇▁▁▁▁
area 6 2 0 1 282.42 3188.68 24.93 25.01 25.02 100.05 133087.29 ▇▁▁▁▁
area 13 1 0 1 6547.79 33516.77 362.47 412.92 432.25 1691.29 538550.03 ▇▁▁▁▁
area 13 2 0 1 6231.39 31892.21 362.47 412.92 433.84 1691.29 538550.03 ▇▁▁▁▁
area 26 1 0 1 41113.52 455431.19 1550.65 2501.63 2501.97 10005.38 13223660.56 ▇▁▁▁▁
area 26 2 0 1 38512.74 437568.42 1550.65 2501.63 2501.97 10005.38 13223660.56 ▇▁▁▁▁
croppedArea 5 1 0 1 911.91 5035.89 7.57 132.53 134.43 527.25 78873.98 ▇▁▁▁▁
croppedArea 5 2 0 1 892.01 4944.05 7.57 132.52 134.43 525.09 78873.98 ▇▁▁▁▁
croppedArea 6 1 0 1 278.72 3120.13 0.01 25.01 25.02 100.05 127077.41 ▇▁▁▁▁
croppedArea 6 2 0 1 270.15 3048.35 0.01 25.01 25.02 100.04 127077.41 ▇▁▁▁▁
croppedArea 13 1 0 1 4758.46 23545.63 0.15 373.15 420.71 1619.60 371982.46 ▇▁▁▁▁
croppedArea 13 2 0 1 4515.97 22411.90 0.15 371.75 419.86 1606.52 371982.46 ▇▁▁▁▁
croppedArea 26 1 0 1 34547.11 387572.23 0.15 2494.24 2501.93 8928.22 11171485.87 ▇▁▁▁▁
croppedArea 26 2 0 1 32345.75 372332.04 0.15 2493.95 2501.70 8667.47 11171485.87 ▇▁▁▁▁
croppedAreaPercent 5 1 0 1 0.91 0.19 0.06 0.97 1.00 1.00 1.00 ▁▁▁▁▇
croppedAreaPercent 5 2 0 1 0.91 0.19 0.06 0.97 1.00 1.00 1.00 ▁▁▁▁▇
croppedAreaPercent 6 1 0 1 0.96 0.16 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
croppedAreaPercent 6 2 0 1 0.96 0.15 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
croppedAreaPercent 13 1 0 1 0.77 0.29 0.00 0.60 0.94 1.00 1.00 ▁▁▁▂▇
croppedAreaPercent 13 2 0 1 0.76 0.30 0.00 0.58 0.92 1.00 1.00 ▁▁▁▂▇
croppedAreaPercent 26 1 0 1 0.84 0.28 0.00 0.77 1.00 1.00 1.00 ▁▁▁▁▇
croppedAreaPercent 26 2 0 1 0.84 0.28 0.00 0.78 1.00 1.00 1.00 ▁▁▁▁▇
centroidDecimalLongitude 5 1 0 1 15.39 1.60 12.08 14.08 15.25 16.66 18.80 ▃▇▇▆▃
centroidDecimalLongitude 5 2 0 1 15.39 1.59 12.08 14.16 15.25 16.58 18.80 ▃▇▇▆▃
centroidDecimalLongitude 6 1 0 1 -75.49 1.71 -79.76 -76.63 -75.12 -74.12 -71.87 ▂▃▆▇▁
centroidDecimalLongitude 6 2 0 1 -75.55 1.72 -79.76 -76.69 -75.21 -74.15 -71.87 ▂▃▆▇▁
centroidDecimalLongitude 13 1 0 1 137.81 4.35 123.00 134.45 138.88 141.12 145.88 ▁▂▃▇▅
centroidDecimalLongitude 13 2 0 1 137.73 4.44 123.00 134.19 138.88 140.88 145.88 ▁▃▃▇▃
centroidDecimalLongitude 26 1 0 1 14.01 12.02 -31.26 5.42 15.35 23.60 41.92 ▁▂▅▇▂
centroidDecimalLongitude 26 2 0 1 14.27 12.17 -31.26 5.43 15.57 24.00 41.92 ▁▂▅▇▂
centroidDecimalLatitude 5 1 0 1 49.73 0.56 48.60 49.25 49.75 50.15 51.05 ▅▇▇▆▂
centroidDecimalLatitude 5 2 0 1 49.73 0.57 48.60 49.25 49.75 50.20 51.05 ▅▇▇▆▂
centroidDecimalLatitude 6 1 0 1 42.88 0.99 40.49 42.22 42.80 43.51 45.03 ▂▅▇▅▃
centroidDecimalLatitude 6 2 0 1 42.89 0.97 40.49 42.24 42.81 43.51 45.03 ▂▅▇▅▃
centroidDecimalLatitude 13 1 0 1 37.44 4.07 24.25 34.67 36.42 40.90 45.47 ▁▁▇▃▃
centroidDecimalLatitude 13 2 0 1 37.35 4.12 24.25 34.58 36.50 40.75 45.47 ▁▁▇▃▅
centroidDecimalLatitude 26 1 0 1 51.06 8.27 28.47 44.77 50.09 56.60 80.61 ▁▇▇▃▁
centroidDecimalLatitude 26 2 0 1 50.90 8.22 28.47 44.67 49.87 56.35 80.61 ▁▇▇▃▁
croppedDecimalLongitude 5 1 0 1 15.39 1.59 12.14 14.10 15.25 16.66 18.75 ▃▇▇▆▃
croppedDecimalLongitude 5 2 0 1 15.39 1.58 12.14 14.16 15.25 16.58 18.75 ▃▇▇▆▃
croppedDecimalLongitude 6 1 0 1 -75.49 1.71 -79.74 -76.63 -75.12 -74.12 -71.88 ▂▃▅▇▁
croppedDecimalLongitude 6 2 0 1 -75.55 1.72 -79.74 -76.69 -75.21 -74.15 -71.88 ▂▃▆▇▁
croppedDecimalLongitude 13 1 0 1 137.82 4.33 122.99 134.38 138.88 141.02 145.84 ▁▂▃▇▅
croppedDecimalLongitude 13 2 0 1 137.74 4.42 122.99 134.23 138.88 140.88 145.84 ▁▃▃▇▃
croppedDecimalLongitude 26 1 0 1 14.02 12.01 -31.19 5.59 15.36 23.64 41.96 ▁▂▅▇▂
croppedDecimalLongitude 26 2 0 1 14.29 12.16 -31.19 5.61 15.55 24.00 41.96 ▁▂▅▇▂
croppedDecimalLatitude 5 1 0 1 49.73 0.56 48.64 49.25 49.75 50.15 51.02 ▅▇▇▅▂
croppedDecimalLatitude 5 2 0 1 49.73 0.56 48.64 49.25 49.75 50.19 51.02 ▅▇▇▅▂
croppedDecimalLatitude 6 1 0 1 42.88 0.99 40.51 42.23 42.80 43.51 45.01 ▂▅▇▅▃
croppedDecimalLatitude 6 2 0 1 42.89 0.97 40.51 42.24 42.81 43.51 45.01 ▂▅▇▅▃
croppedDecimalLatitude 13 1 0 1 37.45 4.06 24.30 34.66 36.42 40.81 45.40 ▁▁▇▃▃
croppedDecimalLatitude 13 2 0 1 37.35 4.12 24.30 34.58 36.42 40.75 45.40 ▁▁▇▃▅
croppedDecimalLatitude 26 1 0 1 51.06 8.25 28.34 44.89 50.07 56.60 80.27 ▁▇▇▃▁
croppedDecimalLatitude 26 2 0 1 50.90 8.20 28.34 44.70 49.87 56.32 80.27 ▁▇▇▃▁
northSouthLength 5 1 0 1 20.36 26.05 11.12 11.12 11.12 22.25 289.19 ▇▁▁▁▁
northSouthLength 5 2 0 1 20.20 25.69 11.12 11.12 11.12 22.25 289.19 ▇▁▁▁▁
northSouthLength 6 1 0 1 9.78 17.62 5.00 5.05 5.12 10.11 509.30 ▇▁▁▁▁
northSouthLength 6 2 0 1 9.67 17.28 5.00 5.05 5.12 10.11 509.30 ▇▁▁▁▁
northSouthLength 13 1 0 1 60.10 164.39 18.46 18.49 18.52 37.03 2403.75 ▇▁▁▁▁
northSouthLength 13 2 0 1 58.67 157.37 18.46 18.49 18.52 37.03 2403.75 ▇▁▁▁▁
northSouthLength 26 1 0 1 109.52 259.90 50.16 50.74 51.43 101.61 6056.01 ▇▁▁▁▁
northSouthLength 26 2 0 1 106.63 250.62 50.16 50.73 51.40 101.51 6056.01 ▇▁▁▁▁
eastWestLength 5 1 0 1 22.79 35.43 11.70 11.97 12.15 24.05 517.14 ▇▁▁▁▁
eastWestLength 5 2 0 1 22.61 34.89 11.70 11.97 12.15 24.05 517.14 ▇▁▁▁▁
eastWestLength 6 1 0 1 10.03 20.55 5.01 5.05 5.12 10.12 654.17 ▇▁▁▁▁
eastWestLength 6 2 0 1 9.90 20.15 5.01 5.05 5.12 10.12 654.17 ▇▁▁▁▁
eastWestLength 13 1 0 1 65.95 167.92 19.60 22.30 23.28 46.10 2363.01 ▇▁▁▁▁
eastWestLength 13 2 0 1 64.83 161.53 19.60 22.25 23.36 46.19 2363.01 ▇▁▁▁▁
eastWestLength 26 1 0 1 114.60 337.24 32.26 50.84 51.63 102.42 9604.23 ▇▁▁▁▁
eastWestLength 26 2 0 1 111.60 324.81 32.26 50.82 51.59 102.30 9604.23 ▇▁▁▁▁
maxLength 5 1 0 1 30.11 39.79 16.14 16.33 16.46 32.72 512.06 ▇▁▁▁▁
maxLength 5 2 0 1 29.88 39.24 16.14 16.33 16.46 32.72 512.06 ▇▁▁▁▁
maxLength 6 1 0 1 13.77 24.32 7.06 7.07 7.07 14.15 659.64 ▇▁▁▁▁
maxLength 6 2 0 1 13.60 23.88 7.06 7.07 7.07 14.15 659.64 ▇▁▁▁▁
maxLength 13 1 0 1 87.35 216.25 26.94 28.99 29.81 59.10 3041.50 ▇▁▁▁▁
maxLength 13 2 0 1 85.70 207.63 26.94 28.99 29.88 59.24 3041.50 ▇▁▁▁▁
maxLength 26 1 0 1 149.97 313.08 59.51 70.73 70.74 141.46 7056.48 ▇▁▁▁▁
maxLength 26 2 0 1 146.30 302.10 59.51 70.73 70.74 141.46 7056.48 ▇▁▁▁▁
croppedNorthSouthLength 5 1 0 1 19.66 25.10 3.15 11.12 11.12 22.24 278.50 ▇▁▁▁▁
croppedNorthSouthLength 5 2 0 1 19.50 24.76 3.15 11.12 11.12 22.24 278.50 ▇▁▁▁▁
croppedNorthSouthLength 6 1 0 1 9.63 17.40 0.18 5.05 5.10 10.10 502.08 ▇▁▁▁▁
croppedNorthSouthLength 6 2 0 1 9.52 17.07 0.18 5.05 5.10 10.09 502.08 ▇▁▁▁▁
croppedNorthSouthLength 13 1 0 1 58.62 163.09 0.72 18.49 18.52 37.03 2383.21 ▇▁▁▁▁
croppedNorthSouthLength 13 2 0 1 57.20 156.14 0.72 18.49 18.52 37.02 2383.21 ▇▁▁▁▁
croppedNorthSouthLength 26 1 0 1 106.44 258.76 0.59 50.51 51.29 101.06 6034.16 ▇▁▁▁▁
croppedNorthSouthLength 26 2 0 1 103.55 249.53 0.59 50.50 51.27 100.54 6034.16 ▇▁▁▁▁
croppedEastWestLength 5 1 0 1 22.30 34.55 4.62 11.97 12.12 23.95 499.54 ▇▁▁▁▁
croppedEastWestLength 5 2 0 1 22.12 34.03 4.62 11.97 12.12 23.95 499.54 ▇▁▁▁▁
croppedEastWestLength 6 1 0 1 9.92 20.45 0.06 5.05 5.11 10.11 650.95 ▇▁▁▁▁
croppedEastWestLength 6 2 0 1 9.78 20.05 0.06 5.05 5.11 10.10 650.95 ▇▁▁▁▁
croppedEastWestLength 13 1 0 1 63.50 166.17 0.40 21.81 23.14 45.83 2343.58 ▇▁▁▁▁
croppedEastWestLength 13 2 0 1 62.36 159.79 0.40 21.76 23.14 45.83 2343.58 ▇▁▁▁▁
croppedEastWestLength 26 1 0 1 110.17 333.37 0.70 50.65 51.51 101.93 9544.56 ▇▁▁▁▁
croppedEastWestLength 26 2 0 1 107.22 321.03 0.70 50.64 51.48 101.79 9544.56 ▇▁▁▁▁
croppedMaxLength 5 1 0 1 29.17 38.38 5.54 16.33 16.44 32.58 492.74 ▇▁▁▁▁
croppedMaxLength 5 2 0 1 28.94 37.84 5.54 16.32 16.44 32.58 492.74 ▇▁▁▁▁
croppedMaxLength 6 1 0 1 13.61 24.16 0.32 7.07 7.07 14.15 655.19 ▇▁▁▁▁
croppedMaxLength 6 2 0 1 13.44 23.72 0.32 7.07 7.07 14.15 655.19 ▇▁▁▁▁
croppedMaxLength 13 1 0 1 83.93 213.23 1.47 28.39 29.64 58.67 2999.27 ▇▁▁▁▁
croppedMaxLength 13 2 0 1 82.28 204.70 1.47 28.43 29.67 58.67 2999.27 ▇▁▁▁▁
croppedMaxLength 26 1 0 1 144.00 309.76 0.80 70.73 70.74 141.46 7027.49 ▇▁▁▁▁
croppedMaxLength 26 2 0 1 140.42 298.86 0.80 70.73 70.74 141.46 7027.49 ▇▁▁▁▁
startYear 5 1 0 1 1985.00 0.00 1985.00 1985.00 1985.00 1985.00 1985.00 ▁▁▇▁▁
startYear 5 2 0 1 2001.00 0.00 2001.00 2001.00 2001.00 2001.00 2001.00 ▁▁▇▁▁
startYear 6 1 0 1 1980.00 0.00 1980.00 1980.00 1980.00 1980.00 1980.00 ▁▁▇▁▁
startYear 6 2 0 1 2000.00 0.00 2000.00 2000.00 2000.00 2000.00 2000.00 ▁▁▇▁▁
startYear 13 1 0 1 1974.00 0.00 1974.00 1974.00 1974.00 1974.00 1974.00 ▁▁▇▁▁
startYear 13 2 0 1 1997.00 0.00 1997.00 1997.00 1997.00 1997.00 1997.00 ▁▁▇▁▁
startYear 26 1 0 1 1972.00 0.00 1972.00 1972.00 1972.00 1972.00 1972.00 ▁▁▇▁▁
startYear 26 2 0 1 2013.00 0.00 2013.00 2013.00 2013.00 2013.00 2013.00 ▁▁▇▁▁
endYear 5 1 0 1 1989.00 0.00 1989.00 1989.00 1989.00 1989.00 1989.00 ▁▁▇▁▁
endYear 5 2 0 1 2003.00 0.00 2003.00 2003.00 2003.00 2003.00 2003.00 ▁▁▇▁▁
endYear 6 1 0 1 1985.00 0.00 1985.00 1985.00 1985.00 1985.00 1985.00 ▁▁▇▁▁
endYear 6 2 0 1 2005.00 0.00 2005.00 2005.00 2005.00 2005.00 2005.00 ▁▁▇▁▁
endYear 13 1 0 1 1978.00 0.00 1978.00 1978.00 1978.00 1978.00 1978.00 ▁▁▇▁▁
endYear 13 2 0 1 2002.00 0.00 2002.00 2002.00 2002.00 2002.00 2002.00 ▁▁▇▁▁
endYear 26 1 0 1 1995.00 0.00 1995.00 1995.00 1995.00 1995.00 1995.00 ▁▁▇▁▁
endYear 26 2 0 1 2017.00 0.00 2017.00 2017.00 2017.00 2017.00 2017.00 ▁▁▇▁▁
time_span 5 1 0 1 4.00 0.00 4.00 4.00 4.00 4.00 4.00 ▁▁▇▁▁
time_span 5 2 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
time_span 6 1 0 1 5.00 0.00 5.00 5.00 5.00 5.00 5.00 ▁▁▇▁▁
time_span 6 2 0 1 5.00 0.00 5.00 5.00 5.00 5.00 5.00 ▁▁▇▁▁
time_span 13 1 0 1 4.00 0.00 4.00 4.00 4.00 4.00 4.00 ▁▁▇▁▁
time_span 13 2 0 1 5.00 0.00 5.00 5.00 5.00 5.00 5.00 ▁▁▇▁▁
time_span 26 1 0 1 23.00 0.00 23.00 23.00 23.00 23.00 23.00 ▁▁▇▁▁
time_span 26 2 0 1 4.00 0.00 4.00 4.00 4.00 4.00 4.00 ▁▁▇▁▁
cell_sampling_repeats 5 1 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
cell_sampling_repeats 5 2 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
cell_sampling_repeats 6 1 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
cell_sampling_repeats 6 2 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
cell_sampling_repeats 13 1 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
cell_sampling_repeats 13 2 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
cell_sampling_repeats 26 1 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
cell_sampling_repeats 26 2 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
cells_keep 5 1 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
cells_keep 5 2 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
cells_keep 6 1 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
cells_keep 6 2 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
cells_keep 13 1 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
cells_keep 13 2 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
cells_keep 26 1 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
cells_keep 26 2 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
sp_remove_expert 5 1 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
sp_remove_expert 5 2 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
sp_remove_expert 6 1 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
sp_remove_expert 6 2 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
sp_remove_expert 13 1 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
sp_remove_expert 13 2 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
sp_remove_expert 26 1 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
sp_remove_expert 26 2 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
introduced 5 1 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
introduced 5 2 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
introduced 6 1 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
introduced 6 2 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
introduced 13 1 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
introduced 13 2 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
introduced 26 1 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
introduced 26 2 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ▁▁▇▁▁
sp_sampling_repeats 5 1 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
sp_sampling_repeats 5 2 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
sp_sampling_repeats 6 1 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
sp_sampling_repeats 6 2 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
sp_sampling_repeats 13 1 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
sp_sampling_repeats 13 2 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
sp_sampling_repeats 26 1 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
sp_sampling_repeats 26 2 0 1 2.00 0.00 2.00 2.00 2.00 2.00 2.00 ▁▁▇▁▁
species_keep 5 1 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
species_keep 5 2 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
species_keep 6 1 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
species_keep 6 2 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
species_keep 13 1 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
species_keep 13 2 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
species_keep 26 1 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
species_keep 26 2 0 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁

Save data to .rds

Code
saveRDS(data_sf2, here::here("Data", "output", "1_data_sf.rds"))
saveRDS(data_filt, here::here("Data", "output", "1_data_filtered.rds"))
Code
tictoc::toc()
161.14 sec elapsed