publick.org

Adding a town

From an empty folder to a published site, in the network repository (publick-org/publick.org). Written from adding Beverly, and used since for Lawrence, Burlington, and the towns in publick.org #58; each step names where the answer comes from, so a town the engine already reads takes an afternoon, not weeks.

Start with the helper

From this repository, with the engine checked out next to it:

PYTHONPATH=../publick-engine python -m pipeline.new_town <Town> <state> <city website URL>

It does steps 1 to 6 as far as public sources answer them, and marks the rest for a person (the engine’s pipeline/new_town.py):

It writes towns/<town>-<state>/ (the config, data/static/ with the ward file, the share image) and new-town-<town>-<state>.md, a report of what it found, where each answer came from, and what’s left. Everything left is a # To fill in: comment in the config: work through them with the steps below, deleting each as it’s done. The town’s site checks fail while any is left. Then publish (step 7).

1. What the city uses

2. The state’s and the country’s codes

For Massachusetts, below. For another state, start from a town’s config in that state (README, “Adding a town”) and the state package’s docstring in the engine (pipeline/states/<state>/__init__.py), which lists its keys; the Census and BLS steps are the same everywhere, with the state’s own FIPS code.

3. Wards

In Massachusetts, from MassGIS (below). Elsewhere, the city’s own GIS (Burlington), or the state’s (NH GRANIT for Manchester, RIGIS for South Kingstown’s precincts). A town without wards, its seats all elected townwide, uses its voting precincts for 311 (areas = "precincts") and shows no ward map; a town with neither (Bangor) has no 311 section yet.

4. Elected officials

5. The config

6. Check before merging

7. Publish

8. A week after launch