| Title: | Easily Download 'EconDataverse' Datasets |
| Version: | 0.1.0 |
| Description: | The 'EconDataverse' is a universe of open-source packages to work seamlessly with economic data. This package is designed to make it easy to download selected datasets that are preprocessed by 'EconDataverse' packages and publicly hosted on 'Hugging Face'. Learn more about the 'EconDataverse' at https://www.econdataverse.org. |
| License: | MIT + file LICENSE |
| Depends: | R (≥ 4.1) |
| Imports: | arrow, cli, httr2, jsonlite |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| URL: | https://tidy-intelligence.github.io/r-econdatasets/, https://github.com/tidy-intelligence/r-econdatasets |
| BugReports: | https://github.com/tidy-intelligence/r-econdatasets/issues |
| NeedsCompilation: | no |
| Packaged: | 2025-11-17 21:55:57 UTC; krise |
| Author: | Christoph Scheuch |
| Maintainer: | Christoph Scheuch <christoph@tidy-intelligence.com> |
| Repository: | CRAN |
| Date/Publication: | 2025-11-21 11:30:02 UTC |
econdatasets: Easily Download 'EconDataverse' Datasets
Description
The 'EconDataverse' is a universe of open-source packages to work seamlessly with economic data. This package is designed to make it easy to download selected datasets that are preprocessed by 'EconDataverse' packages and publicly hosted on 'Hugging Face'. Learn more about the 'EconDataverse' at https://www.econdataverse.org.
Author(s)
Maintainer: Christoph Scheuch christoph@tidy-intelligence.com (ORCID) [copyright holder]
See Also
Useful links:
Report bugs at https://github.com/tidy-intelligence/r-econdatasets/issues
Get a dataset from EconDataverse Hugging Face repositories
Description
Downloads and reads a Parquet file directly from the EconDataverse
Hugging Face datasets using the arrow package.
Usage
ed_get(dataset, table, columns = NULL, quiet = FALSE)
Arguments
dataset |
Character string naming the dataset repository
on Hugging Face (e.g., |
table |
Character string naming the table. |
columns |
Character vector naming the columns. Defaults to |
quiet |
Logical; suppress messages? Default: FALSE. |
Value
A data.frame containing the requested dataset, or NULL if
the download fails.
Examples
df <- ed_get("wbids", "counterparts")
head(df)
df <- ed_get(
"wbids",
"counterparts",
columns = c("counterpart_id", "counterpart_name"))
List available datasets in the EconDataverse organization
Description
Retrieves a list of all datasets published under the EconDataverse organization on Hugging Face.
Usage
ed_get_datasets(quiet = FALSE)
Arguments
quiet |
Logical; whether to suppress informational messages. Defaults to FALSE. |
Value
A data frame with columns:
- dataset
Dataset identifier on Hugging Face
- total_downloads
Approximate download count
- last_modified
Last update timestamp (UTC)
- is_private
Logical; whether the dataset is private
- is_gated
Logical; whether access is gated
Returns NULL if the request fails.
Examples
ed_get_datasets()
List Parquet tables for a specific EconDataverse dataset
Description
Queries the Hugging Face Hub and returns all .parquet files
under a given dataset repository in the
EconDataverse organization,
including file sizes.
Usage
ed_get_tables(dataset, quiet = FALSE)
Arguments
dataset |
Character; the dataset repository name (e.g., "wbids"). |
quiet |
Logical; suppress messages? Default: FALSE. |
Value
A data.frame with:
- table
Basename without the
.parquetextension- filename
Filename with extension
- path
Path within the repo
- size
File size
- url
Direct
resolve/mainURL to the Parquet file
Returns NULL if the request fails.
Examples
ed_get_tables("wbids")