Get subclasses of a Wikidata class

subclasses_of(id, include_self = FALSE)

Arguments

id

the id of class

include_self

whether to include class itself in the results table

Examples

subclasses_of("wd:Q7930989")
#> # A tibble: 30 x 4 #> from to classes classesLabel #> <chr> <chr> <chr> <chr> #> 1 wd:Q7930989 wd:Q515 wd:Q515 city #> 2 wd:Q7930989 wd:Q3957 wd:Q3957 town #> 3 wd:Q7930989 wd:Q159438 wd:Q159438 Hero City #> 4 wd:Q7930989 wd:Q174844 wd:Q174844 megacity #> 5 wd:Q7930989 wd:Q187768 wd:Q187768 cities and towns in Russia #> 6 wd:Q7930989 wd:Q692581 wd:Q692581 holy city #> 7 wd:Q7930989 wd:Q896881 wd:Q896881 city with tens of thousands of inhabita… #> 8 wd:Q7930989 wd:Q902814 wd:Q902814 border town #> 9 wd:Q7930989 wd:Q3199141 wd:Q3199141 city of Indonesia #> 10 wd:Q7930989 wd:Q11394721 wd:Q113947… Inland city #> # … with 20 more rows