oc_get_countries: Retrieve data in Open Context by country

View source: R/oc_get.R

oc_get_countriesR Documentation

Retrieve data in Open Context by country

Description

Given a character vector of one or more countries, or a data frame of countries returned from oc_browse, this function retrieves data related to those countries. The function can return projects, locations, or descriptions.

Usage

oc_get_countries(country, type = c("projects", "locations", "descriptions"))

Arguments

country

A character vectory of country names or a data frame returned from oc_browse.

type

The type of data to return: "projects", "locations", "descriptions". The default is "projects".

Value

A data frame with the additional class oc_dataframe.

Examples

oc_get_countries("germany", type= "projects")

library(dplyr)
oc_browse(type = "countries") %>%
  filter(label == "Turkey") %>%
  oc_get_countries(type = "locations")

ropensci/opencontext documentation built on June 11, 2022, 9:32 p.m.