User:CenPop

The CenPop script is a script based heavily on Joeytje50's AutoWikiBrowser script. The purpose of the script is to speed up the addition and updating of historical census data in the Template:US Census population template to Wikipedia articles about places and counties and minor civil divisions. The current version links in with the Census Bureau's API to enable auto-updating.

It has been used on my main account since 2015 and has been migrated in 2022 to its own account to comply with WP:MeatBot and other bot-related policy.

At present, the script should probably be usable by others, but I have not yet had the chance to document it properly ...

Installation
To install this script on a wiki, put the following code in your JavaScript file (for example Special:MyPage/common.js, or a skin-specific JS file):

Getting Started
After installation, you can run the script by going to this page.

Note that the above link shows up as a redlink here, but if it has been installed, the script will run as soon as you navigate to that (unoccupied) page.

Loading Data
TODO: needs to be updated.

Manual Mode
Note: At this point, only minor civil divisions (outside of a few New England states which I did do) would be relevant to add using this methodology. All incorporated places in the United States have been added using this methodology (mostly thanks to hundreds of hours I spent procrastinating on finishing my PhD dissertation while compiling them manually from old Census files.

The data should be formatted using comma-delimited values, and using double-quotes (") to surround the names of places (no quotes should be used for numbers).

For now (this will have to be updated), the first 4 values must be as follows
 * 1) Contains the name of the place (blank if it is a county)
 * 2) Contains the type of place (village, city, municipality, CDP, town, township, etc.)
 * 3) Contains the name of the county (blank if it is a state)
 * 4) Contains the name of a state. Note that it is necessary to put "County" after the name of the county (or "Parish" for Louisiana or whatever the name of county-equivalent divisions in that state).

For now, The 5th value will be the most recent estimate. Note: this all will have to be fixed for 2020 ...

Setting the File to Load From

 * 1) Click on the "Load" tab in the right of the bottom center panel.
 * 2) Enter the name of the file (leaving out the https://en.wikipedia.org/wiki/ prefix).

FIXES NEEDED

 * Something is up with population density in infoboxes, fix.

Note
Update interface with Census API