diff --git a/apple-touch-icon-120x120.png b/apple-touch-icon-120x120.png index 4758c51..f24c544 100644 Binary files a/apple-touch-icon-120x120.png and b/apple-touch-icon-120x120.png differ diff --git a/apple-touch-icon-152x152.png b/apple-touch-icon-152x152.png index d3ccba3..cbe569c 100644 Binary files a/apple-touch-icon-152x152.png and b/apple-touch-icon-152x152.png differ diff --git a/apple-touch-icon-180x180.png b/apple-touch-icon-180x180.png index 8fd7061..70dc460 100644 Binary files a/apple-touch-icon-180x180.png and b/apple-touch-icon-180x180.png differ diff --git a/apple-touch-icon-60x60.png b/apple-touch-icon-60x60.png index 9a01664..84fac84 100644 Binary files a/apple-touch-icon-60x60.png and b/apple-touch-icon-60x60.png differ diff --git a/apple-touch-icon-76x76.png b/apple-touch-icon-76x76.png index 928869d..c2e9fe9 100644 Binary files a/apple-touch-icon-76x76.png and b/apple-touch-icon-76x76.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png index 602a40e..95f6176 100644 Binary files a/apple-touch-icon.png and b/apple-touch-icon.png differ diff --git a/favicon-16x16.png b/favicon-16x16.png index 92e2809..4e2b453 100644 Binary files a/favicon-16x16.png and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png index 8d8620b..d3772c7 100644 Binary files a/favicon-32x32.png and b/favicon-32x32.png differ diff --git a/pkgdown.yml b/pkgdown.yml index 07df389..eb3770d 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.19.2 pkgdown: 2.0.7 pkgdown_sha: ~ articles: {} -last_built: 2023-07-25T23:57Z +last_built: 2023-07-26T00:40Z urls: reference: https://wikihistories.github.io/wikkitidy/reference article: https://wikihistories.github.io/wikkitidy/articles diff --git a/reference/new_generator_query.html b/reference/new_generator_query.html index c6ac6eb..6e7df9a 100644 --- a/reference/new_generator_query.html +++ b/reference/new_generator_query.html @@ -111,10 +111,8 @@

Examples# Generate the pages that are linked to Albert Einstein's page on English # Wikipedia einstein_categories <- wiki_action_request() %>% - new_prop_query("title", "Albert Einstein") %>% + new_prop_query("titles", "Albert Einstein") %>% new_generator_query("iwlinks") -#> Error in new_prop_query(., "title", "Albert Einstein"): `by` must be one of "pageids", "titles", or "revids", not "title". -#> Did you mean "titles"? diff --git a/reference/page_vector_functions.html b/reference/page_vector_functions.html index be27c9a..2c570bf 100644 --- a/reference/page_vector_functions.html +++ b/reference/page_vector_functions.html @@ -155,31 +155,18 @@

