datamade / my-reps

:busts_in_silhouette: Enter your address to find your elected representatives. Powered by the Google Civic Information API
https://myreps.datamade.us
MIT License
70 stars 178 forks source link

Mismatch between divisions and officeIndices #15

Open philipashlock opened 7 years ago

philipashlock commented 7 years ago

It looks like there's a bug that in some cases is not correctly matching the divisions with the associated officeIndices returned from the API.

In this example: http://myreps.datamade.us/#/?address=800%20Hastings%20Ave%2C%20Port%20Townsend%2C%20wa%2098368

The officeIndices 15-20 are supposed to be displayed with ocd-division/country:us/state:wa/county:jefferson and officeIndices 21 is supposed to displayed with ocd-division/country:us/state:wa/county:jefferson/council_district:1 but instead all those offices (15-21) are displayed under ocd-division/country:us/state:wa/county:jefferson/school_district:port_townsend_school_district which doesn't actually have any officeIndices included in the API response.