GovTrack Wiki

Bill XML

From GovTrack.us Wiki

Jump to: navigation, search

Bill XML files contain the full status of each introduced bill in Congress. The information is derived from what is on THOMAS. These files are in data/us/SESSION/bills.

Each file is named by a bill type prefix followed by the bill's number, and the extension .xml, such as "h123.xml". The bill type prefixes are given below. These are precisely what THOMAS uses.

  • h: House Bill (i.e. H.R.)
  • hr: House Resolution (i.e. H.Res.)
  • hj: House Joint Resolution (i.e. H.J.Res.)
  • hc: House Concurrent Resolution (i.e. H.Con.Res.)
  • s: Senate Bill (i.e. S.)
  • sr: Senate Resolution (i.e. S.Res.)
  • sj: Senate Joint Resolution (i.e. S.J.Res.)
  • sc: Senate Concurrent Resolution (i.e. S.Con.Res.)

Bill numbers, of course, restart in each two-year session.

The format of the XML file is:

  • bill root element
    • attributes:
      • session: The session (i.e. Congress) that this bill is a part of (i.e. 110).
      • type: The type of the bill (h, hr, hc, etc., as above).
      • number: The number of the bill.
      • updated: The date the bill XML file was last updated, such as "2007-01-05T15:30:39-05:00".
    • status element: Contains a node indicating the current status of the bill. The element inside is one of:
      • introduced: The bill has been introduced (and possibly referred to committee), and that's it. Has a datetime attribute giving the date the bill was introduced, such as "2007-01-04".
      • calendar: The bill has passed through committee and has been put on a legislative calendar. Has a datetime attribute.
      • vote: The bill was voted on in the chamber it was introduced in. Has a datetime attribute giving the date (and possibly time) of the vote. where attribute is either "h" or "s". result attribute is either "pass" or "fail". how attribute is the method of the vote, such as "voice vote", or "roll" if it was a roll call vote. For a roll call vote, the roll attribute gives the number of the vote. (Get the year from the date to match this to a vote XML file.) Note that, for instance, simple resolutions end their life span after their first vote, and so this status can indicate a successful life in that case.
      • vote2: The bill was voted on also in the other chamber. Same attributes as vote.
      • topresident: The bill passed both chambers and is being presented to the president. Has a datetime attribute.
      • signed: The president has signed the bill. Has a datetime attribute.
      • veto: The president has vetoed the bill. Has a datetime attribute.
      • override: A veto override was attempted. Same attributes as vote.
      • enacted: The bill has been enacted. Has a datetime attribute.
    • introduced element: datetime attribute gives the date the bill was introduced.
    • titles element:
      • title element, once for each title given to the bill. The element content has the text of the title. type attribute is "official", "short", or "popular", and as attribute is the status of the bill in which the title was assigned, such as "introduced". This is all as given by THOMAS.
      • The elements are in the order that they appear in THOMAS, which is chronological order, so the last element tells you the last as status available.
    • sponsor element: Most bills have sponsors, and in that case the id attribute is the GovTrack ID of the person sponsoring the bill. Otherwise, a none attribute is set to true if the bill has no sponsor, which has been the case for debt limit raising bills.
    • cosponsors:
      • cosponsor element: Once for each cosponsor. id attribute gives the ID of the cosponsor. (ID attribute is always present.)
    • actions:
      • These elements come in various forms. In all cases, the node (whatever it is), has a text subnode containing a description of the action. It may also have reference subnodes (siblings of the text node) that indicate references to pages in the Congressional Record, as given in THOMAS.
      • vote nodes represent votes on the passage of bills. The where attribute is h or s indicating where the vote took place. type is vote for the vote in the originating chamber, vote2 for the vote in the other chamber, override if the vote is on a veto override. result is pass or fail. how is a textual description of how the vote was conducted, or the string roll if it was a roll call vote, in which case the roll attribute gives the roll call number. suspension may be set to 1 and indicates that the vote was conducted under a suspension of the rules (i.e. On motion to suspend the rules and pass), which requires a 2/3 vote.
      • vote-aux nodes are for other votes. type is conference for conference reports, or cloture for a motion in the Senate to invoke cloture on a motion to proceed to consideration.
      • Other actions are:
      • calendar: Bill was put on a legislative calendar or ordered to be reported by a committee.
      • topresident: Cleared for White House or Presented to President.
      • signed: Signed by president.
      • veto: Vetoed by president.
      • enacted: Bill was enacted. type and number attributes give the law number assigned to the bill.
    • committees:
      • committee element: Once per committee or subcommittee assignment. name attribute gives the name of the main committee. subcommittee attribute is "" for main committee assignments, otherwise the name of the subcommittee. activity attribute give some additional information that I do not understand.
Personal tools