# Get the first 10 pages in 'Category:Physics' on English Wikipedia
physics_members <- wiki_action_request() %>%
query_category_members("Physics") %>%
gracefully(next_batch)
physics_members
# Build the tree of all albums for the Melbourne band Custard
tree <- gracefully("Category:Custard_(band)_albums", build_category_tree)
tree
# For network analysis and visualisation, you can pass the category tree
# to igraph
if (!is_wikkitidy_failure(tree)) {
tree_graph <- igraph::graph_from_data_frame(tree$edges, vertices = tree$nodes)
tree_graph
}
Run the code above in your browser using DataLab