Skip to content

eLTER sites managers often want to create figure of the site boundaries. These R functions allow to create this based on the geographic boundaries entered in DEIMS-SDR as a polygon. The figure is created with Open Street Map (OSM) base map, site boundaries, and title of the site, a resolution of 400px and an PNG extension suitable for both websi…

Notifications You must be signed in to change notification settings

oggioniale/eLTER-SiteFigure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

eLTER_siteFigure function

eLTER sites managers often want to create figure of the site boundaries.

These R functions allow to create this based on the geographic boundaries entered in DEIMS-SDR as a polygon.

The figure is created with a base map Open Street Map (OSM) (© OpenStreetMap contributors), site boundaries, and title of the site, a resolution of 400px and an PNG extension suitable for both website and publication.

Prerequisites:

In this case some packages must by installed:

jsonlite

install.packages('jsonlite')

More information in jsonlite wiebsite

Ooms J (2014). “The jsonlite Package: A Practical and Consistent Mapping Between JSON Data and R Objects.” arXiv:1403.2805 [stat.CO]. arXiv:1403.2805

sf

install.packages("sf")

More information in sf wiebsite

Pebesma, E., 2018. Simple Features for R: Standardized Support for Spatial Vector Data. The R Journal 10 (1), 439-446, DOI:10.32614/RJ-2018-009

rosm

install.packages("rosm")

More information in rosm wiebsite

raster

library(devtools)
install_github("rspatial/raster")

More information in raster wiebsite

tmap

install.packages("tmap")

More information in sf wiebsite

Tennekes, M., 2018, tmap: Thematic Maps in R, Journal of Statistical Software, 84(6), 1-39, DOI:10.18637/jss.v084.i06

Using:

For all eLTER sites the function

sitesNetwork <- getNetworkSites(networkID = 'https://deims.org/api/sites?network=7fef6b73-e5cb-4cd2-b438-ed32eb1504b3')
sitesNetwork <- (sitesNetwork[!grepl('^IT', sitesNetwork$title),])
fProduceMapOfSiteFromDEIMS(
  deimsid = 'https://deims.org/1c9f9148-e8dc-4b67-ac13-ce387c5a6a2f',
  countryCode = 'ITA',
  listOfSites = sitesNetwork,
  gridNx = 0.7,
  gridNy = 0.35,
  width = 0.25,
  height = 0.25,
  siteName = 'Lago Maggiore',
  bboxXMax = 0,
  bboxXMin = 0,
  bboxYMin = 0,
  bboxYMax = 0
)

is accompanied by a evaluation of the country and the figure presents a inset map with relative position of the site in the country:

Image of LTER_EU_IT_045 Lake Maggiore

Meta

About

eLTER sites managers often want to create figure of the site boundaries. These R functions allow to create this based on the geographic boundaries entered in DEIMS-SDR as a polygon. The figure is created with Open Street Map (OSM) base map, site boundaries, and title of the site, a resolution of 400px and an PNG extension suitable for both websi…

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages