knitr::opts_chunk$set( comment = "#>", tidy = FALSE, error = FALSE, fig.width = 8, fig.height = 8)
The eidith package downloads data from the EIDITH database to a local database stored on your machine. Default calls to the ed_get()
or ed_db_download()
will automatically process the data in several ways after it is downloaded to your local database.
Importantly, the R package does not change any data in the main EIDITH database, it only processes the downloaded data in your local database.
The main automatic processing steps are:
camelCase
to snake_case
to make it easy to distinguish between raw and cleaned data. _id
variables are numeric primary keys, other identifiers now go by _id_name
. _id_name
-type columns that are very similar except for a small set of cases, we drop all but one for ease of use. These can be retrieved from raw data if needed. specimen_type
) to a standard set of categoriesFor column name details, including descriptions of fields (when available), the command ?ed_metadata
will open a datatable that contains details about how each field name was processed, renamed, or dropped.
The eidith R package automatic processing steps do not permanently alter or delete any upstream data.
If you want to access raw EIDITH data from the web API directly (for instance, if you want
to compare differences between raw data and the automatically-cleaned version
ed_db_download()
creates), you can use the ed_get()
functions, such as get_ed_events()
, with the postprocess = FALSE
option:
For events:
ed_get_events(postprocess=FALSE)
For animals:
ed_get_animals(postprocess=FALSE)
And so on. These raw data tables can be saved in your R environment and can be compared to the eidith R package tables -- simply use ed_metadata()
to load the metadata table, or from within RStudio use ?ed_metadata
to open a searchable datatable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.