NHLA Liberty Ratings
v1.1.0Liberty Ratings for every New Hampshire state legislator since 2006, and who represents a town.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
grade_key
What each grade means for a given year, the percentage band it covered, and how many legislators received it. The bands change from year to year.
| Parameter | Type | Description |
|---|---|---|
year | integer | the rating year; defaults to the most recent session |
legislator_record
One legislator's Liberty Rating in every session they served, found by name, slug, personId or employeeNo. Joins the two employee numbers a member holds if they moved between the House and the Senate.
| Parameter | Type | Description |
|---|---|---|
legislator * | string | a name, slug, personId or employeeNo |
fromYear | integer | earliest session to report |
toYear | integer | latest session to report |
legislator_votes
The roll calls NHLA scored in one session, how a legislator voted on each, and whether that matched NHLA's position. Optionally filtered to one bill, or with only to the votes against NHLA's position, with it, or missed. For "where did they vote against NHLA" pass only: "against" rather than reading every roll call.
| Parameter | Type | Description |
|---|---|---|
legislator * | string | a name, slug, personId or employeeNo |
bill | string | limit to one bill, e.g. HB609 |
limit | integer | how many roll calls to return; default 50, maximum 200 |
only | string | return only the roll calls where they voted 'against' NHLA's position, voted 'with' it, or 'missed' the vote; omit for all |
year | integer | the session; defaults to the most recent one they served |
legislators_for_town
Every state representative and senator for a New Hampshire town, with their Liberty Rating. Use this for "who represents me". A town is usually in more than one district; report all of them. For a city divided into wards, pass the ward. Given only a ZIP code, pass zip; a ZIP code covering several towns comes back asking which one.
| Parameter | Type | Description |
|---|---|---|
town | string | the town or city, spelled as a person would type it; pass this or zip |
ward | integer | the ward number, in a city divided into wards |
year | integer | the rating year; defaults to the most recent session |
zip | string | a five-digit ZIP code, when the person gave that instead of a town |
top_legislators
Ranks legislators statewide by Liberty Rating score for one session: the highest or the lowest scorers, in the House, the Senate or both, optionally within one party. Use this for "who scored highest", "the ten best senators" or "the lowest-rated Republicans". Legislators tied at the cut are all returned.
| Parameter | Type | Description |
|---|---|---|
chamber | string | 'house' or 'senate'; omit to rank both chambers together |
limit | integer | how many to list; default 10, maximum 50. Legislators tied with the last one listed are always included |
order | string | 'highest' (the default) or 'lowest' |
party | string | limit to one party: 'R', 'D', 'L' or 'I' (or the party's name) |
year | integer | the rating year; defaults to the most recent session |