Description Usage Arguments Details Value References See Also Examples
View source: R/BotanizeR_collect.R
Collects information from FloraWeb
(images, map and species descriptions) and/or the Online Atlas of the British Irish flora as well as from user
defined image folders and columns in the species_list
data.frame to show
them as hints in BotanizeR_quiz()
or the BotanizeR Shiny app.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
species_row |
a data.frame of one row including the species for which
information shall be retrieved (Usually an entry of the |
image_floraweb |
logical that defines if images from FloraWeb shall be retrieved. |
hints_floraweb |
character vector defining the hints to retrieve from FloraWeb. 'hints_floraweb' must be either NULL or a character string with the wanted hints from c('map', 'description', 'status', 'habitat', 'family', 'German name'). |
image_ukplantatlas |
logical that defines if images from the Online Atlas of the British and Irish flora shall be retrieved. |
hints_ukplantatlas |
character vector defining the hints to retrieve from the Online Atlas of the British and Irish flora. 'hints_ukplantatlas' must be either NULL or a character string with the wanted hints from c('mapuk', 'familyuk', 'ecology', 'statusuk', 'trends', 'perennation', 'lifeform', 'woodiness', 'clonality'). |
imagelinks_custom |
character vector defining columns of |
image_folders |
character vector defining folders from which to retrieve images. Image file names need to contain the species names to be found. |
hints_custom |
character vector defining custom hints to use.
Note: In that case, these hints should be stored in |
file_location |
character vector defining a location to temporarily store the images retrieved from online resources. If put to "temporary", R will create a temporary folder automatically. |
only_links |
logical, if |
image_required |
logical indicating whether additional hints shall only
be retrieved if at least one image for the given species is available. Set
to |
image_width |
numeric defining to what width of the images shall be
rescaled in case |
This function provides the information shown in
BotanizeR_quiz()
and the BotanizeR Shiny app. Have a look into
the BotanizeR tutorials
on how to use the quiz and the shiny app to learn more about its usage.
list of named elements including (for the selected species) the hints as characters and images and maps either as link or image or spatial object.
1 2 3 4 |
BotanizeR_quiz()
and BotanizeR_shiny()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | # Load species list for Britain and Germany with species and IDs from
# https://www.floraweb.de and https://www.brc.ac.uk/plantatlas/
data(BotanizeR_species)
# Select Acer campestre
species_row = BotanizeR_species[which(BotanizeR_species$SPECIES ==
"Acer campestre"),]
# only ukplantatlas image(s) + hints + map
hints <- BotanizeR_collect(species_row, image_ukplantatlas = TRUE,
hints_ukplantatlas = c("mapuk", "familyuk",
"ecology", "statusuk",
"trends", "perennation",
"lifeform", "woodiness",
"clonality"))
par(mar = rep(0.5, 4), oma = rep(0, 4))
plot(hints$image[[1]], axes = FALSE)
plot(hints$image[[2]], axes = FALSE)
plot(hints$mapuk)
hints$statusuk
hints$clonality
# only floraweb image(s) + hints + map
hints <- BotanizeR_collect(species_row, image_floraweb = TRUE,
hints_floraweb = c("map", "description",
"status", "habitat",
"family", "German name"))
## Not run:
par(oma = c(0, 0, 0, 10.5))
plot(hints$map[[1]], pal = hints$map[[2]], key.pos = 4, main = "")
## End(Not run)
plot(hints$image[[1]], axes = FALSE)
hints$family
# only images from custom image links + custom hints
hints <- BotanizeR_collect(species_row, image_floraweb = FALSE,
hints_custom = c("ownhint_English_name",
"ownhint_Description",
"ownhint_Distribution"),
imagelinks_custom = c("imagelink_1",
"imagelink_2"))
plot(hints$image[[1]], axes = FALSE)
plot(hints$image[[2]], axes = FALSE)
hints$ownhint_English_name
# only returning image links instead of actual images
hints <- BotanizeR_collect(species_row, image_floraweb = TRUE,
image_ukplantatlas = TRUE,
imagelinks_custom = c("imagelink_1",
"imagelink_2"),
hints_ukplantatlas = c("mapuk", "familyuk"),
only_links = TRUE)
hints
# retrieving nothing
BotanizeR_collect(species_row)
# To load images from your local computer, specify an image folder with
# pictures included. File names need to include the species names.
## Not run:
hints <- BotanizeR_collect(species_row,
image_folders = c("images/Asteraceae_Britain",
"images/Trees"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.