Wikipedia:Bots/Requests for approval/CensusBot 2


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was

CensusBot 2
Operator:

Time filed: 16:50, Monday, July 17, 2017 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): Python

Source code available: https://github.com/CommerceDataService/census-wikidata-bot/blob/master/wikipedia_bot.py

Function overview: A bot for checking total population and ranking values in U.S. State and County page infoboxes and editing to add official values from U.S. Census Bureau API's

Links to relevant discussions (where appropriate): Wikipedia_talk:WikiProject_U.S._counties

Edit period(s): Twice yearly

Estimated number of pages affected: 3,000 pages (each US county)

Exclusion compliant (Yes/No): No

Already has a bot flag (Yes/No):  No

Function details: This is an extension of the original CensusBot request, in order to allow the bot to edit population values for US county pages.

CensusBot is a bot produced by the Commerce Data Service in collaboration with the U.S. Census Bureau. The main purpose of this bot is to check Wikipedia pages to make sure that they contain the most up to date information available from the Census Bureau and that the entries are complete.

Discussion
In addition to this bot request, I want to register this user account as an additional operator for CensusBot. I am working with Sasan-CDS. Let me know if there is anything I need to edit for the bot or the pervious request to have me listed as an approved operator. -- Logan-Census (talk) 18:35, 26 July 2017 (UTC)
 * Please have the original operator confirm this request.— CYBERPOWER  (Around ) 21:10, 27 July 2017 (UTC)
 * Hi, I can confirm that Logan-Census is now the operator of this bot. Sasan-CDS (talk) 13:52, 7 August 2017 (UTC)

I have made 50 edits using CensusBot. Some states didn't have any pages that needed to be updated, so this represents changes to 36 different states. The 50 diffs are provided below: As it is setup today, the bot will specifically attempt to update the Infobox_U.S._county and Infobox_settlement templates, only making a change if the raw population value doesn't match the most recent US Census population estimate. There are four U.S. counties still using the Geobox template, but I am ignoring those for now. The bot attempts to keep properties formatted with similar whitespace and order within the template, and most of that is done using the Python mwparserfromhell. -- Logan-Census (talk) 14:53, 15 August 2017 (UTC)
 * Please link to the diffs when done.— CYBERPOWER  ( Chat ) 18:04, 7 August 2017 (UTC)
 * I note that the bot removes extra spaces that are included as part of the infobox templates which can make it easier for editors to work with infoboxes. I don't know the views of others on these, minor stylistic changes, but that edit seemed to boarder on WP:COSMETICBOT if it were not for the comma. I am concerned that this could easily become a case of CONTEXTBOT. I am further concerned by the lack of requisite Wikipedia experience needed to operate a bot in this case, as I rased in the first BRFA. In particular the BRFA was filed incorectly (details here). TheMagikCow (T) (C) 18:43, 10 August 2017 (UTC)
 * I also noticed that issue and ensured that I only updated the one page while working through any additional updates. I reverted the change you linked to, and you can see the updated diff now . Additionally I’ve updated the bot code so that it won’t apply the thousands separator (‘,’) in future population values. For the trial, I'm using the 50 edits as an opportunity to update one county page per state -- and I am working through it methodically to ensure each page's variance is accounted for. There are three different templates used, and they’re not used consistently across pages, which makes automated changes tricky. If you have recommendations for the bot behavior, I can incorporate that into the code. Also, yes the BRFA was initially submitted by Sasan-CDS with the wrong format. That was a mistake that I fixed at the same time that I listed myself as the bot operator. -- Logan-Census (talk) 15:03, 11 August 2017 (UTC)
 * Hi ! Its not so much the presence of the comma that I take issue with. My issue is edits that the bot would perform where the only change is adding the comma, as a source and the correct population is already present. Thanks for fixing the changes above - the task seems tricky with the different templates in use! Best, TheMagikCow (T) (C) 17:13, 11 August 2017 (UTC)
 * 1) Anchorage, Alaska
 * 2) Kusilvak Census Area, Alaska
 * 3) Lafayette County, Arkansas
 * 4) Butte County, California
 * 5) Adams County, Colorado
 * 6) Baker County, Florida
 * 7) Appling County, Georgia
 * 8) Honolulu County, Hawaii
 * 9) Ada County, Idaho
 * 10) Adams County, Illinois
 * 11) Adams County, Indiana
 * 12) Adair County, Iowa
 * 13) Adair County, Kentucky
 * 14) Acadia Parish, Louisiana
 * 15) Allegany County, Maryland
 * 16) Barnstable County, Massachusetts
 * 17) Alcona County, Michigan
 * 18) Alcorn County, Mississippi
 * 19) Adair County, Missouri
 * 20) Beaverhead County, Montana
 * 21) Adams County, Nebraska
 * 22) Churchill County, Nevada
 * 23) Atlantic County, New Jersey
 * 24) Bernalillo County, New Mexico
 * 25) Albany County, New York
 * 26) Alamance County, North Carolina
 * 27) Adams County, Ohio
 * 28) Adair County, Oklahoma
 * 29) Adams County, Pennsylvania
 * 30) Bristol County, Rhode Island
 * 31) Abbeville County, South Carolina
 * 32) Anderson County, Tennessee
 * 33) Anderson County, Texas
 * 34) Beaver County, Utah
 * 35) Addison County, Vermont
 * 36) Accomack County, Virginia
 * 37) Barbour County, West Virginia
 * 38) Adams County, Wisconsin
 * 39) San Francisco
 * 40) Alamosa County, Colorado
 * 41) Arapahoe County, Colorado
 * 42) Archuleta County, Colorado
 * 43) Baca County, Colorado
 * 44) Bent County, Colorado
 * 45) Boulder County, Colorado
 * 46) Chaffee County, Colorado
 * 47) Cheyenne County, Colorado
 * 48) Clear Creek County, Colorado
 * 49) Conejos County, Colorado
 * 50) Costilla County, Colorado
 * So this goes back to the formatting, why is the bot removing the comma from certain numbers? I feel they should be left alone if in there.  It should be easy to check for the presence of a comma.— CYBERPOWER  ( Chat ) 13:10, 16 August 2017 (UTC)
 * The bot is making that change because that's the directive within the template instructions. Those are defined here and here. It says to use the 'raw' format for numbers, and specifically mentions it when discussing population. I imagine it's a better format for localization. -- Logan-Census (talk) 16:53, 16 August 2017 (UTC)


 * — CYBERPOWER  ( Chat ) 18:56, 16 August 2017 (UTC)
 * The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.