Too many and too few legislators in a few json files

32 views
Skip to first unread message

Joseph Elfelt

unread,
Apr 3, 2017, 9:46:47 AM4/3/17
to Open States
I am getting closer to finishing my project to produce Google + GIS maps that show all the state legislative districts.  Along the way I have done some data validation on json files produced by the openstates API and have noticed a few cases of extra or missing data.  If there is a better way to report that kind of info other than posting in this forum, please let me know.

The json files on which I did the data validation are the downloads for each state.

The ‘extra’ legislators are all shown in the json files to be ‘active’.  I have confirmed the correct number of seats.  My data validation was just doing a simple count so I do not know which names need to be deleted from the openstates data.

When someone clicks a district on the maps I am producing, then my code makes an API call to openstates and displays a popup with info on the person(s) representing that district.  For example, here is the API call that my code would make if someone is looking at the Wyoming house map and clicks district 6:

https://openstates.org/api/v1/legislators/?state=wy&chamber=lower&district=6
The above call returns 2 ‘active’ names.  However, Wyoming only has 1 representative per district.

Does openstates have software it can run to fix these issues or does identifying the names that need to be deleted require a bunch of manual work?

Here is a list of the data problems that I have found.

Arkansas
json_state_house_seats = 119 Correct value = 100
json_state_senate_seats = 39 Correct value = 35

Colorado
json_state_house_seats = 66 Correct value = 65
json_state_senate_seats = 36 Correct value = 35

Connecticut
house district not in json:  115
senate district not in json:  2 and 32

Delaware
json_state_senate_seats = 22 Correct value = 21

Louisiana
json_state_house_seats = 108 Correct value = 105

Missouri
house district name not in json:  50
senate district name not in json:  28

New York
json_state_house_seats = 151 Correct value = 150
json_state_senate_seats = 31 Correct value = 29

Utah
json_state_house_seats = 88 Correct value = 75
json_state_senate_seats = 31 Correct value = 29

Virginia
json_state_house_seats = 104 Correct value = 100
json_state_senate_seats = 44 Correct value = 40

Vermont
json_state_house_seats = 156 Correct value = 150

Wyoming
json_state_house_seats = 79 Correct value = 60
json_state_senate_seats = 37 Correct value = 30

Joseph Elfelt
https://mappingsupport.com

Joseph Elfelt

unread,
Apr 4, 2017, 8:03:37 AM4/4/17
to Open States
This is the kind of API call that I am using to grab a json file for a state:
https://openstates.org/api/v1/legislators/?state=NH

Also, the data for Maine needs a tweak.
json_state_house_seats = 152 Correct value = 151

Joseph Elfelt

Joseph Elfelt

unread,
Apr 4, 2017, 9:49:28 AM4/4/17
to Open States
New Hampshire
json_state_house_seats = 372 Correct value = 400

Joseph

Joseph Elfelt

unread,
Apr 4, 2017, 10:06:12 AM4/4/17
to Open States
I have now finished checking all the states.
This is the last one I found that needs tweaking.

Massachusetts
json_state_house_seats = 161 Correct value = 160

Joseph

Ed Staub

unread,
Apr 4, 2017, 2:46:20 PM4/4/17
to Open States
Joseph,

Nice work!

I'm not a member of the project, but I believe the best way to get these (eventually) addressed is to enter them as separate issues (one per state) at https://github.com/openstates/openstates/issues.  Each state has it's own steward(s) who deal with data problems specific to that state.  Put the state at the beginning of each title, like the other issues.  You'll see a fair number of similar data-integrity issues there from me.

-Ed

Ed Staub

unread,
Apr 4, 2017, 3:01:13 PM4/4/17
to Open States
Sorry, one more thing: if you can identify particular legislator(s) that are either missing or mistakenly present, it will save time for others and thus be addressed quicker.
-Ed

On Tuesday, April 4, 2017 at 10:06:12 AM UTC-4, Joseph Elfelt wrote:

Joseph Elfelt

unread,
Apr 4, 2017, 3:21:56 PM4/4/17
to fifty-sta...@googlegroups.com
Thanks Ed.

I noticed that one state has already been fixed.

Either this evening or tomorrow I will rerun my analysis and the report any remaining issues as you describe.

Joseph


--
You received this message because you are subscribed to a topic in the Google Groups "Open States" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fifty-state-project/xnOvXAAWydk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fifty-state-project+unsub...@googlegroups.com.
To post to this group, send email to fifty-state-project@googlegroups.com.
Visit this group at https://groups.google.com/group/fifty-state-project.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages