Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wards: Update Alderman Names #168

Open
matiaskitty opened this issue May 23, 2016 · 5 comments
Open

Wards: Update Alderman Names #168

matiaskitty opened this issue May 23, 2016 · 5 comments
Assignees

Comments

@matiaskitty
Copy link
Contributor

Update alderman names to match alderman currently in office:

See https://chicago.councilmatic.org/council-members/

@evz
Copy link
Member

evz commented May 23, 2016

@matiaskitty mentioned that you guys were looking for this info (as well as maybe some ward boundaries, etc.) Just wanted to point out that DataMade has a JSON API that we keep up to date with this kind of thing for the purpose of keeping councilmatic up to date. It's all based on a data standard that the Sunlight Foundation came up with a while back called Open Civic Data which has some very nice abstractions for keeping track of what's going on with a governmental body.

The parts that you might be interested in are in the /boundaries/ endpoints and in the /organizations/ endpoints. The way all this hooks together is each "thing" inside Open Civic Data is given a unique identifier which you can use in the API. So, the unique identifier for Chicago City Council is ocd-organization/ef168607-9135-4177-ad8e-c1f7a4806c3a/. This is where you'll find all the "things" that make up Chicago city council. These include "posts" (which are offices that people can hold) as well as "memberships" (which are people that are members of this organization (Chicago city council)). Other organizations that are related to city council are in the children attribute of that feed. This includes things like committees and sub-committees.

The boundaries portion of the API is way better documented (we're working on docs for the other part). You can find those docs here: http://represent.poplus.org/docs/reference/. In a nutshell, you can do things like this and get all the boundaries that contain a given point. You can get the details for a particular shape by following the links from that feed (so here's ward 42 for example) From there, you can get the GeoJSON for the shape (including a simplified version that loads pretty fast in a browser or whatever).

Let me know if you have questions. @fgregg @cathydeng and @derekeder all know a thing or two about this stuff, too.

@matiaskitty
Copy link
Contributor Author

Here are the latest ward boundaries and alderman names (from the Chicago data portal)

Ward boundaries
https://data.cityofchicago.org/Facilities-Geographic-Boundaries/Boundaries-Wards-2015-/sp34-6z76

Alderman names
https://data.cityofchicago.org/Facilities-Geographic-Boundaries/Ward-Offices/htai-wnw4

@shua123
Copy link
Member

shua123 commented Jun 7, 2016

It looks like it pulled ward boundaries and alderman names from the files in https://github.com/open-city/recycling/tree/master/migrations/data/wards? So those could be updated and then run a migration to update the database?

It looks like https://github.com/open-city/recycling/tree/master/migrations/data/wards is updated by running https://github.com/open-city/recycling/blob/master/script/get_wards which is pulling data from the old tribune boundary service boundaries so that would need to be updated to use DataMade's OCD API or the city's data portal api's.

Is this on the right track @alexkahn ?

@alexkahn
Copy link
Contributor

alexkahn commented Jun 7, 2016

Yep!

Ideally there would be an update to the script that would generate a migration similar to the most recent (which was made under the assumption that the data from the tribune was up-to-date, [assumptions, amirite?]).

@shua123
Copy link
Member

shua123 commented Jun 7, 2016

Ahh, yeah Tribune stopped supporting/updating the boundary service at some point I think.

For the data portal datasets, you can use the APIs for the boundaries (https://dev.socrata.com/foundry/data.cityofchicago.org/k9yb-bpqx) and office details (https://dev.socrata.com/foundry/data.cityofchicago.org/7ia9-ayc2) or just download the data.

Or use DataMade's Open Civic Data API if it has all the data you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants