Code Monkey home page Code Monkey logo

ocd-division-ids's Introduction

Open Civic Data Technical Documentation

This repository contains documentation for developers including:

  • Writing Scrapers using Pupa
  • Open Civic Data's Data Type Specifications
  • Open Civic Data Proposals

Read these docs at https://open-civic-data.readthedocs.io/en/latest/

ocd-division-ids's People

Contributors

astrauss-google avatar azuser avatar ccongchen avatar chris48s avatar ckaminer avatar dependabot[bot] avatar drmeers avatar googlecivics-kantar avatar googlecivicskantar avatar hancush avatar jamesturk avatar jdmgoogle avatar jjensenmike avatar jloutsenhizer avatar jmwaura avatar jpmckinney avatar jrunningen avatar marcinmisztaltr avatar marisviana avatar mayanksahu123 avatar mileswwatkins avatar novitam avatar nuttingd1 avatar paultag avatar plantfansam avatar rahul-nath avatar riturajj avatar sguenther85 avatar showerst avatar zikowang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ocd-division-ids's Issues

OCD Division IDs in Wikidata

This is more of an FYI issue - I posted this to the google group, but James McKinney recommended also creating an issue and tagging the @opencivicdata/division-id-curators (though @jpmckinney, I don't seem to be able to tag that team, maybe you can only do that if you're on the team?) At any rate, I am reproducing that post here


As you might have seen in an earlier note to the list, there is now a property in Wikidata that connects entities to an Open Civic Data Division ID. I was the one who wrote the property proposal and fielded questions there, so I wanted to do some introductions here now that it’s been enabled.

Wikidata, if you don’t know it, is a sibling project to Wikipedia that aims to create a free and open structured knowledge base that’s both machine-readable and easy for humans to read too. Part of it aims to put data that’s found in the Wikipedia infoboxes (facts like city populations, area, etc) into a structured format so that it can be reused across wikis, but it goes much beyond that. Wikidata includes data about many more “things” than Wikipedia does - there are about 90 million entities in Wikidata right now, and growing.

Wikidata is a knowledge graph, using an extension to Mediawiki called ‘Wikibase’. For purposes of this discussion, you can treat Wikibase as a triplestore graph database that captures facts in the form:

e.g. each fact makes a statement about how “subject” and “object” are related via “predicate”. For example:

“madison” isA “City”
“madison” isCapitalOf “Wisconsin”
“madison” hasPopulation 223209
“madison” hasOpenCivicDataDivisionID ocd-division/country:us/state:wi/place:madison

(In actuality Wikidata uses its own set of identifiers for everything in its facts. So, instead of saying “madison” isCapitalOf “Wisconsin”, Wikidata writes

Q43788 P1376 Q1537

and for OCD-ID, it says

Q43788 P8651 ‘ocd-division/country:us/state:wi/place:madison’ )

