knitr::opts_chunk$set(
  comment = "#>",
  tidy = FALSE,
  error = FALSE,
  fig.width = 8,
  fig.height = 8)

The eidith R package provides programmatic access and analytical tools for data from the PREDICT Program, housed at the Emerging Infectious Disease Information Technology Hub (EIDITH).

The eidith package contains no data. To access data, you must be a registered EIDITH user with data access privileges. If you have a question about your access level, contact technology@eidith.org.

If you have questions, bug reports, or feature requests, please post them on our issue tracker.

Installation

eidith is installed from our own package repository rather than CRAN. To install the latest stable version, run the following command:

source("https://install-github.me/ecohealthalliance/eidith")

If you wish to install the latest development (unstable) version, you will require the devtools package, like so:

devtools::install_github('ecohealthalliance/eidith@dev')

Authentication

To download data from EIDITH, you must provide logon credentials. If you run ed_db_download(), ed_get(), or ed2_get() functions from the R console, your EIDITH username and password will be requested. To use these functions in scripts, you must provide these credentials as environment variables.

You can cache your credentials and login automatically by putting them in a hidden .Renviron file, which defines environment variables for your R session. For more information see the ed_auth() help file.

Downloading data

The eidith package downloads data from EIDITH and stores it locally on your computer in a database so you don't have to download from the web repeatedly. Once you've installed the package, you'll need to populated this database with the ed_db_download() command, like so:

library(eidith)
ed_db_download()

This may take a few minutes to complete depending on the speed of your internet connection.

Loading data

Once you've populated your local database, you can look up EIDITH data with the table functions, each of which loads data from the different table in the PREDICT-1 or PREDICT-2 database: ed_events(), ed_animals(), ed_specimens(), ed2_events(), ed2_animals() and so on. See the help for these functions for more details.

ed_metadata() and ed2_metadata() contain lists of all variables across these tables and some information on them. If you lookup this in R help in RStudio with ?ed_metadata or ?ed2_metadata you'll find this metadata in searchable form.



ecohealthalliance/eidith documentation built on Aug. 30, 2022, 7:45 a.m.