Description Usage Arguments Details Examples
This function appends a data.frame
created by parse_ebird
to an existing SQLite database.
1 2 | store_ebird(df, file = NULL, db = "../Data/SE_eBird.sqlite",
table_name = "SE_eBird_Aug2015")
|
df |
a |
file |
character string of the file path to the tab-delimited eBird .txt file; if
specified, |
db |
character string containing the file path to the appropriate SQLite database |
table_name |
character string specifying a DBMS table name |
This requires an existing SQLite database that is ready to receive the output of
parse_ebird
. See example below for how the local database was set up
for southeast refuges.
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 | ## Not run:
# Set up eBird SQLite database
library(sqldf)
db <- dbConnect(SQLite(), dbname="./Data/SE_eBird.sqlite")
dbSendQuery(conn = db,
"CREATE TABLE SE_eBird_Aug2015
(id TEXT,
tax_order REAL,
category TEXT,
common_name TEXT,
sci_name TEXT,
count INTEGER,
county TEXT,
lat REAL,
lon REAL,
date INTEGER,
checklist TEXT,
all_spp INTEGER)")
ga_birds <- parse_ebird("./Data/ebd_US-GA_relAug-2015.txt")
store_ebird(ga_birds)
# Close connection
dbDisconnect(db)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.