The R package
The eco R package reads the warehouse from R with no account or token. Every table on Redivis is served as CSV to anyone, within Redivis’ 100 MB cap on anonymous requests. Most eco tables are far under it; the few that are not need a free Redivis login (see Large tables).
remotes::install_github("ben-domingue/eco", subdir = "Rpkg")
library(eco)Thirty seconds
eco_list_tables() # what is there
eco_filter(model_family = "occupancy", min_units = 30)
eco_info("schank_2015_tapir_occ") # dims, family, licence, citation
umf <- eco_filter(model_family = "Single-season occupancy") |>
head(1) |> eco_fetch() |> eco_to_unmarked()
unmarked::occu(~1 ~1, umf)eco_fetch() of one table returns a data.frame in the format described on the standard page; of several (a filter result or a character vector) a named list. The side tables come from eco_taxa(), eco_periods(), eco_units() and eco_traps().
Functions
eco_list_tables(), eco_list_deposits(), eco_metadata(), eco_biblio(), eco_tags(), eco_tag_options() |
the corpus and its descriptions, from the eco_meta dataset; eco_list_deposits() is one row per source deposit with the tables built from it |
eco_filter(model_family=, response_type=, taxon_group=, protocol=, min_units=, min_occasions=, multi_species=, sample_floor=, licence=) |
choose tables; licence = "permissive" keeps tables open to commercial use (Using eco responsibly) |
eco_fetch(x); eco_taxa(), eco_periods(), eco_units(), eco_traps() |
a table and its side tables |
eco_info(table) |
one table, or the corpus totals |
eco_to_array(), eco_to_unmarked(), eco_to_ch() and the inverses array_to_eco(), umf_to_eco(), mpois_to_eco(), ch_to_eco() |
reshape to and from unmarked frames, arrays and capture histories |
eco_check(df) |
the R twin of the validator, for a table you built |
eco_to_irw(df) |
the IRW v1.0 view (id, item, resp, cov_*) |
eco_cite(tables, format = "text"/"bibtex", file=) |
cite the original deposits and papers, and eco (see How to cite); eco_save_bibtex(tables, file) is the BibTeX shortcut |
eco_version(), eco_set_version(n), eco_reset_version(), eco_manifest() |
pin a release |
eco_cache_dir(), eco_cache_info(), eco_clear_cache() |
the disk cache under tools::R_user_dir("eco", "cache") |
Versions
Redivis versions each dataset separately (the core tables are split across the shards eco, eco_2, …, because Redivis caps a dataset at 1000 entries, side tables included; then eco_meta); the release manifest pairs them into numbered eco versions. By default the package reads the current release of each (now eco v27: Redivis eco v8.0, eco_2 v5.0, eco_3 v1.0, eco_meta v24.0). eco_set_version(1) pins all of them to what eco version 1 consisted of, so a script reproduces what it read then. Tables the pipeline has built but Redivis has not yet released are not offered by eco_filter(); they are listed in attr(eco_metadata(), "unreleased").
How to cite
Every eco table rests on fieldwork by the people who deposited it. Cite the original deposit, and its paper, for every table you use, and eco as well. A paper that cites only eco gives the credit for the data to the warehouse.
tabs <- eco_filter(taxon_group = "Amphibians", min_units = 30)
eco_cite(tabs) # a reference list
eco_cite(tabs, "bibtex", file = "eco_sources.bib")eco_cite() gives one entry per source deposit and one per paper, not one per table: tables built from the same deposit share an entry. BibTeX keys are stable (the deposit’s first table name, and <that>_paper for the paper), so re-running it does not break a manuscript. The last entry is eco at the version you read (eco_version(), which you should also state). For a paper that uses many tables, put the file in a supplement and cite it from the methods. The first eco_fetch() in a session prints a one-line reminder; options(eco.cite_reminder = FALSE) silences it.
From Python, without the package, the same columns are in the biblio table of eco_meta:
import pandas as pd
ua = {"User-Agent": "eco-python (https://github.com/ben-domingue/eco)"}
b = pd.read_csv("https://redivis.com/api/v1/tables/datapages.eco_meta.biblio/rows?format=csv",
storage_options=ua)
used = b[b.table.isin(["kery_2008_willowtit_occ", "schank_2015_tapir_occ"])]
refs = sorted(set(used.citation) | set(used.reference.dropna())) # deposits and papersThis is per table, so it can list a deposit twice (with and without its DOI, say) and bibtex is keyed by table; eco_cite() in R is the one that removes duplicates.
Large tables
A few tables are bigger than the 100 MB Redivis serves without a login: eco_list_tables() marks them needs_login, and eco_info() says so. For those eco_fetch() uses the redivis client. That needs a free Redivis account and two more packages, once:
install.packages(c("redivis", "arrow"))
redivis::redivis$authenticate() # opens a browser; or set REDIVIS_API_TOKEN
eco_fetch("rooney_2025_snapshotusa_comm")The download counts against the account’s Redivis export quota and is cached like any other table, so it happens once per version. Without a login eco_fetch() stops and says what to do; it never opens a browser by itself.
Offline
schank_2015_tapir_occ (22 cameras, 72 days, one Endangered tapir with coarsened coordinates, 1,008 rows) ships with the package so the converters can be tried without a network:
eco_to_unmarked(schank_2015_tapir_occ) |> unmarked::occu(~1 ~1, data = _)Source: Rpkg/.