Skip to contents

Download survey location points for a region

Usage

dm_get_survey_locations(dataset_code, where = NULL)

Arguments

dataset_code

The DisMAP dataset code (e.g., "AI", "EBS", "GOA"), per dm_datasets$dataset_code

where

Optional SQL WHERE clause to filter results (e.g., "year = 2015")

Value

A sf object with survey locations

Examples

# Get survey locations for Northeast US Spring 2015
dataset_code <- "NEUS_SPR"
year <- 2015

# Get locations filtered by year
pts_yr <- dm_get_survey_locations(dataset_code, where = paste0("Year = ", year))
#> Registered S3 method overwritten by 'jsonify':
#>   method     from    
#>   print.json jsonlite
#> [working] (0 + 0) -> 1 -> 1 | ■■■■■■■■■■■■■■■■                  50%
#> [working] (0 + 0) -> 0 -> 2 | ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■  100%
head(pts_yr, 3)
#> Simple feature collection with 3 features and 21 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: 730348.8 ymin: 4497580 xmax: 730348.8 ymax: 4497580
#> Projected CRS: NAD83(2011) / UTM zone 18N
#> # A tibble: 3 × 22
#>   OBJECTID DatasetCode Region              Season SummaryProduct SampleID   Year
#>      <dbl> <chr>       <chr>               <chr>  <chr>          <chr>     <dbl>
#> 1   489555 NEUS_SPR    Northeast US Spring Spring Yes            201502 0…  2015
#> 2   489556 NEUS_SPR    Northeast US Spring Spring Yes            201502 0…  2015
#> 3   489557 NEUS_SPR    Northeast US Spring Spring Yes            201502 0…  2015
#> # ℹ 15 more variables: StdTime <dttm>, Species <chr>, WTCPUE <dbl>,
#> #   MapValue <dbl>, TransformUnit <chr>, CommonName <chr>,
#> #   SpeciesCommonName <chr>, CommonNameSpecies <chr>, CoreSpecies <chr>,
#> #   Stratum <chr>, StratumArea <dbl>, Latitude <dbl>, Longitude <dbl>,
#> #   Depth <dbl>, geometry <POINT [m]>