Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@
.DS_Store
.Rhistory
*.ipynb_checkpoints*
.idea
.idea
datasets/atn_satellite_telemetry/data/src/
datasets/atn_satellite_telemetry/data/dwc/*
!datasets/atn_satellite_telemetry/data/dwc/137491/
!datasets/atn_satellite_telemetry/data/dwc/137494/
!datasets/atn_satellite_telemetry/data/dwc/38553/
!datasets/atn_satellite_telemetry/data/dwc/atn_137491_spotted-seal_trajectory_20180418-20180526/
!datasets/atn_satellite_telemetry/data/dwc/atn_137494_ribbon-seal_trajectory_20140426-20140426/
!datasets/atn_satellite_telemetry/data/dwc/atn_38553_bearded-seal_trajectory_20110618-20120314/
datasets/atn_satellite_telemetry/.env
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ platform_id_tbl <- metadata %>% dplyr::filter(variable == "NC_GLOBAL") %>% dplyr
platform_id <- chartr(" ", "_", platform_id_tbl$value)
occurrencedf$organismID <- paste(platform_id , common_name, sep = "_")

# occurrenceID - {eventDate}_{depth}_{common_name}
# occurrenceID - ioos_atn_{eventDate}_{depth}_{common_name}
occurrencedf$occurrenceID <- sub(" ", "_", paste("ioos_atn", occurrencedf$eventDate, atn_tbl$z, common_name, sep = "_"))

# geodeticDatum
Expand Down Expand Up @@ -285,13 +285,17 @@ The next step below this, we filter out only the first observation of the hour.
occurrencedf <- occurrencedf %>% arrange(eventDate)

occurrencedf <- occurrencedf %>%

mutate(eventDateHrs = format(as.POSIXct(eventDate, format="%Y-%m-%dT%H:%M:%SZ"),"%Y-%m-%dT%H")
) %>%

add_count(eventDateHrs) %>%

mutate(dataGeneralizations = case_when(n == 1 ~ "",
TRUE ~ paste("first of ", n ,"records")
)
) %>%

select(-n)

occurrencedf
Expand Down Expand Up @@ -431,6 +435,7 @@ emof_data <- #var_names %>%
c("animal_length",
"animal_length_2",
"animal_weight") %>%

purrr::map_df(function(x) {
list(measurementValue = ncvar_get( nc, x),
measurementType = ncatt_get( nc, x)$long_name,
Expand All @@ -442,8 +447,11 @@ emof_data <- #var_names %>%


emofdf <- occurrencedf %>%

filter(basisOfRecord == 'HumanObservation') %>%

select(organismID, eventID, occurrenceID) %>%

cbind(emof_data)

str(emofdf)
Expand Down
2,637 changes: 2,637 additions & 0 deletions datasets/atn_satellite_telemetry/convert_ATNnc2DwC.ipynb

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eventID,occurrenceID,measurementValue,measurementType,measurementTypeID,measurementMethod,measurementUnit,measurementUnitID
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-04-18T04:45:00Z_0.0_spotted_seal,69.0,animal_weight: mass of the animal as measured or estimated at deployment,http://vocab.nerc.ac.uk/collection/MVB/current/MVB000019,69.0 (kg),kg,http://vocab.nerc.ac.uk/collection/P06/current/KGXX/
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-04-18T04:45:00Z_0.0_spotted_seal,129.0,animal_length: length of the animal as measured or estimated at deployment,http://vocab.nerc.ac.uk/collection/P01/current/TL01XX01/,129.0 (cm) standard length,cm,http://vocab.nerc.ac.uk/collection/P06/current/ULCM/
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-04-18T04:45:00Z_0.0_spotted_seal,16U2111,tag serial number,http://vocab.nerc.ac.uk/collection/MVB/current/MVB000189/,,,
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-04-18T04:45:00Z_0.0_spotted_seal,Wildlife Computers,tag manufacturer,http://vocab.nerc.ac.uk/collection/MVB/current/MVB000183/,,,
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-04-18T04:45:00Z_0.0_spotted_seal,SPOT,tag make and model,http://vocab.nerc.ac.uk/collection/MVB/current/MVB000185/,,,
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-04-18T04:45:00Z_0.0_spotted_seal,flipper,tag attachment location,http://vocab.nerc.ac.uk/collection/MVB/current/MVB000395/,,,

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eventID,occurrenceID,occurrenceStatus,basisOfRecord,organismID,eventDate,decimalLatitude,decimalLongitude,geodeticDatum,scientificName,scientificNameID,samplingProtocol,kingdom,taxonRank,lifeStage,sex,associatedReferences,coordinateUncertaintyInMeters,minimumDepthInMeters,maximumDepthInMeters,dataGeneralizations,bibliographicCitation,occurrenceRemarks
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-04-18T04:45:00Z_0.0_spotted_seal,present,HumanObservation,255021_spotted_seal,2018-04-18T04:45:00Z,63.6222,-165.0651,EPSG:4326,Phoca largha,urn:lsid:marinespecies.org:taxname:255021,satellite telemetry,Animalia,Species,adult,female,https://doi.org/10.25921/wp4e-ph20; https://www.ncei.noaa.gov/archive/accession/0305177; https://doi.org/10.24431/rw1k8er,0,0.0,0.0,,"London, Josh; Koslovsky, Stacie; Cameron, Michael; Boveng, Peter; Ziel, Heather. (2025). Spotted seal (Phoca largha) location data from a satellite telemetry tag (ptt id 137491) deployed in the Bering Sea from 2018-04-18 to 2018-05-26, deployment id 5ad6ce42efec72080c898c77. [Dataset]. US Integrated Ocean Observing System (IOOS) Animal Telemetry Network (ATN).",This is a representative occurrence from a full deployment. For the complete dataset please see https://www.ncei.noaa.gov/archive/accession/0305177.
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-04-18T06:09:20Z_0.0_spotted_seal,present,MachineObservation,255021_spotted_seal,2018-04-18T06:09:20Z,63.6399,-165.0595,EPSG:4326,Phoca largha,urn:lsid:marinespecies.org:taxname:255021,satellite telemetry,Animalia,Species,adult,female,https://doi.org/10.25921/wp4e-ph20; https://www.ncei.noaa.gov/archive/accession/0305177; https://doi.org/10.24431/rw1k8er,1500,0.0,0.0,first of 3 records for this hour.,"London, Josh; Koslovsky, Stacie; Cameron, Michael; Boveng, Peter; Ziel, Heather. (2025). Spotted seal (Phoca largha) location data from a satellite telemetry tag (ptt id 137491) deployed in the Bering Sea from 2018-04-18 to 2018-05-26, deployment id 5ad6ce42efec72080c898c77. [Dataset]. US Integrated Ocean Observing System (IOOS) Animal Telemetry Network (ATN).",This is a representative occurrence from a full deployment. For the complete dataset please see https://www.ncei.noaa.gov/archive/accession/0305177.
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-04-29T07:05:19Z_0.0_spotted_seal,present,MachineObservation,255021_spotted_seal,2018-04-29T07:05:19Z,60.0415,-164.4277,EPSG:4326,Phoca largha,urn:lsid:marinespecies.org:taxname:255021,satellite telemetry,Animalia,Species,adult,female,https://doi.org/10.25921/wp4e-ph20; https://www.ncei.noaa.gov/archive/accession/0305177; https://doi.org/10.24431/rw1k8er,1500,0.0,0.0,first of 4 records for this hour.,"London, Josh; Koslovsky, Stacie; Cameron, Michael; Boveng, Peter; Ziel, Heather. (2025). Spotted seal (Phoca largha) location data from a satellite telemetry tag (ptt id 137491) deployed in the Bering Sea from 2018-04-18 to 2018-05-26, deployment id 5ad6ce42efec72080c898c77. [Dataset]. US Integrated Ocean Observing System (IOOS) Animal Telemetry Network (ATN).",This is a representative occurrence from a full deployment. For the complete dataset please see https://www.ncei.noaa.gov/archive/accession/0305177.
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-05-13T20:07:00Z_0.0_spotted_seal,present,MachineObservation,255021_spotted_seal,2018-05-13T20:07:00Z,63.365,-164.0013,EPSG:4326,Phoca largha,urn:lsid:marinespecies.org:taxname:255021,satellite telemetry,Animalia,Species,adult,female,https://doi.org/10.25921/wp4e-ph20; https://www.ncei.noaa.gov/archive/accession/0305177; https://doi.org/10.24431/rw1k8er,10000,0.0,0.0,first of 3 records for this hour.,"London, Josh; Koslovsky, Stacie; Cameron, Michael; Boveng, Peter; Ziel, Heather. (2025). Spotted seal (Phoca largha) location data from a satellite telemetry tag (ptt id 137491) deployed in the Bering Sea from 2018-04-18 to 2018-05-26, deployment id 5ad6ce42efec72080c898c77. [Dataset]. US Integrated Ocean Observing System (IOOS) Animal Telemetry Network (ATN).",This is a representative occurrence from a full deployment. For the complete dataset please see https://www.ncei.noaa.gov/archive/accession/0305177.
atn_137491_spotted-seal_trajectory_20180418-20180526,ioos_atn_137491_2018-05-20T19:26:36Z_0.0_spotted_seal,present,MachineObservation,255021_spotted_seal,2018-05-20T19:26:36Z,64.6676,-161.5203,EPSG:4326,Phoca largha,urn:lsid:marinespecies.org:taxname:255021,satellite telemetry,Animalia,Species,adult,female,https://doi.org/10.25921/wp4e-ph20; https://www.ncei.noaa.gov/archive/accession/0305177; https://doi.org/10.24431/rw1k8er,10000,0.0,0.0,,"London, Josh; Koslovsky, Stacie; Cameron, Michael; Boveng, Peter; Ziel, Heather. (2025). Spotted seal (Phoca largha) location data from a satellite telemetry tag (ptt id 137491) deployed in the Bering Sea from 2018-04-18 to 2018-05-26, deployment id 5ad6ce42efec72080c898c77. [Dataset]. US Integrated Ocean Observing System (IOOS) Animal Telemetry Network (ATN).",This is a representative occurrence from a full deployment. For the complete dataset please see https://www.ncei.noaa.gov/archive/accession/0305177.
Loading