Set coverages
Sometimes EML documents may lack coverage information describing the temporal, geographic, or taxonomic coverage of a data set. This example shows how to create coverage information from scratch, or replace an existing coverage element with an updated one. You can view the current coverage (if it exists) by entering doc$dataset$coverage
into the console. Here the coverage, including temporal, taxonomic, and geographic coverages, is defined using set_coverage()
.
coverage <- EML::set_coverage(beginDate = '2012-01-01',
endDate = '2012-01-10',
sci_names = c('exampleGenus exampleSpecies1', 'exampleGenus ExampleSpecies2'),
geographicDescription = "The geographic region covers the lake region near Eagle Mountain, Alaska.",
west = -154.6192,
east = -154.5753,
north = 68.3831,
south = 68.3619)
doc$dataset$coverage <- coverage
Set multiple coverages
You can also set multiple geographic (or temporal) coverages. Here is an example of how you might set two geographic coverages. Note that we use nested eml
function helpers in this construction.
geocov1 <- eml$geographicCoverage(geographicDescription = "The geographich region covers area 1",
boundingCoordinates = eml$boundingCoordinates(
northBoundingCoordinate = 68,
eastBoundingCoordinate = -154,
southBoundingCoordinate = 67,
westBoundingCoordinate = -155))
geocov2 <- eml$geographicCoverage(geographicDescription = "The geographich region covers area 2",
boundingCoordinates = eml$boundingCoordinates(
northBoundingCoordinate = 65,
eastBoundingCoordinate = -151,
southBoundingCoordinate = 62,
westBoundingCoordinate = -153))
coverage <- EML::set_coverage(beginDate = '2012-01-01',
endDate = '2012-01-10',
sci_names = list('exampleGenus exampleSpecies1', 'exampleGenus ExampleSpecies2'))
doc$dataset$coverage$geographicCoverage <- list(geocov1, geocov2)
Special coverages
Arctic Circle
For arctic circle geographic coverage, we only have the starting vertical line of the circle shown in the projection. Here is an example with arctic circle geographic coverage.
Geologic dates
Example dataset with geologic coverages set using the following: