Code Monkey home page Code Monkey logo

govtrack.us-web's People

Contributors

amyewest avatar benhammer avatar biw avatar divergentdave avatar gphemsley avatar joelcollinsdc avatar joshdata avatar lorien avatar mjumbewu avatar sshevlyagin avatar tchamberlin avatar wbt avatar wpoosanguansit avatar yzaya 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

govtrack.us-web's Issues

Embedding of Congressional Maps Doesn't Work

Hello,

I'm working on doing a diary of Colorado's 5th Congressional District and would like to use the embedding option to allow my blog diary to show up the map. However, the code I insert into my diary doesn't allow me to do this.

How can I make this work?

Here's the link to the info on the district: http://www.govtrack.us/congress/members/CO/5
Below is the code I used from the embedding option:

<iframe width="425" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.govtrack.us/congress/members/embed/mapframe?state=co&district=5&bounds=-112.417,43.297,-98.684,34.421"></iframe>

Missing Congressman from data file

Hello - it looks like there is a congressman that has been omitted from one of the XML data files. Thomas Downey served the 2nd district of New York for Congresses 94 through 102 but he seems to be missing from the 94th Congress data file:

http://www.govtrack.us/data/us/94/people.xml

Here is his Wikipedia page: http://en.wikipedia.org/wiki/Thomas_Downey
And his bioguide: http://bioguide.congress.gov/scripts/biodisplay.pl?index=D000471

I use an applet that relies on the people files, so if you could correct this quickly, it would be much appreciated.

Thanks,
Jeremy

Problem with Thomas Downey

Thomas Downey / 1975-01-14 to 1976-10-01 / Representative is one of these?
    Thomas Downey / 1977-01-04 to 1978-10-15 / Representative
    Thomas Downey / 1979-01-15 to 1980-12-16 / Representative
    Thomas Downey / 1981-01-05 to 1982-12-23 / Representative
    Thomas Downey / 1983-01-03 to 1984-10-12 / Representative
    Thomas Downey / 1985-01-03 to 1986-10-18 / Representative
    Thomas Downey / 1987-01-06 to 1988-10-22 / Representative
    Thomas Downey / 1989-01-03 to 1990-10-28 / Representative
    Thomas Downey / 1991-01-03 to 1992-10-09 / Representative
{'bio': {'birthday': '1949-01-28', 'gender': 'M'},
 'id': {'bioguide': 'D000471',
        'govtrack': 403581,
        'icpsr': 14214,
        'thomas': '00314',
        'wikipedia': 'Thomas Downey'},
 'name': {'first': 'Thomas', 'last': 'Downey', 'middle': 'Joseph'},
 'terms': [{'district': 2,
            'end': '1976-10-01',
            'party': 'Democrat',
            'start': '1975-01-14',
            'state': 'NY',
            'type': 'rep'},
           {'district': 2,
            'end': '1978-10-15',
            'party': 'Democrat',
            'start': '1977-01-04',
            'state': 'NY',
            'type': 'rep'},
           {'district': 2,
            'end': '1980-12-16',
            'party': 'Democrat',
            'start': '1979-01-15',
            'state': 'NY',
            'type': 'rep'},
           {'district': 2,
            'end': '1982-12-23',
            'party': 'Democrat',
            'start': '1981-01-05',
            'state': 'NY',
            'type': 'rep'},
           {'district': 2,
            'end': '1984-10-12',
            'party': 'Democrat',
            'start': '1983-01-03',
            'state': 'NY',
            'type': 'rep'},
           {'district': 2,
            'end': '1986-10-18',
            'party': 'Democrat',
            'start': '1985-01-03',
            'state': 'NY',
            'type': 'rep'},
           {'district': 2,
            'end': '1988-10-22',
            'party': 'Democrat',
            'start': '1987-01-06',
            'state': 'NY',
            'type': 'rep'},
           {'district': 2,
            'end': '1990-10-28',
            'party': 'Democrat',
            'start': '1989-01-03',
            'state': 'NY',
            'type': 'rep'},
           {'district': 2,
            'end': '1992-10-09',
            'party': 'Democrat',
            'start': '1991-01-03',
            'state': 'NY',
            'type': 'rep'}]}
parser.person_parser: 
Traceback (most recent call last):
  File "/Users/gphemsley/Development/Government/GitHub/govtrack/govtrack.us-web/parser/person_parser.py", line 251, in main
    raise Exception("There is an unmatched role.")
