wdesr_get_graph: Get a graph of universities.

View source: R/wikidataESR.R

wdesr_get_graphR Documentation

Get a graph of universities.

Description

From a root wikipedia id, the function follows a given set of properties, building vertice and edges along the way.

Usage

wdesr_get_graph(
  wdid,
  props,
  depth = 3,
  active_only = FALSE,
  stop_at = c("EPST", "EPIC", "EPCA", "Académie", "agence publique")
)

Arguments

wdid

The wikidata id of the root.

props

The set of properties to follow.

depth

The depth of the graph (more or less) (default to 3).

active_only

TRUE to filter dissolved universities (default to FALSE).

stop_at

A list of type of nodes that must not be visited furthermore (default to c("EPST","EPIC","EPCA","Académie","agence publique")).

Details

Data are cached: use wdesr_clear_cache to refresh data from wikidata.

Value

A list of edges and vertices.

Author(s)

Julien Gossa, gossa@unistra.fr

References

See Also

wdesr_clear_cache

Examples

g <- wdesr_get_graph("Q61716176",c('composante','associé'), 1)
g$edges
g$vertice


cpesr/wikidataESR documentation built on Sept. 14, 2024, 5:51 a.m.