Package {capesR}


Type: Package
Title: Access to CAPES Data
Version: 0.2.0
Date: 2026-09-18
Description: Provides simplified access to the data from the Catalog of Theses and Dissertations of the Brazilian Coordination for the Improvement of Higher Education Personnel (CAPES, https://catalogodeteses.capes.gov.br) for the years 1987 through 2024. The dataset includes variables such as Higher Education Institution (institution), Area of Concentration (area), Graduate Program Name (program_name), Type of Work (type), Language of Work (language), Author Identification (author), Abstract (abstract), Advisor Identification (advisor), Development Region (region), State (state).
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
Encoding: UTF-8
LazyData: true
Depends: R (≥ 4.0.0)
Imports: arrow, dplyr, magrittr, rlang, stringr, utils
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
URL: https://github.com/milkway/capesR, https://milkway.github.io/capesR/
BugReports: https://github.com/milkway/capesR/issues
Config/Needs/website: tidyverse/tidytemplate
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-09-18 22:56:00 UTC; leite
Author: André Leite [aut, cre], Hugo Vasconcelos Medeiros [aut], Dalson Figueiredo Filho [aut]
Maintainer: André Leite <leite@castlab.org>
Repository: CRAN
Date/Publication: 2026-09-20 18:30:37 UTC

Synthetic CAPES Data

Description

Aggregated data from the CAPES Catalog of Theses and Dissertations, containing summarized information by year, institution, area, program, type, region, and state (UF).

Usage

capes_synthetic_df

Format

A data frame with the following columns:

base_year

Reference year of the data.

institution

Higher Education Institution.

area

Area of Concentration.

program_name

Name of the Graduate Program.

type

Type of work (e.g., Master's, Doctorate).

region

Region of Brazil.

state

Federative Unit (state).

n

Total number of works.

Source

Synthetic data created from the CAPES Catalog of Theses and Dissertations.

Examples

data(capes_synthetic_df)
head(capes_synthetic_df)


Annual files of the CAPES Catalog of Theses and Dissertations

Description

A data frame listing, for each year, the Parquet file distributed by the package and the URL from which it is downloaded. Used internally by [download_capes_data()]; the host can be overridden with the 'capesR.base_url' option (see [download_capes_data()]).

Usage

capes_years

Format

A data frame with one row per year (1987-2024) and the columns:

year

Year of the data.

file

File name (e.g. 'capes_1987.parquet').

url

Download URL of the file.

bytes

File size in bytes, used to check the download.

md5

MD5 checksum of the file.

Source

Derived from the CAPES open data portal, <https://dadosabertos.capes.gov.br/group/catalogo-de-teses-e-dissertacoes-brasil>.

Examples

data(capes_years)
head(capes_years)


Download CAPES Data

Description

Downloads the yearly Parquet files of the CAPES Catalog of Theses and Dissertations for the selected years. The file list and download URLs come from [capes_years].

Usage

download_capes_data(
  years,
  destination = tempdir(),
  timeout = 120,
  base_url = getOption("capesR.base_url")
)

baixar_dados_capes(
  years,
  destination = tempdir(),
  timeout = 120,
  base_url = getOption("capesR.base_url")
)

Arguments

years

A vector with the desired years (1987-2024).

destination

The directory where the files will be saved (default: temporary directory).

timeout

The timeout in seconds for the download process (default: 120 seconds).

base_url

Optional base URL of a mirror hosting the files listed in [capes_years]. Defaults to 'getOption("capesR.base_url")'; when 'NULL', the 'url' column of [capes_years] is used.

Value

A named list (by year) of file paths for the downloaded or already existing files.

Examples


# Download data for the years 1987 and 1990
capes_files <- download_capes_data(c(1987, 1990))


Read and filter data from the CAPES Catalog of Theses and Dissertations

Description

This function combines data from multiple Parquet files and applies optional filters, including text-based searches.

Usage

read_capes_data(files, filters = list())

ler_dados_capes(files, filters = list())

Arguments

files

A vector or list of paths to Parquet files.

filters

A named list of filters. Values for the text columns 'titulo' and 'resumo' (or 'title'/'abstract') are matched as case-insensitive substrings; all other columns are matched exactly (e.g., 'list(ano_base = 1987, uf = "SP", titulo = "educação")').

Value

A 'data.frame' containing the combined and filtered data.

Examples


# Download data for the years 1987 and 1990
capes_files <- download_capes_data(c(1987, 1990))
# Combine all selected data
combined_data <- read_capes_data(capes_files)



Search for terms in text fields of the CAPES Catalog of Theses and Dissertations data

Description

This function allows searching for specific terms in the text fields of a previously loaded 'data.frame'.

Usage

search_capes_text(data, term, field)

buscar_texto_capes(data, term, field)

Arguments

data

A 'data.frame' containing the CAPES Catalog of Theses and Dissertations data.

term

A string, the term to search for.

field

A string, the name of the field to search in (e.g., "resumo", "titulo").

Value

A 'data.frame' with rows matching the search or a message indicating no results were found.

Examples


# Download data for the years 1987 and 1990
capes_files <- download_capes_data(c(1987, 1990))
# Combine all selected data
combined_data <- read_capes_data(capes_files)
# Search data
results <- search_capes_text(
data = combined_data,
term = "Educação",
  field = "titulo"
)