Examples#> # description_source <chr>, coordinates_lat <dbl>, coordinates_lon <dbl>, … # The functions are vectorised over title and language -# Find all articles about Joanna Baillie, and retrieve their summary -# data. +# Find all articles about Joanna Baillie, and retrieve summary data for +# the first 3. baillie <- get_page_langlinks("Joanna Baillie") %>% + dplyr::slice(1:3) %>% dplyr::mutate(get_page_summary(title = title, language = code)) -#> ■■■■■■■■■■■■■■■■ 50% | ETA: 3s baillie -#> # A tibble: 16 × 30 -#> code name key title type displaytitle namespace_id namespace_text -#> <chr> <chr> <chr> <chr> <chr> <chr> <int> <chr> -#> 1 ar العربية جوانا_… جوان… stan… "<span clas… 0 "" -#> 2 arz مصرى جوانا_… جوان… stan… "<span clas… 0 "" -#> 3 avk Kotava Johann… Joha… stan… "<span clas… 0 "" -#> 4 bg български Джоана… Джоа… stan… "<span clas… 0 "" -#> 5 bn বাংলা জনা_বে… জনা … stan… "<span clas… 0 "" -#> 6 ca català Johann… Joha… stan… "<span clas… 0 "" -#> 7 de Deutsch Joanna… Joan… stan… "<span clas… 0 "" -#> 8 es español Joanna… Joan… stan… "<span clas… 0 "" -#> 9 eu euskara Joanna… Joan… stan… "<span clas… 0 "" -#> 10 fr français Johann… Joha… stan… "<span clas… 0 "" -#> 11 he עברית ג'ואנה… ג'וא… stan… "<span clas… 0 "" -#> 12 it italiano Joanna… Joan… stan… "<span clas… 0 "" -#> 13 pt português Joanna… Joan… stan… "<span clas… 0 "" -#> 14 ru русский Бейли,… Бейл… stan… "<span clas… 0 "" -#> 15 sv svenska Joanna… Joan… stan… "<span clas… 0 "" -#> 16 vi Tiếng Việt Joanna… Joan… stan… "<span clas… 0 "" +#> # A tibble: 3 × 30 +#> code name key title type displaytitle namespace_id namespace_text +#> <chr> <chr> <chr> <chr> <chr> <chr> <int> <chr> +#> 1 ar العربية جوانا_بيلي جوان… stan… "<span clas… 0 "" +#> 2 arz مصرى جوانا_بيلى جوان… stan… "<span clas… 0 "" +#> 3 avk Kotava Johanna_Ba… Joha… stan… "<span clas… 0 "" #> # ℹ 22 more variables: wikibase_item <chr>, titles_canonical <chr>, #> # titles_normalized <chr>, titles_display <chr>, pageid <int>, #> # thumbnail_source <chr>, thumbnail_width <int>, thumbnail_height <int>, diff --git a/reference/query_category_members.html b/reference/query_category_members.html index 18eb052..c868811 100644 --- a/reference/query_category_members.html +++ b/reference/query_category_members.html @@ -179,75 +179,54 @@

