Description
Conversation started at https://en.wikipedia.org/wiki/Wikipedia_talk:Version_1.0_Editorial_Team/Index#Wikivoyage_Expedition_Statistics.
Wikivoyage destination articles have a type and a status. These are specified using a single template that specifies both type and status and places the article into two categories. For example, https://en.wikivoyage.org/wiki/Caldas_da_Rainha has the {{starcity}} template, which places the article in both [[Category:Star articles]] and [[Category:City articles]].
As currently set up, the region statistics template (https://en.wikivoyage.org/wiki/Template:RegionStats/WRA) uses the article temples rather than the categories to populate the PetScan calls. The Caldas da Rainha article will be counted in 3 cells of the statistics matrix (https://en.wikivoyage.org/wiki/Wikivoyage:Portugal_Expedition#Article_statistics):
- Star City: https://petscan.wmflabs.org/?language=en&project=wikivoyage&depth=10&categories=Portugal&templates_yes=starcity&show_redirects=no&doit=1
- Total City: https://petscan.wmflabs.org/?language=en&project=wikivoyage&depth=10&categories=Portugal&templates_any=outlinecity%0D%0Ausablecity%0D%0Aguidecity%0D%0Astarcity&show_redirects=no&doit=1
- Total Star: https://petscan.wmflabs.org/?language=en&project=wikivoyage&depth=10&categories=Portugal&templates_any=stardistrict%0D%0Astarcity%0D%0Astarairport%0D%0Astarpark%0D%0Astardiveguide%0D%0Astarruralarea%0D%0Astarregion&show_redirects=no&doit=1
(I believe that using categories rather than templates for the PetScan calls would be clearer, but that's more from an end user perspective and may not have any relevance to the automation process.)
Wikivoyage's geographical hierarchy (https://en.wikivoyage.org/wiki/Wikivoyage:Geographical_hierarchy) also comes into play. Each destination is part of a region, which itself may be part of a parent region (and so on...), which is part of a country, which is part of a continental section, which is part of a continent. Wikivoyage uses Template:IsPartOf (https://en.wikivoyage.org/wiki/Template:IsPartOf) to create a category tree. PetScan then uses this tree (according to the Depth parameter) to find the all of the child articles for the specified "region" category, which in my example case above is the country of Portugal.