inspercidados gives you direct access to datasets from
Insper Cidades, hosted on Insper Dataverse.
Insper Cidades is a multidisciplinary research center at Insper, and the
datasets come from publications by its authors. The Cidados website features these
publications as data visualization narratives.
The package supports open and reproducible research in two ways.
open_project() takes you from a dataset to the code that
produced it.list_datasets() reads the registry from GitHub once per
session, so datasets added after a release appear without reinstalling.
Offline, it uses the copy shipped with the package. Set
options(inspercidados.registry = "bundled") to always use
that copy.
To search by alias, title, description, theme, region, or keywords,
use the search argument of
list_datasets().
Each registered dataset has a short alias. Some aliases contain
several logical resources. qualidade_ar_mare, for example,
holds its measurements and the coordinates of its measurement points as
separate resources. Each resource may come in several file formats or be
split by year. Use list_resources() to inspect the
resources of an alias without querying Dataverse.
Use get_dataset() to download a dataset by its alias.
The year, resource, and format
arguments narrow the download.
Some datasets are too large to load comfortably.
query_dataset() opens a parquet dataset as a lazy table:
DuckDB reads the file directly from Dataverse, and only the columns your
query uses are downloaded. Build the query with dplyr verbs and call
collect() to bring the result into R. It needs the duckdb,
DBI, and dbplyr packages.
cite_dataset() fetches metadata from Dataverse and
returns a citation in plain text, BibTeX, or RIS.
open_project() prints the study, lists its datasets, and
opens the repository. Private repositories are flagged before they
open.
The full function reference is at https://inspercidades.github.io/inspercidados/.
get_dataverse() downloads any Insper Dataverse deposit,
registered or not, from a pasted DOI or URL.
list_projects() lists the studies behind the datasets and
their repositories.