Description Usage Arguments See Also Examples
get_random_item
and get_random_property
allow you to retrieve the data
associated with randomly-selected Wikidata items and properties, respectively. As with
other WikidataR
code, custom print methods are available; use str
to manipulate and see the underlying structure of the data.
1 2 3 | get_random_item(limit = 1, ...)
get_random_property(limit = 1, ...)
|
limit |
how many random items to return. 1 by default, but can be higher. |
\dots |
arguments to pass to httr's GET. |
get_item
for selecting a specific item or property,
or find_item
for using search functionality to pull out
item or property IDs where the descriptions or aliases match a particular
search term.
1 2 3 4 5 6 7 8 | ## Not run:
#Random item
random_item <- get_random_item()
#Random property
random_property <- get_random_property()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.