Exception: There is an unmatched role.

Include text of amendments voted on

I seem to recall chatter about gathering this data over at @unitedstates, but I don't know what the outcome was. If we could, it would be really helpful to know what amendments Congress was voting on. (Otherwise, votes like "On Agreeing to the Amendment: Amendment 1 to H R 444" are mostly useless.)

Collapse bill subjects to allow better inter-Congress navigation

Right now, it seems that bill subjects with the same names are separated by Congress by being assigned different IDs.

For example, the subject "Intellectual property" does not bring up all bills related to intellectual property (in fact, it 404s):
http://www.govtrack.us/congress/bills/subjects/intellectual_property

Instead, the subject is separated into different categories based on a Congress-specific ID:
http://www.govtrack.us/congress/bills/subjects/intellectual_property/5927
http://www.govtrack.us/congress/bills/subjects/intellectual_property/3260?congress=109

In fact, even the URLs are messy: Without the 'congress' parameter, that second link would return 0 bills. I suppose this extends from the fact that these bill subject pages are treated as searches, but setting the Congress to "All" in the resulting search page box seems to return literally all bills, not just those related to the subject of intellectual property.

Explain procedural votes more fully

Right now, votes like "On Motion to Recommit with Instructions" are only explained by saying that they are procedural votes. It would be cool if we could elaborate on what the rules of order are and exactly what each of these procedural vote types are for.

Improve handling of historical parties

We should standardize the names and colors of historical parties so that they seem like first-class citizens on the site, instead of just hacked into the Republican/Democrat system.

Don't use GitHub-like ellipsis in long bill titles

This is something that GitHub does in its commit message display, and it drives me nuts. It really amounts to two simple concepts:

  1. Don't break for ellipsis in the middle of a word.
  2. Don't display the continuation of the ellipsis in smaller text right underneath the large text.

The first concept is much more important than the second one, but I think they are both good concepts. (It's one thing if you have to cut off a bill title to save space on a search page or something, but if you're just going to list the rest of the title right underneath it, why bother separating it into two different-sized texts?)

V2 of vote_voter API Method returning error on chamber filter

When I attempt to filter the V2 of the vote_voter API method on chamber I receive the following error:

Invalid filter: ValueError("invalid literal for int() with base 10: 'house'",)

Here is the URL I am trying [I am unsure what values vote__session is to expect, but I receive the error regardless if I do or do not include the vote__session filter]:

http://www.govtrack.us/api/v2/vote_voter/?vote__congress=95&vote__number=461&vote__chamber=house&vote__session=2&limit=441

Are the /vote/ and /vote_voter/ APIs down / no longer available?

My org uses the GovTrack Data API, and particularly the /vote/ and /vote_voter/ APIs...

Last week I've noticed they've stopped working... there are examples listed on the API documentation page but I've noticed the 'API Access Points and Schemas' section does not mention the Vote resources...

Is this a recent change, or is it just temporarily down?

Example links from API documentation:
http://www.govtrack.us/developers/api#endpoint_vote

First example from above link (doesn't work - none of the /vote/ and /vote_voter/ API calls work any longer):
http://www.govtrack.us/api/v1/vote/?congress=112&session=2011

HTTPS certificate problems

I don't know if HTTPS support is intended, but I gave it a shot, and it seems there are some issues:

www.govtrack.us uses an invalid security certificate.

The certificate is not trusted because it is self-signed.
The certificate is only valid for occams.info
The certificate expired on 9/19/11 3:26 PM. The current time is 5/23/13 2:14 PM.

(Error code: sec_error_expired_issuer_certificate)

List all votes on a bill, not just the most recent one

AFAICT, if a bill has made in through multiple votes (e.g. if was signed by the President and became law), only the most recent vote is listed on the page. So, for example, if I go to the Hurricane Sandy relief bill, I only see the vote in the House that ultimately passed the bill and got it to the President's desk. I cannot easily see the Senate vote, or the original House vote (which this bill must've had, since it's an HR bill), or any amendment votes, etc. All of these votes are ultimately useful to some extent or another, and it would be good to show them. (Or else, we have a lot of orphaned roll call votes: you can get to the bill from the vote, but you can't get to the vote from the bill.)

Allow tracking of old bills to alert if they are reintroduced

It used to be that you could track bills from Congresses that were not the current one. This seems to have been disabled, presumably because bills from old Congresses are not likely to generate new alerts.

