Ecoengine maps and photo galleries

Derived from http://ropensci.org/blog/2014/01/30/ecoengine/(external link)


R Code
if(!require(ecoengine)){ install.packages("ecoengine", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") }

# 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:

Observation data

R Code
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

Photo data

R Code
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)

  |                                                                      |   0%
  |======================================================================| 100%