Wikipedia:Bots/Requests for approval/JBradley Bot 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
Approved.
Operator: Jamo2008 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 19:23, Saturday December 22, 2012 (UTC)
Automatic, Supervised, or Manual: Automatic for most manually assisted for pages with formatting errors, the number with formatting errors should be relatively low.
Programming language(s): Java
Source code available: I'm using a Google code svn.
Function overview:
- Insert population estimate into side panel of a US city/town/village/etc.
- Remove redundant "of it" from the sentence in the Geography section saying how much total, land, and water area a place has
- Insert a new line character after 2000 census subsection if there isn't a blank line between that section and the next.
Links to relevant discussions (where appropriate):
- People add estimates all the time and what they usually do is overwrite the official census data with the new estimate, I'd like to introduce the estimates with the separate fields that are provided by the infobox settlement template that way both the 2010 offical values and estimates can both be displayed. Also by doing it this the way the estimates will be standardized across thousands of pages allowing me to quickly switch values to newer estimates when they are released (for example the 2012 estimates should come out in June of 2013).
- http://en.wikipedia.org/wiki/Wikipedia_talk:WikiProject_Cities/US_Guideline It is the discussion titled Wording on bot updates to census area figures.
- http://en.wikipedia.org/w/index.php?title=Jackson,_Michigan&curid=16020&diff=528928356&oldid=528480123" I've seen a couple edits like this on my watch list. So if someone thinks its important enough to make a edit just to add a new line I think it's important enough to tack onto a bot edit that is already doing more important things.
Edit period(s): Off and on when I have time to run it.
Estimated number of pages affected: ~7500
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): Yes
Function details:
For anyone who doesn't know the first task for my bot is updating places to 2010 census data, and the pages this request focues on are the one's I've already updated. Although I do plan on incorporating the estimates into the normal update routine once I go back to doing those, but the formatting things I've already changed in my code and they are no longer an issue going forward. I was originally going to wait until the 2012 estimates came out to put in this request, but recently when I edited Corvallis Oregon, which had already had its demographics section updated by someone else, I noticed that two of the values between the other user's info and my info weren't the same. It turns out that user was wrong about one of their values and I was wrong about one of mine. I have been pulling the percentage of households with their OWN children under 18 living with them rather than the TOTAL percentage of households with children under 18 living with them. These two values are slightly different for some places (ex: Corvallis is 19.6% for own children and 20.7% for total), and as such needs to be fixed asap. So since I have to do that bug fix on all my old edits anyway I might as well do something else productive on the side while doing that.
1 Inserting Estimates - This will be done by searching for the |population_est and |pop_est_as_of fields in the infobox if they are found it will insert the info there. For the overwhelming majority of pages those fields won't exist and I'll instead find the |population_as_of field and insert the two new fields below it. Since the pages I'm going over have already been edited by me I know that they all have the |population_as_of field. Below is what the two fields will look like.
|population_est = 79
|pop_est_as_of = 2011<ref name="2011 Pop Estimate">{{cite web|title=Population Estimates|url=http://www.census.gov/popest/data/cities/totals/2011/files/SUB-EST2011-IP.csv|publisher={{URL|1=http://en.wikipedia.org/wiki/United_States_Census_Bureau|2=United States Census Bureau}}|accessdate=2012-12-22}}</ref>
Here is a link to the town I grew up in, which I just edited by hand to show what the result would look like Popejoy, Iowa.
Also my guess is that there are about 100 pages that have already had the 2010 data overwritten with the 2011 estimates, as I've run my bot I've usually let this slide since it is more recent then the information I'd be adding. So I would add the estimate fields as normal and change the official |population_total and |population_as_of back to the 2010 info. For population density I plan on leaving that unchanged so that it is associated with the official population rather than the estimated value.
2 This will be simple the sentence was put into the pages by me I'll just find it with a regular expression and replace it with the new version.
3 I'll find the 2000 census section then go to the section below it, if there is only one leading new line character I'll insert one more.
Discussion
[edit]Its been quite a while since I put this up and I still haven't gotten any response. As I mention in the write up I put this in so that I could add population estimate information while fixing a value in the standard demographics boilerplate. It would be great if I could either get a trial or get rejected in a more timely manner so I can make those fixes. In case the wall of text is scaring people I'll do a bit of summarizing. Items 2 and 3 are simply doing formatting changes to content that was added by my bot under its first task, these shouldn't be to controversial and probably don't even need to be included in here as I'm only changing content I added it could probably fall under my first task. The adding of estimates info is something several pages already have (ex:Olathe, Kansas Tacoma, Washington Sioux Falls, South Dakota), and I'm proposing to add this to more cities and do it in the correct manner by using the fields provided by the infobox settlement template rather than overwrite the 2010 info like the provided examples.Jamo2008 (talk) 17:49, 28 December 2012 (UTC)[reply]
{{BAGAssistanceNeeded}}
Comments would be appreciated. Jamo2008 (talk) 23:49, 29 December 2012 (UTC)[reply]
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. MBisanz talk 00:34, 31 December 2012 (UTC)[reply]
Trial complete. Done with edits they will be the 50 most recent edits for the bot click here. Jamo2008 (talk) 03:11, 31 December 2012 (UTC)[reply]
Approved. MBisanz talk 21:33, 1 January 2013 (UTC)[reply]
- 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.