However, it could be useful to track old bills in order to be alerted if related/similar bills are introduced in later Congresses.

Update README

Explain how to get the source code running locally.

Improve support for committees

Right now, the site sort of treats committees as somewhat incidental—and that might be because there isn't much information provided about them. But really, committees are where most of the work in Congress is done. It would be good if the work of the committees is emphasized more.

One way to do that, if the information is available, is to show the vote information for getting bills out of committee. (I know I sometimes see notes in the news about what a committee vote has been.)

Another way might be to give some statistics, in a more in-your-face way than just a geeky subpage somewhere, about how many bills are introduced in each committee, which committees have the most bills, which committees don't do very much, the ratio of introduced to passed bills for each committee, etc. That could help to substantiate (or refute) when the media refers to important/influential committee positions.

Ditch the "-0" in the header for at-large areas

On GovTrack's top bar, I got the message:

Live in DC-0? Check up on Del. Eleanor Norton.

It'd be a lot less confusing if the "-0" were dropped.

For numbered districts, you'd probably get more mileage out of phrasing it out anyway, like "Live in Virginia's 7th District?"

List new number and makeup of cosponsors in e-mail notification

The e-mail notification for the addition of cosponsors only lists the new ones, which is only so useful.

It would be even more useful if it also listed what the additional cosponsors means for the bill: how many cosponsors does it now have, and what are their party affiliations?

Sort tracking lists in an intuitive way

It's not clear to me that there is any rhyme or reason to the sorting order of lists at this point. (I'm not even sure that it's listed by the date the item was added to the list.) There should be some order to the list.

The best way to handle this, I think is to separate the different types of items that can be tracked into distinct sections within the list, then sort by current vs. historical (Congress, years in office, etc.), then sort alphabetically.

Alternatively, if the separation of types is too ambitious, the other sort orders could still apply.

API not producing valid JSON

I've run out of time to check the source, but I'm unable to get valid JSON

