Loading ...
Sorry, an error occurred while loading the content.
 

Re: Initial source code release

Expand Messages
  • tay199
    YEAH! Thanks Josh. I ll keep the group posted on any patches or things of value we find and can contribute. Taylor
    Message 1 of 8 , Jul 6, 2007
      YEAH! Thanks Josh. I'll keep the group posted on any patches or things
      of value we find and can contribute.

      Taylor
    • Kevin Henry
      Great, thanks Josh... I didn t do much scripting (proper) for http://www.whereabill.org/, but since Josh has started the ball rolling, I ll add in the one
      Message 2 of 8 , Jul 8, 2007
        Great, thanks Josh...

        I didn't do much scripting (proper) for http://www.whereabill.org/,
        but since Josh has started the ball rolling, I'll add in the one
        script I did write: an XSLT file that takes the XML version of Josh's
        people database
        (http://www.govtrack.us/data/us/110/repstats/people.xml) and extracts
        the people/roles relevant to a single specified Congressional session.

        The problem (for my purposes, which include sending this information
        to the browser client on each request) is that the people.xml file is
        large (6.3MB), and includes lots of dead people. :) So I use this
        script to get only the information for a particular Congress.

        Kevin


        bioseparate.xml:

        <?xml version="1.0" encoding="UTF-8"?>
        <xsl:stylesheet version='1.0'
        xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
        xmlns:exsl="http://exslt.org/common">
        <xsl:output method="xml" version="1.0" encoding="ISO-8859-1"
        indent="yes"/>

        <xsl:param name="congress">110</xsl:param>

        <xsl:template match="people">
        <xsl:copy>
        <xsl:variable name="striprole">
        <xsl:for-each select="person">
        <xsl:copy>
        <xsl:copy-of select="@*"/>
        <xsl:copy-of select="role[(((number($congress)*2 + 1787) >=
        number(substring-before(@startdate,'-'))) and ((number($congress)*2 +
        1787) <= number(substring-before(@enddate,'-')))) or
        (((number($congress)*2 + 1788) >=
        number(substring-before(@startdate,'-'))) and ((number($congress)*2 +
        1788) <= number(substring-before(@enddate,'-'))))]"/>
        </xsl:copy>
        </xsl:for-each>
        </xsl:variable>
        <xsl:for-each select="exsl:node-set($striprole)/person[role]">
        <xsl:copy-of select="."/>
        </xsl:for-each>
        </xsl:copy>
        </xsl:template>

        </xsl:stylesheet>
      • damianmont
        Kevin, Love that www.WhereaBill.org site. You use the information from josh s xml files? Love the mashup, very well done.
        Message 3 of 8 , Jul 10, 2007
          Kevin,

          Love that www.WhereaBill.org site.
          You use the information from josh's xml files?

          Love the mashup, very well done.

          --- In govtrack@yahoogroups.com, "Kevin Henry" <k@...> wrote:
          >
          > Great, thanks Josh...
          >
          > I didn't do much scripting (proper) for http://www.whereabill.org ,
          > but since Josh has started the ball rolling, I'll add in the one
          > script I did write: an XSLT file that takes the XML version of Josh's
          > people database
          > (http://www.govtrack.us/data/us/110/repstats/people.xml) and extracts
          > the people/roles relevant to a single specified Congressional session.
        • Peggy Garvin
          I d like to know, too. I am writing a brief article (right now, due tomorrow) about some of the new legislative info projects and want to mention whereabill as
          Message 4 of 8 , Jul 10, 2007
            I'd like to know, too. I am writing a brief article (right now, due tomorrow) about some of the new legislative info projects and want to mention whereabill as well as a sample of sites that have used Govtrack's file.

            Thanks,
            Peggy Garvin
            peggy -at- garvinconsulting.com


            damianmont <photoca@...> wrote:
            Kevin,

            Love that www.WhereaBill. org site.
            You use the information from josh's xml files?

            Love the mashup, very well done.

            --- In govtrack@yahoogroup s.com, "Kevin Henry" <k@...> wrote:
            >
            > Great, thanks Josh...
            >
            > I didn't do much scripting (proper) for http://www.whereabi ll.org ,
            > but since Josh has started the ball rolling, I'll add in the one
            > script I did write: an XSLT file that takes the XML version of Josh's
            > people database
            > (http://www.govtrack .us/data/ us/110/repstats/ people.xml) and extracts
            > the people/roles relevant to a single specified Congressional session.


          • Kevin Henry
            Peggy and Damian, Thanks, glad you like the site. I m getting all the data from govtrack. Specifically, I m using the following files: - the bill status data
            Message 5 of 8 , Jul 11, 2007
              Peggy and Damian,

              Thanks, glad you like the site.

              I'm getting all the data from govtrack. Specifically, I'm using the
              following files:

              - the bill status data (www.govtrack.us/data/us/*/bills/*.xml)
              - the roll vote data (/data/us/*/rolls/*.xml)
              - the people database (/data/us/110/repstats/people.xml)
              - the popularity listing (/data/us/bills.technorati.xml)
              - the search service (/congress/billsearch_api.xpd)

              I keep a copy of all the files on my server, and do a daily rsync (as
              Josh describes here: http://www.govtrack.us/source.xpd) to stay current.

              Basically, when the server gets a request for a certain bill, it
              retrieves the status data and goes through the action items, parsing
              them into the steps that will be represented in the "driving
              directions". It also retrieves any relevant roll vote data, and then
              sends that information (along with the summary, the titles, the list
              of sponsors, and the biographical data for that session of Congress)
              back to the client, which renders everything (with the help of the
              Google Maps API).

              So it's really a (sort-of) UI sitting on top of govtrack's (sort-of) API.

              Let me know if you need any more information...


              Regards,
              Kevin
              http://www.whereabill.org/
            Your message has been successfully submitted and would be delivered to recipients shortly.