Examples#> 9 70983414 14 Category:Physics by country #> 10 71976587 14 Category:Physics events -# Retrieve interwiki links for the first 10 pages in the 'Beatles Albums' -# category on Danish Wikipedia -# TODO: This currently doesn't work, because incomplete batches aren't properly handled -beatles <- wiki_action_request(language = "da") %>% - query_category_members("Beatles-album") %>% - query_page_properties("langlinks") %>% - next_batch() -# Build the tree of all trees in Wikipedia -tree <- build_category_tree("Category:Trees (graph theory)") -#> ⠙ Walking subcategories: 1 done (338/s) | 4ms -#> ⠹ Walking subcategories: 2 done (12/s) | 168ms -#> ⠸ Walking subcategories: 3 done (9.6/s) | 312ms -#> ⠼ Walking subcategories: 4 done (8.3/s) | 483ms -#> ⠴ Walking subcategories: 5 done (8.1/s) | 615ms -#> ⠦ Walking subcategories: 6 done (8.2/s) | 732ms -#> ⠧ Walking subcategories: 7 done (8.1/s) | 863ms -#> ⠇ Walking subcategories: 8 done (8.1/s) | 986ms -#> ⠏ Walking subcategories: 9 done (8.1/s) | 1.1s +# Build the tree of all albums for the Melbourne band Custard +tree <- build_category_tree("Category:Custard_(band)_albums") +#> ⠙ Walking subcategories: 1 done (386/s) | 3ms +#> ⠹ Walking subcategories: 2 done (18/s) | 111ms tree #> $nodes -#> # A tibble: 300 × 4 -#> pageid ns title type -#> <int> <int> <chr> <chr> -#> 1 17606898 14 Category:Trees_(graph_theory) root -#> 2 48560 0 Tree (graph theory) page -#> 3 44659935 0 Agreement forest page -#> 4 13251077 0 Arborescence (graph theory) page -#> 5 1410431 0 Bethe lattice page -#> 6 29106883 0 Block graph page -#> 7 48861658 0 Blossom tree (graph theory) page -#> 8 16823137 0 Branch-decomposition page -#> 9 68638522 0 Buchholz hydra page -#> 10 27258886 0 Caterpillar tree page -#> # ℹ 290 more rows +#> # A tibble: 11 × 4 +#> pageid ns title type +#> <int> <int> <chr> <chr> +#> 1 41181643 14 Category:Custard_(band)_albums root +#> 2 47888836 0 Come Back, All Is Forgiven page +#> 3 59271122 0 The Common Touch (album) page +#> 4 30333352 0 Loverama page +#> 5 63691299 0 Respect All Lifeforms page +#> 6 43770191 0 Wahooti Fandango page +#> 7 30333401 0 We Have the Technology page +#> 8 43769837 0 Wisenheimer page +#> 9 41148700 14 Category:Custard (band) compilation albums subcat +#> 10 43770688 0 Brisbane 1990–1993 page +#> 11 43770872 0 Goodbye Cruel World (Custard album) page #> #> $edges -#> # A tibble: 320 × 3 +#> # A tibble: 10 × 3 #> source target timestamp #> <int> <int> <chr> -#> 1 17606898 48560 2008-05-25T15:51:35Z -#> 2 17606898 44659935 2014-12-12T11:24:55Z -#> 3 17606898 13251077 2010-09-09T15:01:59Z -#> 4 17606898 1410431 2008-05-25T15:53:18Z -#> 5 17606898 29106883 2010-10-08T00:51:39Z -#> 6 17606898 48861658 2015-12-21T22:02:29Z -#> 7 17606898 16823137 2008-06-01T07:24:50Z -#> 8 17606898 68638522 2021-09-03T22:35:48Z -#> 9 17606898 27258886 2010-05-07T00:17:15Z -#> 10 17606898 1266713 2008-06-01T07:17:42Z -#> # ℹ 310 more rows +#> 1 41181643 47888836 2015-09-21T10:58:43Z +#> 2 41181643 59271122 2019-01-06T17:20:32Z +#> 3 41181643 30333352 2013-11-24T21:09:05Z +#> 4 41181643 63691299 2020-04-18T06:08:40Z +#> 5 41181643 43770191 2014-09-08T08:02:46Z +#> 6 41181643 30333401 2013-11-24T21:09:09Z +#> 7 41181643 43769837 2014-09-08T06:31:49Z +#> 8 41181643 41148700 2013-11-21T14:38:43Z +#> 9 41148700 43770688 2015-05-20T06:12:07Z +#> 10 41148700 43770872 2015-04-26T23:42:41Z #> # For network analysis and visualisation, you can pass the category tree # to igraph tree_graph <- igraph::graph_from_data_frame(tree$edges, vertices = tree$nodes) tree_graph -#> IGRAPH 6e01b42 DN-B 300 320 -- +#> IGRAPH d58caaf DN-B 11 10 -- #> + attr: name (v/c), ns (v/n), title (v/c), type (v/c), timestamp (e/c) -#> + edges from 6e01b42 (vertex names): -#> [1] 17606898->48560 17606898->44659935 17606898->13251077 17606898->1410431 -#> [5] 17606898->29106883 17606898->48861658 17606898->16823137 17606898->68638522 -#> [9] 17606898->27258886 17606898->1266713 17606898->4557120 17606898->267355 -#> [13] 17606898->40006935 17606898->19716804 17606898->68857410 17606898->31104438 -#> [17] 17606898->3606300 17606898->35471883 17606898->36344169 17606898->7196522 -#> [21] 17606898->2145273 17606898->4587190 17606898->53993905 17606898->1731488 -#> [25] 17606898->1650168 17606898->62951851 17606898->22192834 17606898->27561614 -#> [29] 17606898->5140949 17606898->2185021 17606898->19310129 17606898->53828785 -#> + ... omitted several edges +#> + edges from d58caaf (vertex names): +#> [1] 41181643->47888836 41181643->59271122 41181643->30333352 41181643->63691299 +#> [5] 41181643->43770191 41181643->30333401 41181643->43769837 41181643->41148700 +#> [9] 41148700->43770688 41148700->43770872