wget http://www.govtrack.us/api/v2/vote/?congress=112&chamber=house&session=2011
to test.json
JSON.parse("test.json") --> 
JSON::ParserError: 387: unexpected token at '"To authorize the Secretary of Homeland Security to make grants for public-private partnerships that finance equipment and infrastructure to improve the public safety of persons who are residents of rural areas of the United States near the border with Mexico by enhanci'
    from /Users/tim/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/json/common.rb:148:in `parse'
    from /Users/tim/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/json/common.rb:148:in `parse'
    from (irb):3
    from /Users/tim/.rvm/rubies/ruby-1.9.3-p392/bin/irb:16:in `<main>'

I've been able to find others with invalid json:

\?congress=112\&current_status=introduced
JSON.parse(file.read)
JSON::ParserError: 387: unexpected token at ''

Please let me know if I can provide any additional information.

Move contents of "Related" tab to "Overview" tab

It doesn't seem to me that the contents of the "Related" tab is intuitively distinct enough to be separated from the "Overview" tab. It can probably be easily integrated into (or underneath) the box on the right side of the "Overview" tab.

Citation ranges get broken links

I noticed that at least some of the detected citation ranges are passing on the full range in the link that gets constructed to Cornell:

For example, in the list for H.R. 933 "16 U.S.C. 3839aa-3839aa-8" gets linked to http://www.law.cornell.edu/uscode/text/16/3839aa-3839aa-8, which redirects for some reason to http://www.law.cornell.edu/uscode/text/16/3441, which isn't the right place.

The most correct place to link is probably http://www.law.cornell.edu/uscode/text/16/3839aa. So you'd look for a dash, and if it's there, just use everything before the dash.

Improve dots in vote details

Right now, vote details have dots which represent the spread of the vote. These dots use nonstandard markup (each is a with nonstandard attributes) and sometimes run into each other. It would be good to improve these to use standard markup and allow for better distinction between adjacent dots.

List bill number first in page title

As it stands now, the bill number comes towards the end of the page title, which can make it hard to navigate multiple tabs/windows open. (It's hard to differentiate between the various "An Act to..." pages, for example.) If the bill number were listed at the front of the page title, it could be more helpful.

But I imagine that the number was included towards the end for a reason, so I'm wondering what the motivation for that was.

Votes might also benefit from title rearrangement, since they tend to start with the bill number and title, rather than the number or name of the vote.

Bring back the vote maps

I just had a sudden flashback of update e-mails with maps that showed what the votes looked like on a map of the United States. What ever happened to those?

address

The api does not provide a way to find a legislator by address. There should be some way of doing that within the api.

How to get the related bills.

How do we get all the bills related to a bill through the API?

I want to build up a list of bills and and related bills for each bill.

django.db.utils.DatabaseError: no such column: bill_bill.sliplawpubpriv

$ ./parse.py bill --congress=113
parser.bill_parser: Processing old bill terms
parser.bill_parser: Processing new bill terms
parser.bill_parser: Parsing bills of only congress#113
parser.bill_parser: Processing bills: 2453 files
Traceback (most recent call last):
  File "./parse.py", line 111, in <module>
    main()
  File "./parse.py", line 81, in main
    main2()
  File "./parse.py", line 104, in f
    return func(*args,**kwargs)
  File "./parse.py", line 77, in main2
    getattr(parser, kwargs.method)(kwargs)
  File "/Users/gphemsley/Development/Government/GitHub/govtrack/govtrack.us-web/parser/bill_parser.py", line 303, in main
    b = Bill.objects.get(congress=m.group(1), bill_type=BillType.by_xml_code(m.group(2)), number=m.group(3))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/db/models/manager.py", line 131, in get
    return self.get_query_set().get(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/db/models/query.py", line 361, in get
    num = len(clone)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/db/models/query.py", line 85, in __len__
    self._result_cache = list(self.iterator())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/db/models/query.py", line 291, in iterator
    for row in compiler.results_iter():
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/db/models/sql/compiler.py", line 763, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/db/models/sql/compiler.py", line 818, in execute_sql
    cursor.execute(sql, params)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/db/backends/sqlite3/base.py", line 344, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: no such column: bill_bill.sliplawpubpriv

Recommend bills to follow

We should have some sort of algorithm that recommends bills to follow based on bills, topics, and people that you follow.

Reconcile yui-compressor and yuicompressor

The installation instructions suggest using the OS package manager to install yui-compressor (note the hyphen). However, this is not available as a package on Mac, AFAICT.

However, Python does have a package named yuicompressor (note the lack of hyphen) that can be installed with easy_install (or pip, presumably):

https://pypi.python.org/pypi/yuicompressor

Unfortunately, the minify script requires the hyphen, while the Python version lacks it.

I recommend switching to using the hyphen-less version, listing it in the pipreq.txt file.

"See more" link in search results implies all Congress

When you search for something and get a list of possibly-related bills (sorted descendingly by Congress), they are followed by a link that says "See more". This implies that you will see a list of all bills that match the search term—in all Congresses. However, the search results that you actually get are only in the current Congress, even though those results were likely all already shown on the previous page (or should have been).

Bug: Adding Multiple Items to Lists

There appears to be a bug in the website's ability to add multiple issues to track under separate lists. I've tried creating two separate lists and adding different tracking content to the separate lists. If I click on the second list to add new content, the site will be added to the first list instead. There is no way to get content listed to the second list.

Better handle unknown districts

I recall seeing some early votes where the district was listed as "-1" because it was unknown. However, there doesn't seem to be any special handling built-in for such unknown districts. (For example, it was listed as "-1th" instead of "-1st" or "unknown".)

Improve handling of candidates changing parties

We've previously discussed what to do with candidates who change parties during their tenure. I don't remember if we ever settled on a method, but at the very least we should avoid the slash-separated names like "Independent/Republican" which glom together what are actually temporally distinct descriptions.

Use the same format for vote threshold as vote results

Votes are displayed using absolute and percentage numbers for each option, but the "required" value is only displayed as a fraction. It would be better for users if this "required" value was also shown as absolute and percentage numbers. (So, for example, "3/5" in the Senate would also be shown as 60 votes or 60%, assuming the membership is at 100.)

Clean up CSS

There are a number of redundant vendor-prefixed properties in the CSS that are not needed for modern browsers. In most cases, fallback in older browsers will not be too negatively affected, as these are mostly just style flourishes.

These properties can be simplified:

  • border-radius
  • linear-gradient
  • box-shadow
  • white-space: pre-wrap
  • border-top-right-radius
  • border-bottom-right-radius
  • border-top-left-radius
  • border-bottom-left-radius
  • background-clip

These properties are proprietary and should probably not be used:

  • -webkit-font-smoothing
  • filter (IE)
  • zoom

The use of these properties should probably be re-evaluated:

  • text-size-adjust
  • box-sizing
  • ::-webkit-input-placeholder
  • @-moz-document

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.