Learn R Programming

orcidtr (version 0.1.0)

orcid_funding: Retrieve funding records from ORCID

Description

Fetches funding records for a given ORCID identifier from the ORCID public API. Returns a structured data.table with funding details including grant titles, funding organizations, amounts, and dates.

Usage

orcid_funding(orcid_id, token = NULL)

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this funding record

title

Title of the funded project

type

Type of funding (e.g., grant, contract, award)

organization

Name of the funding organization

start_date

Funding start date (ISO format)

end_date

Funding end date (ISO format)

amount

Funding amount (if available)

currency

Currency code (e.g., USD, EUR)

Returns an empty data.table with the same structure if no funding records are found.

Arguments

orcid_id

Character string. A valid ORCID identifier in the format XXXX-XXXX-XXXX-XXXX. Can also handle URLs like https://orcid.org/XXXX-XXXX-XXXX-XXXX.

token

Character string or NULL. Optional API token for authenticated requests. If NULL (default), checks the ORCID_TOKEN environment variable. Most public data is accessible without authentication.

Details

This function queries the ORCID public API endpoint: https://pub.orcid.org/v3.0/{orcid-id}/fundings

The function respects ORCID API rate limits and includes appropriate User-Agent headers identifying the orcidtr package.

References

ORCID API Documentation: https://info.orcid.org/documentation/api-tutorials/

See Also

orcid_works, orcid_employments, orcid_fetch_record

Examples

Run this code
if (FALSE) {
# Fetch funding records for a public ORCID
funding <- orcid_funding("0000-0002-1825-0097")
print(funding)

# With authentication
Sys.setenv(ORCID_TOKEN = "your-token-here")
funding <- orcid_funding("0000-0002-1825-0097")
}

Run the code above in your browser using DataLab