unitedstates / congress-legislators

Members of the United States Congress, 1789-Present, in YAML/JSON/CSV, as well as committees, presidents, and vice presidents.
Creative Commons Zero v1.0 Universal
2.06k stars 505 forks source link

Fix term date errors that prevented assigning Congress numbers to terms #721

Closed JoshData closed 4 years ago

JoshData commented 4 years ago

...

JoshData commented 4 years ago

Ok so one of our old issues (#185) was that we wanted to put a Congress number (or range) on each term. But the historical data had a lot of errors (mostly from senate appointments, possibly because my original scrape of bioguide didn't work right) where the date ranges on the terms didn't line up with valid term ranges, like senate terms longer than six years, or missing term boundaries where we know there should be according to the senate class.

This PR adds a test that checks that each term corresponds to a Congress number or valid range and fixes all of the remaining data errors so that now the test passes.

After this, we can go back and solve #185.

JoshData commented 4 years ago

I added a second commit that fixes overlapping terms in historical data. We had a test that was disabled for historical data because of these errors. Now the test is enabled and there are no failures.