get_species_data: get_species_data

Description Usage Arguments Value Examples

Description

The function get_species_data draws species occurrence data from GBIF. get_species_data takes in a species name (a vector containing genus and species name) and returns a dataframe containing presence data (including longitudes and latitudes) for the specified species drawn from GBIF.

Usage

1
get_species_data(species_name)

Arguments

species_name

a vector containing genus and species name

Value

a dataframe of presence data for the specified species

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# example: plot mosquito species presence data

mosquito_presence <- get_species_data(c("aedes", "aegypti"))
mosquito_location <- mosquito_presence[, c("lon", "lat")]

# install.packages("maptools")
library(maptools)
data(wrld_simpl)
plot(wrld_simpl)
points(mosquito_location, col='blue', cex=0.5)
title("Aedes Aegypti Observations")

elaineliu5/DVM documentation built on May 16, 2019, 2:57 a.m.