Copy to clipboard
! Ecoengine maps and photo galleries
Derived from http://ropensci.org/blog/2014/01/30/ecoengine/
{maketoc title="" levels="2"}
!! Installation
{RR(cacheby="pagename", echo="TRUE", ln="1", caption="R Code", loadandsave="1", wikisyntax="0")}
if(!require(ecoengine)){ install.packages("ecoengine", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") }
require(ecoengine)
# A small bug with factors (to be resolved in a couple of days in 1.1.2) requires strings as factors to be FALSE
options(stringsAsFactors = FALSE)
# You can also install a development version of the package that has additional features (more below), with several new updates that will appear on the next CRAN version (ETA mid-March). To install the development version:
#library(devtools)
#install_github("ropensci/ecoengine")
#library(ecoengine)
{RR}
!! Observation data
{RR(cacheby="pagename", echo="TRUE", ln="1", caption="R Code", loadandsave="1", wikisyntax="0")}
require(ecoengine)
options(stringsAsFactors = FALSE)
# Observation data
lynx_data <- ee_observations(genus = "lynx", progress = FALSE, page = "all",
georeferenced = TRUE)
output <- capture.output(ee_map(lynx_data, dest=getwd() ) )
# The html file with the map will be "Ecoengine_species_map/Ecoengine_species_map.html" inside the "destination" ("dest") folder indicate in the line above
{RR}
{iframe name="myChart" width="850" height="500" align="middle" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto" src="temp/cache/{{domainslash_if_multitiki}}R_{{page}}/Ecoengine_species_map/Ecoengine_species_map.html"}
!! Photo data
{RR(cacheby="pagename", echo="TRUE", ln="1", caption="R Code", loadandsave="1", wikisyntax="0")}
require(ecoengine)
options(stringsAsFactors = FALSE)
# Photo data
# -----------
# The ecoengine also contains a large number of photos from various sources. It's easy to query the photo database using similar arguments as above. One can search by taxa, location, source, collection and much more. To get all pictures of the California condor from the database:
condor <- ee_photos(scientific_name = "Gymnogyps californianus", quiet = TRUE, progress = FALSE)
# The package also provides functionality to quickly browse photos in the default browser. By calling view_photos() on any ecoengine object of type photos, R will render a static html page with thumbnails and metadata and launch a default browser with additional links.
view_photos(ee_photos(scientific_name = "Gymnogyps californianus", quiet = TRUE), output = paste(getwd(), "/ecoengine_pics.html", sep=""), browse=FALSE)
{RR}
{iframe name="myChart" width="850" height="2400" align="middle" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto" src="temp/cache/{{domainslash_if_multitiki}}R_{{page}}/ecoengine_pics.html"}