The interesting change that happened recently was that property P8651 ( https://www.wikidata.org/wiki/Property:P8651 ) was recently created, which now lets folks add OCD-IDs to entities in Wikidata. (They’re added as literals)

Wikidata includes a query language that can be used via a nice UI or over an HTTP endpoint (https://query.wikidata.org/ ), using the SPARQL query language. Here’s how to look up the Wikidata entity for Madison

SELECT ?item ?itemLabel 
WHERE 
{
  ?item wdt:P8651 "ocd-division/country:us/state:wi/place:madison" .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

(See it in action here - click on the blue run triangle to execute it - https://query.wikidata.org/#SELECT%20%3Fitem%20%3FitemLabel%20%0AWHERE%20%0A%7B%0A%20%20%3Fitem%20wdt%3AP8651%20%22ocd-division%2Fcountry%3Aus%2Fstate%3Awi%2Fplace%3Amadison%22%20.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D )

I’ve labeled just a handful of US congressional districts with OCD-IDs, you can see them with this query:

SELECT ?item ?itemLabel ?ocd 
WHERE 
{
  ?item wdt:P8651 ?ocd.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

https://query.wikidata.org/#SELECT%20%3Fitem%20%3FitemLabel%20%3Focd%20%0AWHERE%20%0A%7B%0A%20%20%3Fitem%20wdt%3AP8651%20%3Focd.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D

So, a couple of things:

First, I think this is really exciting because Wikidata can be the database that OCD lacks. Virtually everything that gets an OCD Division Identifier is notable enough to include in Wikidata, so it can be a database to find out more data about any OCD-ID.

Second, what makes OCD-IDs cool is that they’re the shared database keys across multiple databases, so now you can join in through Wikidata to many more databases and facts. The Google Civic Info API can tell you who the current representatives are for a district, but you can combine that with Wikidata and get the shapefile for the CD or follow the link to the Reddit for that district, or find the population of the state, etc.

Third, Wikidata can be the source of additional entities that probably need OCD-IDs. It’s also possible that there are OCD-IDs for things that aren’t in Wikidata, so both projects can complete each other.

And some caveats:

Wikidata is not going to mint new OCD-IDs. Obviously nothing changes for OCD-ID - if there is something that someone finds in Wikidata that should have an OCD-ID, they should still come to the Github and propose a change with the new identifier. The value of OCD-ID remains the same: everyone who uses OCD-IDs agrees that they’ll use the OCD-IDs as identifiers against their local database, and the value is that the set of identifiers is governed so there is a shared join key.

For now, this property is only for Division identifiers, again because they’re governed. There are formats specified for other identifiers like People and Jurisdictions and others, but as near as I can tell anyone using these types are just minting them themselves for local data use and no one is committing to share them between data sources. (Wikidata can support that use case, but I think it would treat each identifier as a property to a specific data source, like an OpenStates ID vs an OpenElections ID, etc)

There may be some weirdness in the data models between OCD and Wikidata - for example, in Wikidata they’ve decided to separate out some constituencies that might represent an entire district, for example, for Australia they’ve got Queensland the senate constituency ( https://www.wikidata.org/wiki/Q56649111 ) and Queensland the state ( https://www.wikidata.org/wiki/Q36074 ) and they think at some point they may do something similar for the US.

This list is pretty low-traffic so I’m not sure how many people are going to see this. (I’m actually hoping that maybe some folks on the list are interested in working together to put OCD-IDs into Wikidata and maybe that would lead to some more traffic on the list). Looking forward to hearing from folks with questions or ideas!

Utilize Wikipedia permalinks when used as ref/source

So as to provide more specificity and fixity in linking, I'd suggest that all Wikipedia page links utilize one of the Wikipedia permalink options:

A permanent link (or permalink) is a link to a specific version of a wiki page. Normal links always lead to the current version of a page, but the permalink leads to the text as it was at the time; the text does not include any edits made since. Unlike what the name suggests, the permalink does not show exactly the same page, though, only the main text is guaranteed to be retained. The pictures included in the page are still shown at their most current versions, as are the templates, most notably the boxes with text and images placed in the pages' right-top corner, as well as any content transcluded from other pages. In other words, the permalink displays what the article would look like today if someone reverted to the revision in question.

I'd be happy to go through existing refs and update them to permalinks.

Thoughts?

Add cd:at-large to states with only one congressional district

This may not be the right place for this discussion, but...

I'd like to propose a different handling for OCD IDs for at-large districts. Currently, it seems there is no OCD ID for an at-large district, rather the next highest OCD ID division is used.

For example, Vermont has only one member of Congress, so his OCD ID is ocd-division/country:us/state:vt

Whereas, in a state with more than one member, they have divisions like this:

ocd-division/country:us/state:nc/cd:2

This makes it hard to regularize data and match between systems. It's easy to match via OCD ID, but in this case, the state level OCD ID is also shared by other elected officials (governors, senators), making matching harder and necessitating special rules for these states.

It would be better if this were handed like the Sunlight API handles them (https://sunlightlabs.github.io/congress/legislators.html), where they assign a district of 0 to at-large districts. So, for Vermont, we'd have ocd-division/country:us/state:vt/cd:0

Missing census codes for US County-Equivalents

Several incorporated cities function as a county-equivalent, so have separate FIPS codes
for a county and city. There are different Census class codes assigned, e.g.
the "City and County of San Francisco" has county code H7 and C1, but
Baltimore and the cities listed below have code C7.

The following are missing the census_geoid:

ocd-division/country:us/state:md/county:baltimore_city,24510
ocd-division/country:us/state:mo/county:st_louis_city,29510
ocd-division/country:us/state:nv/county:carson_city,32510
ocd-division/country:us/state:va/county:alexandria,51510
ocd-division/country:us/state:va/county:bedford_city,51515
ocd-division/country:us/state:va/county:bristol,51520
ocd-division/country:us/state:va/county:buena_vista,51530
ocd-division/country:us/state:va/county:charlottesville,51540
ocd-division/country:us/state:va/county:chesapeake,51550
ocd-division/country:us/state:va/county:colonial_heights,51570
ocd-division/country:us/state:va/county:covington,51580
ocd-division/country:us/state:va/county:danville,51590
ocd-division/country:us/state:va/county:emporia,51595
ocd-division/country:us/state:va/county:fairfax_city,51600
ocd-division/country:us/state:va/county:falls_church,51610
ocd-division/country:us/state:va/county:franklin_city,51620
ocd-division/country:us/state:va/county:fredericksburg,51630
ocd-division/country:us/state:va/county:galax,51640
ocd-division/country:us/state:va/county:hampton,51650
ocd-division/country:us/state:va/county:harrisonburg,51660
ocd-division/country:us/state:va/county:hopewell,51670
ocd-division/country:us/state:va/county:lexington,51678
ocd-division/country:us/state:va/county:lynchburg,51680
ocd-division/country:us/state:va/county:manassas,51683
ocd-division/country:us/state:va/county:manassas_park,51685
ocd-division/country:us/state:va/county:martinsville,51690
ocd-division/country:us/state:va/county:newport_news,51700
ocd-division/country:us/state:va/county:norfolk,51710
ocd-division/country:us/state:va/county:norton,51720
ocd-division/country:us/state:va/county:petersburg,51730
ocd-division/country:us/state:va/county:poquoson,51735
ocd-division/country:us/state:va/county:portsmouth,51740
ocd-division/country:us/state:va/county:radford,51750
ocd-division/country:us/state:va/county:richmond_city,51760
ocd-division/country:us/state:va/county:roanoke_city,51770
ocd-division/country:us/state:va/county:salem,51775
ocd-division/country:us/state:va/county:staunton,51790
ocd-division/country:us/state:va/county:suffolk,51800
ocd-division/country:us/state:va/county:virginia_beach,51810
ocd-division/country:us/state:va/county:waynesboro,51820
ocd-division/country:us/state:va/county:williamsburg,51830
ocd-division/country:us/state:va/county:winchester,51840

The sameAsNote for these has misspellings. Instead of
"Baltimore MD -- indepdent city: not a county" it would be better to say "Independent city functioning as county-equivalent"

us:prosecutor ocd-division ids

Hi there,

How are prosecutor ocd_id's handled? I ask because I have tracked prosecutor races in the US for the last three years and find it very difficult to work with data that uses standard ocd-id's because they are sometimes innacurate. i.e they associate a prosecutor with a county rather than the prosecutorial district, judicial district or circuit.

I'd be happy to contribute, but given that these are neither local nor state level divisions I am not sure how you would normally include them.

Our list is based on looking up state law in all 50 states and confirming it with ballot information. So, we're confident our definitions are correct and up-to-date... including the 2018 NC redistricting.

Would love to get them added to the ocd-id repo, but not sure how to go about it.

data source for local municipal divisions?

How were the IDs for the local municipal divisions created? Did this data come from US Census or some place else?

Examples:
https://github.com/opencivicdata/ocd-division-ids/blob/8b21b8db2efce4f9b38b9bf1397252f7533fdbd9/identifiers/country-us/state-mn-precincts.csv
https://github.com/opencivicdata/ocd-division-ids/blob/8b21b8db2efce4f9b38b9bf1397252f7533fdbd9/identifiers/country-us/state-mn-local_gov.csv

We're starting to collect some of the boundaries for these in a new repo, but wanted to double-check we're not duplicating work. It looks like the boundaries for these divisions have not been collected yet for OCD.

cc @jamesturk @paultag

U.S. School Districts are jurisdictional not division based

The school districts identifiers seemed to be based on what might actually be considered jurisdictions, not divisions.

For example:
ocd-division/country:us/state:al/county:montgomery/school_district:alabama_correctional_facilities
and
ocd- division/country:us/state:az/county:maricopa/school_district:country_gardens_educational_services_llc

Correct me if I'm wrong, but neither of these (and many other examples) seem to have actual geographic boundaries.

For U.S. school districts, it seems a better file to base identifiers on would be the National Center for Education Statistics School District Boundary File which represents actual geographic boundaries.

Using district names in Canadian Federal Electoral District OCD-IDs

A new set of OCD-IDs are created every time there is redistricting creating a problem for how we represent districts contiguously across time. Rather than use the numeric federal district ids, which only represent a district’s identity for 10 years, we should use district names as they are more closely represent a district’s identity. Some concerns regarding the switch to using names as identifiers are that they can change between redistricting cycles (see https://www12.statcan.gc.ca/census-recensement/2011/ref/FED_name_changes-changements_noms_CEF-eng.cfm and https://openparliament.ca/bills/42-1/C-402/). When names are changed, new ids and aliases can be created so that identity is maintained through the canonical OCD-ID. When redistricting occurs, districts created after redistricting that don’t map to an old one (not the same name or renaming of a district) will be considered new districts and ids will be created for them. Old districts which no longer exist will have a validThrough date to indicate it is no longer active.

Adding UK Constituencies?

I'm interested in adding the Political Constituencies for the UK parliament.

These span 4 countries, but for identifier purposes might make more sense under one.

The also break into differently named units (county, borough) that serve the same purpose.

I'd like to add something like:

ocd-division/country:uk/county:yeovil
ocd-division/country:uk/borough:walthamstow

thoughts?

Utqiagvik, Alaska

The city of Utqiagvik was formerly known as Barrow, until a referendum in 2016 changed the name.

How is this sort of update best handled in OCD-ID?

Update/establish best practices for OCD-ID types across countries

This issue spun out of the discussion on PR #168.

Background links:
Creating new OCD-IDs
Division identifiers

The current OCD-ID documentation establishes one canonical identifier type -- country -- but otherwise gives latitude to within-country maintainers to define and enforce types appropriate for their jurisdiction. E.g., the first-level administrative type in the U.S. is a state, in Portugal it is a district, and in Germany it is a land.

The current situation gives a lot of flexibility and discretion to these within-country maintainer, but can place a significant burden on consumers of the identifiers to figure out what common types are across countries; e.g., is a district a first-level administrative division, or a sub-city legislative division?

Previous ad-hoc attempts to address this problem (e.g., PR #148) created identifiers which used the in-country types as aliases of identifiers that were more American in origin. E.g.,

Canonical: ocd-division/country:de/state:bb
Alias: ocd-division/country:de/land:bb

This was an attempt to balance the needs of publishers (using in-country types and terminology) and consumers (using types they had already seen). The discussion in PR #168 came to the conclusion that this was not desirable, or at least should go through a more thorough review before being implemented at scale. The options discussed were:

  1. Codify the ad-hoc approach.
  2. Reverse the current ad-hoc approach, in that the alias should be from the local term to the across-country term.
  3. Follow the practices of projects like GeoNames, etc., which use country-agnostic terms like adm1, adm2, etc, and not use the US-centric terms state and cd for a global specification.
  4. Add a new file to the spec, e.g. country-de-types.csv, with the columns local-type and standard-type, with rows like land,adm1 and wahlkreis,constituency.

Discuss. :)

How do you make UIDs in ocd-id's consistent?

Hi, I'm a beginner just getting familiar with your project. I'm mostly interested in your US data, and I had a question on the usage of UIDs in OCD ID's.

I understand this repository holds the canonical OCD ID's for many jurisdictions, but wasn't clear on if there's guidance on whether a bill, or event, could have a canonical ID.

Example

For instance, from the datamade API referenced in your docs, I can get this response from https://ocd.datamade.us/bills/?page=3 (currently)

{
  "results": [
    {
      "classification": [
        "ordinance"
      ],
      "id": "ocd-bill/45b448a4-86f0-4fae-8311-6cf958cf1557",
      "title": "Grant(s) of privilege in public way for Dream, Inc.",
      "subject": [
        "Grants of Privilege"
      ],
      "identifier": "O2020-3422",
      "from_organization": {
        "jurisdiction": {
          "id": "ocd-jurisdiction/country:us/state:il/place:chicago/government",
          "name": "Chicago City Government"
        },
        "id": "ocd-organization/ef168607-9135-4177-ad8e-c1f7a4806c3a",
        "name": "Chicago City Council"
      },
      "updated_at": "2020-07-22T23:51:15.477432+00:00"
    },
[...]

Using that identifier O2020-3422 I can find that bill in the Chicago Legistar. I searched around within Legistar but I couldn't find something that matched the 45b448a4-86f0-4fae-8311-6cf958cf1557 ID to use as a reference.

If I were writing my own scraper, how would I ensure that my representation of the bill in this example, in terms of its generated OCD ID, remains consistent with the one returned from the datamade API? How do I generate that same ID independently of that API?

Along the same lines, if I were to publish some event not tracked by that API, but datamade later scraped the same event, I would want to make sure we ended up with the same generated ID.

The same goes for every other data type that uses UID's (events, organizations, people, votes). Is this up for each implementation to decide, if there's not a canonical ID?

I'm probably missing some behavior that determines this in one of the scraper repos, but I'd appreciate any guidance you can provide on this. Thank you!

New version tag

I'll make a new tag before the end of the day; be sure to let me know if there's any reason to hold off.

Documentation of usage in civil society?

It would be neat to have some documentation/examples or an overview of how OCD IDs are being implemented and utilized in civil society now that we're entering the 2020s.

Has anyone done a "state of OCD" recently?

Incorrect Country Code used for United Kingdom

#156 added OCD IDs for The United Kingdom but used uk for the country code rather than the "gb" from ISO-3166. #181 introduces the parliament constituencies using teh correct gb country code.

You can see #181 for some of the previous discussion. I'm proposing we use the OCD IDs from #181 and alias the IDs from #156 to these new IDs (possibly via a corrections file).

Tagging people likely interested in this change, please voice concerns if this might break how you use these identifiers.
@chris48s @showerst @symroe @sguenther85 @jpmckinney

Missing county equivalents for some U.S. territories

In the Virgin Islands, these county equivalents are assigned the 10 Legal/Statistical Area Description Code by the US Census Bureau:

  • ocd-division/country:us/territory:vi/island:st_thomas, St. Thomas Island
  • ocd-division/country:us/territory:vi/island:st_john, St. John Island
  • ocd-division/country:us/territory:vi/island:st_croix, St. Croix Island

In the Northern Mariana Islands, these county equivalents are assigned the 12 Legal/Statistical Area Description Code by the US Census Bureau:

  • ocd-division/country:us/territory:mp/municipality:saipan, Saipan Municipality
  • ocd-division/country:us/territory:mp/municipality:tinian, Tinian Municipality
  • ocd-division/country:us/territory:mp/municipality:northern_islands, Northern Islands Municipality
  • ocd-division/country:us/territory:mp/municipality:rota, Rota Municipality

In American Samoa, these county equivalents are assigned the 07 Legal/Statistical Area Description Code by the US Census Bureau:

  • ocd-division/country:us/territory:as/district:western, Western District
  • ocd-division/country:us/territory:as/district:eastern, Eastern District
  • ocd-division/country:us/territory:as/district:manu~a, Manu'a District

Also in American Samoa, these places are recognized in the US Census Bureau Tiger/Line US counties shapefile but are not described as county equivalents. Instead, they are assigned the 00 Legal/Statistical Area Description Code:

  • ocd-division/country:us/territory:as/place:rose_island, Rose Island
  • ocd-division/country:us/territory:as/place:swains_island, Swains Island

(OCD ID's above do not currently exists in the country-us.csv list of identifiers)

It seems like modifying these lines of the census_places.py script could catch most of the above cases.

Creating distinct properties for canonicalization and labeling coterminous districts

Presently in the repository there are several aliases established in a few different countries. These are used in two different ways:

When attempting to canonicalize OCD IDs via sameAs you run into some issues:

  • Divisions which are coterminous have the same canonical ID, leading to issues like the one described in #110
  • There's no guarantee that these divisions will remain coterminous in the future. As described in #184. So the canonical ID for a division can shift.

Ideally there should be a coterminousWith property that can be used to annotate in the OCD ID csv files which divisions are coterminous. Then sameAs can be exclusively for canonicalization.

Versioning division properties

So, we need to revise how we do census_geoid a bit.

This works, and did work when we had a single geometry to map to -- the problem is, with the new vintages of the census data, the IDs are all jumbled up a bit.

I'd like to change census_geoid to census_geoid_12, and create a new field, census_geoid_14 for the new set.

Thoughts from others? I'll start working up a PR, but I'll put this here in the meantime.

Convert to datapackage

Would this be a sensible thing to do? Seems like this fits the normal format of scripts + data. Would a PR for this be accepted?

Seems like it might be worth the exercise, as a repo with some many data files would probably bring up pain points in the datapackage toolset worth addressing.

compile.py erroring

Paul/James T (though I know James is on vacation):

Just tried compile.py for the first time, and got this error:
Traceback (most recent call last):
File "./scripts/compile.py", line 201, in
main()
File "./scripts/compile.py", line 184, in main
for k in field_order.copy():
AttributeError: 'list' object has no attribute 'copy'

Might I suggest swapping out (line 184)
for k in field_order.copy():
with
for k in list(field_order):

Also see: http://henry.precheur.org/python/copy_list

verify.py for non-US countries

when I run verify.py for non-US countries (e.g., python3 ./scripts/verify.py fi), the country csv file is created, but then many lines like the following are sent to output. It's annoying, and I bet the fix is easy (or at least I hope):

unexpected geoid for ocd-division/country:us/state:nj/county:gloucester/place:franklin
unexpected geoid for ocd-division/country:us/state:nj/county:gloucester/place:greenwich

Thanks!
Aaron

state geometries?

Per our discussion, it appears that state-level geometries are not in the API. ocd-division/country:us/state:nc/ for example.

Referring to multiple jurisdictions

This is more of a question than a real issue, but bringing it to your attention. For @openelections, some states (like MD) offer election results files that contain results covering all state legislative districts. We're using OCD identifiers to describe the jurisdictions included in results files, and this raised the question: should it be acceptable to refer to multiple jurisdictions of a specific type, for example, something like ocd-division/country:us/state:md/sldl:all? Any thoughts on that?

License

What is the license on these identifiers?

Canada: URL scrapers

I have a very complex script that scrapes URLs of municipalities across Canada from the FCM's website, and matches them to a census subdivision according to their name and province. It produces this file.

There are other sources of URLs, such as CivicInfoBC. I wouldn't base myself off the script I'd written, and instead just start by trying to do straight name matching against the list of census subdivisions for BC (just limit to those whose code starts with "59" to get only BC). There are only a few subdivisions with the same name in BC, in which case you need to match on name plus type.

  • Langley
  • North Vancouver
  • Esquimalt
  • Sechelt
  • Okanagan 1
  • Alert Bay

If this works, we can add others for other provinces. To do for each scraper:

  • Check correctness of URLs (factor out relevant code from FCM scraper)
  • Check overlap with FCM URLs: If total overlap, skip relevant province/territory in FCM scraper

Data sources:

Historical; Orleans and Dakota Territories?

I've been loading some historical US legislative data, and OCD is missing the Territory of Orleans, and the Dakota territory which both sent a few people to congress in the 1800s.
https://en.wikipedia.org/wiki/Territory_of_Orleans
https://en.wikipedia.org/wiki/Dakota_Territory

If I add submit a PR for it, as ocd-division/country:us/territory:ol and ocd-division/country:us/territory:dk with proper start/end dates will you accept it, or is it obscure enough to be out of scope?

If so, should ol get a same_as with the state of Louisana?

Missing division IDs for many districts in NH

For example, Coos 7th district is missing from this file:

https://github.com/opencivicdata/ocd-division-ids/blob/master/identifiers/country-us/census_autogenerated_14/us_sldl.csv

Coos county 1st through 6th is present. Looking at Ballotopedia it appears Coos 7th has been in place since 2012. I see other examples of this in many other NH counties - I can provide a full list if that would be helpful. I'm also happy to work on fixing the problem if someone can give me a hint to get me started. Thanks!

How to handle entities like BART?

First, love the work you're doing here. Just the sort of thing I need for some other projects...

My question is how to handle entities like BART, the regional transit authority in the San Francisco Bay Area.

It covers multiple counties, so can be defined in terms of the boundaries of those counties. Its board is directly elected from equal-population districts, which of necessity have boundaries which cross county lines. So in a hierarchy, it's below the state, above the county.

But then you have entities like Colorado's Regional Transportation District (RTD), which has an elected board, but whose boundaries are not coterminous with the counties it serves.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.