[HN Gopher] Congress.gov API
       ___________________________________________________________________
        
       Congress.gov API
        
       Author : ElevenLathe
       Score  : 720 points
       Date   : 2022-09-08 18:40 UTC (1 days ago)
        
 (HTM) web link (api.congress.gov)
 (TXT) w3m dump (api.congress.gov)
        
       | carapace wrote:
       | Blank page with JS disabled.
        
         | mrlatinos wrote:
         | Try enabling JavaScript. Fixed it for me
        
           | carapace wrote:
           | Thanks!
        
       | mooreed wrote:
       | At first I was amused to consider what a 'POST, PUT, DELETE'
       | means for this API. Then I realized that the conceptual meanings
       | are straight forward. Then I realized that democracy is a fancy
       | authorization regime for doling out 'write access'.
       | 
       | (Added edit) I too agree with the sentiments that a v2 should
       | have a finer grain resolution where the data model would
       | recognize a bill as a collection of clauses or statements. And
       | attribution and intent of those clauses would be transformative
       | (I think) for regular citizens.
       | 
       | Because then the internet would be able to track unintended
       | consequences by author. This is arguably what the internet does
       | best.
        
       | smashah wrote:
       | I hope one day we move government policy and legislation onto a
       | git-like version control system so we can see the history of law
       | itself.
        
       | breck wrote:
        
       | anigbrowl wrote:
       | Wikiocracy > representative government
        
         | pphysch wrote:
         | If a "wikiocracy" is where shadowy, unaccountable hierarchies
         | manipulate policy to their will while pretending to be
         | democratic about it, then yeah we live in one but I'm not sure
         | it's better than a representative system.
        
       | princevegeta89 wrote:
       | BTW, we are missing an API to delete congress people by name
        
         | lapetitejort wrote:
         | Why does it matter if a congress person can be deleted when
         | party_affiliation seems to be a protected field?
        
       | spullara wrote:
       | This would be way better in a database than as an API.
        
         | aabhay wrote:
         | API can have predictable access patterns.
        
       | TheLocehiliosan wrote:
       | This is pretty cool, but...
       | 
       | Authentication seems to be done with a query string ?api_key=KEY
       | instead of some kind of standard header.
       | 
       | Also, there is a query string "format" for changing the output,
       | ?format=json. Instead of using the Accept header :/
        
         | alxlu wrote:
         | I was able to get it working with the 'X-Api-Key' header and it
         | seemed to give back JSON by default without adding anything to
         | the query string.
        
         | simonw wrote:
         | I think these are reasonable design decisions.
         | 
         | Headers are harder to use than query string parameters. You
         | can't start poking around in an API as easily using just a web
         | browser if the API requires authentication and accept headers.
         | 
         | The downside of query strings for API keys is that they can
         | inadvertently be exposed by log files. For this API, where the
         | API key appears to be there purely for analytics reasons, I
         | don't think that risk is particularly bad.
        
           | TheLocehiliosan wrote:
           | I feel like there's all sorts of disappointing design
           | decisions.
           | 
           | * All of the endpoints are singular, but then /summaries is
           | plural for some reason
           | 
           | * You can enumerate the congresses, but non of the congress
           | representations have a value which represents the numeric ID
           | that should be used on other requests. Unless you request the
           | congress data using that number, and then it does include it.
           | 
           | Oh well, hopefully it improves and becomes more consistent
           | over time.
        
           | mixmastamyk wrote:
           | Browser dev tools can add headers. It's not worth the key
           | leakage.
        
       | fnordpiglet wrote:
       | I was looking at the control plane api but the campaign
       | contribution metering rates are extraordinary and require
       | lobbyist api key credentials.
        
       | hitpointdrew wrote:
       | This is awesome! Now if we can just get congress to use git for
       | actually writing the bills.
        
         | dirtsoc wrote:
         | they tried that once. It was meme'd into oblivion...
         | 
         | https://www.theverge.com/2022/6/23/23180813/cryptocurrency-b...
        
           | ratg13 wrote:
           | _"This bill would do far more to benefit everyday Americans
           | if its text was replaced with the source code of Doom,"_
        
       | nilstycho wrote:
       | I have a pet project I'd like to make with this, but one piece of
       | data I'd be missing is a measure/identifier for
       | "important"/"newsworthy" bills. Clearly this is subjective, but
       | I'd be open to most interpretations. Any suggestions for where I
       | might find this?
        
         | blackboxlogic wrote:
         | 1) Scrape a news source and check how many times the bill is
         | mentioned? 2) How many results on a search engine for the
         | bill's title? 3) Train something similar to sentiment analysis
         | model based on the text content of the bill. You'd need
         | historical data for that but see options 1 and 2.
        
       | dbxkcichhdfufu wrote:
       | No /trades route?
       | 
       | What's the point without that?
        
       | bendur_ wrote:
       | Nice start. Too bad there isn't a great way to filter data like
       | members by status, state/district, congress number, etc
        
       | [deleted]
        
       | insane_dreamer wrote:
       | cool; had no idea this existed. Would be great to have each bill
       | available as a git repo so that you can see the bill's draft
       | history as it goes through revisions (with annotations as to the
       | authors of the changes).
        
       | sand500 wrote:
       | I think there was a post on here where a city's laws were hosted
       | on git or some other version control.
       | 
       | It's a intriguing hypothetical to think about. Imagine if all the
       | discussion around a bill had to be as code review comments.
        
         | beauzero wrote:
         | Utah https://github.com/divegeek/utahcode
        
           | sand500 wrote:
           | Thanks!
        
       | Hippieblog wrote:
        
       | codelord wrote:
       | I wish /member/fire was implemented.
        
       | nikodunk wrote:
       | This is very cool. How long has this been around?
        
         | [deleted]
        
         | smeyer wrote:
         | It's pretty new https://blogs.loc.gov/law/2022/09/introducing-
         | the-congress-g...
         | https://github.com/LibraryOfCongress/api.congress.gov
        
       | evo_9 wrote:
       | It would be highly useful if this could be used to generate
       | corruption index.
       | 
       | Seems like almost all politicians - regardless of isle side -
       | have plenty of questionable choices around there voting with
       | donations/pacts, selling shares for monetary gain, etc.
        
         | bb88 wrote:
         | Well, we've never really needed this.
         | 
         | Political contributions are open, as well as voting records.
         | With a little work you could do this on your own.
        
       | seereadhack wrote:
       | Psyched to to see this! For those who are interested, there's
       | some background here via Daniel Schuman and the Congressional
       | Data Coalition: https://congressionaldata.org/library-of-
       | congress-launches-c...
       | 
       | https://govtrack.us - mentioned there - is an amazing resource
       | for federal legislative data and continues to evolve.
       | 
       | There are a number of sites for tracking donations if you are
       | concerned about money and politics. https://www.opensecrets.org
       | is the one I check the most often - but I find that the
       | journalists tend to make it more sensible. e.g.
       | https://www.exposedbycmd.org/2022/08/15/kyrsten-sinema-has-m...
       | 
       | https://www.ballotpedia.org has great election related
       | information as well as a bit of analysis around state trifectas
       | in particular.
       | 
       | Likewise https://openstates.org/ has a ton of well indexed state
       | legislative data as mentioned in a separate comment.
       | 
       | And after years of effort by the Free Law Project
       | https://free.law/ big changes are a foot with PACER for legal
       | dockets: https://www.reuters.com/legal/government/fed-judiciary-
       | says-...
       | 
       | As for the Federal Register, where the federal executive rules
       | live, they have a decent site: https://www.federalregister.gov/
       | an API
       | https://www.federalregister.gov/developers/documentation/api...
       | and someone made this handy quick view as well
       | https://ofr.report/
       | 
       | Now, regarding municipal legislative data, many municipalities
       | use a tool called Legistar which is a bit of pain for regular
       | users - bad layouts, unintuitive search, many clicks to view the
       | matters, links in PDFs - but lucky for us there's an API for read
       | access. https://www.documenters.org out of Chicago has been
       | scraping it and crowd-sourcing meeting coverage - pretty awesome
       | to see, though I'm concerned about how they are managing their
       | infrastructure tbh. A repo per city seems like it'll be a pain to
       | manage.
       | 
       | So I've been working on a tool for browsing recent agenda and
       | matters that makes it much easier to keep tabs on what's
       | happening at council. I'm making weekly updates - not sure where
       | it will lead but we've got 17 cities on it so far...
       | https://www.legigram.com and if you have an in at the SF or Phila
       | city clerk's office, please reach out to me. No donations so far
       | but some very happy users. TBD whether there will be paid product
       | on top of the free view or we will win any grant support.
       | 
       | From what I've learned, the SaaS ecosystem for municipalities is
       | screwy. There's the lock-in, absurd upcharges, widening attack
       | surfaces, stakeholder decay, etc - and now private equity
       | entities like Vista Equity seem to be milking our cities without
       | much of a fight. And it just feels a bit rich that their CEO in
       | particular has been written up for some pretty intense tax fraud.
       | https://www.wsj.com/articles/vistas-robert-smith-had-bigger-...
       | 
       | I saw a comment here about transparency enabling lobbyists over
       | citizens, and I have given some thought to that concern recently
       | as I have been building Legigram.
       | 
       | Maybe part of the challenge is that people outside of
       | professional politics tend to be idealists - the better ideas are
       | what should matter and I have them - whereas those in politics
       | hew to a more realist perspective - that government is a matter
       | of compromise between vested groups - whether lobbyists, donors,
       | voting blocks, or interest groups - brokered by individual
       | politicians and media. Meanwhile, scandal, crime, pandering,
       | gross simplification, and heroicism make for better headlines,
       | soundbites, and news segments - but we need to support budget
       | balancing, zoning compromise, and school board recommendations,
       | too.
       | 
       | There's certainly lots of room for skepticism around civic tech
       | efforts generally - not to mention about how more engagement with
       | politics should de facto lead to better outcomes. One would hope
       | that the last few years would be proof enough to put that idea to
       | bed. Consider further that the majority of FOIA requests are by
       | gov't contractors seeking competitor research.
       | 
       | But if we can set our design goals past mere transparency, then
       | we might see actually start to see better engagement and more
       | agreeable outcomes. What sort of engagement might lead to better
       | outcomes?
       | 
       | When civic duty, like trade work and social work, has been so
       | devalued relative to financialization, tech, real estate - that
       | makes it less and less rational to engage in until the problems
       | are truly acute. But we are getting there: besides income
       | inequality, the widening housing crisis, climate change, and the
       | demographic shift, we need to keep the power on California, the
       | water clean in Jackson, and the schools safe and effective in
       | Texas - and that means in part supporting the people keeping the
       | lights on when the mob with pitchforks show up - while also
       | pushing towards progress.
       | 
       | I recently learned about Richard S. Childs, a widely forgotten
       | 20th century reformer who successfully advocated for the council-
       | manager municipal government format (aka the "weak" mayor format)
       | and also helped usher in the "short ballot" based on the thinking
       | that most people couldn't be bothered to make an informed
       | decision about so many obscure administrative offices.
       | 
       | Along those lines, I think we can achieve better civic engagement
       | by encouraging better decisions and more informed discourse. And
       | while that doesn't just mean better end user dashboards, if I can
       | make it so that literally millions of people can keep tabs on
       | their city hall agenda because it'll take a minute a week instead
       | of half an hour, that's a win enough for me.
        
       | mikrl wrote:
       | I see no endpoints use the POST verb
        
       | lekevicius wrote:
       | New API, and already mixes camelCase (committeeReport) and snake-
       | case (house-communication).
        
         | ianrahman wrote:
         | And already there's a discussion on the matter:
         | https://github.com/LibraryOfCongress/api.congress.gov/issues...
        
       | hosh wrote:
       | I remember there used to be (still there?) of this data marked up
       | with semantic web.
        
       | Cyberdog wrote:
        
         | cookie_monsta wrote:
         | Hmmm. Suspiciously normal. You're on the list, buddy.
        
       | ratg13 wrote:
       | For anyone wondering, there is no e-mail validation to get an API
       | key.
       | 
       | You can enter whatever you want in the form.
        
         | no-dr-onboard wrote:
         | Excellent note.
         | 
         | benign use: love the fact that they are going to allow me to
         | add a + address
         | 
         | malicious use: consider testing for injection attacks :)
        
           | cmeacham98 wrote:
           | What injection attacks? It seems like the email just goes to
           | /dev/null currently.
        
       | OJFord wrote:
       | Disappointed (but not surprised!) there's no `POST /amendment` or
       | `PATCH /bill/:id/:para` etc., with copious notes on auth.
        
         | toddwprice wrote:
         | :-) I figured someone would beat me to this.
        
       | bozhark wrote:
       | This is ridiculously broken on mobile platforms
        
       | obblekk wrote:
       | I have to say, this is cool and surreal in some way.
       | 
       | It's just surreal to think of international treaties as being
       | objects with a "last updated time."
       | 
       | Given the massive human apparatus constantly parsing this
       | information from Capitol Hill, I'm not sure what the use-case is
       | for an app, but nonetheless, it's cool.
       | 
       | Now... if we could get this for every state and county
       | legislature, that would enable some interesting use cases to
       | track parallel legislative initiatives (usually advocated by
       | corporations / non-profits).
        
         | lordofmoria wrote:
         | There's all sorts of cool data analysis that can be done with
         | this data. I lead engineering for a company that ingests these
         | open APIs and sells a service that enhances the metadata on
         | these records and allows users to follow new changes in
         | bills/legislation (think: following a PR). You'd be surprised
         | how many organizations want it, and I don't just mean large
         | corps (yeah, I know...but see the discussion around
         | transparency below in the comments!). We have a lot of very
         | cool institutions as well. If you're a Rails dev or like Data
         | Science, we have some openings: https://careers.fiscalnote.com/
        
           | dogman144 wrote:
           | Hah I was hoping this idea wasn't out there yet in
           | production. Cool company! What's the funding model?
        
             | lordofmoria wrote:
             | We're newly public (NYSE:NOTE), so customers and ARR :)
        
               | dogman144 wrote:
               | That's very cool, I think ideas that bring tablestakes
               | tech (elasisearch or whatever) to non-tech areas will
               | start to take off.
        
         | dheera wrote:
         | Now if only we could have an API to vote ...
        
           | bloppe wrote:
           | The fact of the matter is: paper is still basically the most
           | advanced voting technology around (from the perspective of
           | auditability, which is crucial)
        
             | Aunche wrote:
             | Just release make everyone's vote semi-public. You can look
             | up what you voted for with a combination of your name +
             | position/ballot-measure + password that's passed through a
             | one-way hash, which generates anonymous voter ID. You can
             | file a complaint what was counted doesn't match who you
             | remember voting for.
        
               | sgammon wrote:
               | votes and voter registration is already semi public.
               | campaigns get access to voter rolls for outreach, for
               | instance.
        
               | sgerenser wrote:
               | Voter registration, not votes. They can tell if you're
               | registered Democrat or Republican, not if you actually
               | voted for Biden or Trump (even if it could safely be
               | inferred).
        
               | sgammon wrote:
               | the secret ballot is sacrosanct in the US, yes.
               | 
               | nevertheless, you can tell that a voter is a registered
               | D, I, or R. you can tell if they turned in a ballot in a
               | given election.
               | 
               | in jurisdictions where registered voters cannot vote for
               | candidates of the other party (many), then yes, you can
               | then reasonably infer their vote, with a margin of error
               | equal to rates of write-ins for that party in that
               | election.
        
               | bloppe wrote:
               | _You can file a complaint what was counted doesn 't match
               | who you remember voting for._
               | 
               | Impossible to prove. You don't want people changing their
               | votes. People wouldn't accept results if they change
               | after the fact.
        
               | e_i_pi_2 wrote:
               | Yeah I took a class that talked about this - most people
               | agree that what you'd end up with is companies or
               | individuals forcing you to disclose a hash to prove you
               | voted the way they wanted. Votes kinda need to be
               | unrecoverable at an individual level for this. There's
               | some cool research on "homomorphic encryption" if you
               | want to learn more - it basically opens up the data in
               | aggregate for analysis without being able to disclose
               | information about any individual record in the data, but
               | it's hard to pull off in practice
        
               | Aunche wrote:
               | > Yeah I took a class that talked about this - most
               | people agree that what you'd end up with is companies or
               | individuals forcing you to disclose a hash to prove you
               | voted the way they wanted.
               | 
               | That's what the one-way hash is for. If you're forced to
               | provide a password beforehand, you can provide extra
               | bogus passwords that cast ballots for both sides. The
               | system can allow you to do this an arbitrary number of
               | times.
               | 
               | As far as paper ballots go, nothing stops someone from
               | bullying you into taking a video of you voting and
               | dropping it into the ballot box.
        
               | ClumsyPilot wrote:
               | > nothing stops someone from bullying you into taking a
               | video of you voting and dropping it into the ballot box.
               | 
               | And yet this doesn't happen in real life, so it's not a
               | real problem.
               | 
               | Maybe because it's unmanageable and impractical to
               | transfer, store anf watch 50 million videos of voting.
               | But checking a hash is easy and automateable.
        
               | meowkit wrote:
               | Problem is you are incentivizing people to sell their
               | vote or to threaten others to vote a specific way
               | (abusive spouse wants to verify their SO voted a certain
               | way).
               | 
               | The only info we should provide electronically is that
               | your vote was counted at all. Direct value verification
               | would have to be done in person and under supervision.
        
               | leesalminen wrote:
               | With widespread mail-in voting an abusive spouse could
               | just fill in the ballot and drop it in the mailbox. No
               | need to verify your spouse's actions if you can just do
               | it yourself.
        
               | vkou wrote:
               | The relevant threat model isn't the abusive spouse who
               | has physical access to your ballot, the relevant threat
               | model is someone without physical access to your ballot
               | being able to verify that you voted the way they wanted
               | you to.
        
               | dmckeon wrote:
               | An interesting side-effect of universal mail-in ballots
               | is the detection of fraudulent voter registrations. If
               | ballots addressed to Tinker, Evers, and Chance arrive at
               | 123 Elm Street, which is only occupied by the Smith
               | family, one should reasonably assume shenanigans, if not
               | felonies.
        
               | refurb wrote:
               | Not really. My friend who just recently moved got 4 mail
               | in ballots sent to his place this last election, in
               | addition to his own.
               | 
               | Just people who never bothered to update their voter
               | registration.
               | 
               | Completed ballots are supposed to be verified by
               | signature (at least in CA), but I have no idea how
               | thorough this is.
               | 
               | And I imagine if they are mail in, could they even find
               | people who completed all 4 ballots, then dropped them in
               | some random mail box? From what I gather they just reject
               | a vote if they can't match signatures.
        
               | ClumsyPilot wrote:
               | This is clearly clueless
               | 
               | In Russia all state employees, say school teachers, are
               | told to vote the right way under no uncertain terms. But
               | come the election day, and it is not physically possible
               | to inspect what everyone is doing with paper ballots. If
               | it was possible to digitally check voting, the regime
               | would be even more repressive.
               | 
               | If you have an abusive spouse, voting is your last
               | problem.
        
           | cookie_monsta wrote:
           | Cue the obligatory xkcd...
        
             | Shared404 wrote:
             | For those unfamiliar: https://xkcd.com/2030/
        
               | ClumsyPilot wrote:
               | software engineering is like steam engines were in their
               | first 50 years - they could explode at any time, and had
               | multiple spinning parts that will rip off your arm if you
               | are in the wrong place
        
             | [deleted]
        
           | sofixa wrote:
           | Way too complicated to implement securely, anonymously and
           | transparently. Going physically somewhere to click on a
           | button after a human identification is probably as
           | technologically advanced as we're going to get in the near
           | future.
           | 
           | I mean sure, with the EU's NFC chips in passports and ID
           | cards there can be an app that compares that to a 3D selfie
           | (there are already apps that do that for lesser government
           | services), but the risks associated in getting it wrong are
           | still too great. Not to mention the lack of transparency
           | which is paramount for a healthy democracy.
        
             | throw_nbvc1234 wrote:
             | It'd be interesting to explore transparent/public voting
             | combined with an in person way to correct/lock_in your
             | vote. Instead of having a voting day let people vote over a
             | month and be able to lock in their vote in person at any
             | time.
             | 
             | Maybe not use it for elections but maybe for polling on
             | issues or a replacement for petitions and/or referendums.
             | Enabling some aspects of direct democracy especially at
             | local levels. But i think this would need to be public or
             | overly transparent to enable people to trust the outcome or
             | become aware of any attacks on the system.
        
               | colejohnson66 wrote:
               | The closest we have to that is paper ballots. You can get
               | your ballot a few weeks in advance and vote then. Then,
               | until the "postmarked no later than" date, you can change
               | your vote if so desired.
        
             | permo-w wrote:
             | Estonia manages it
        
               | VWWHFSfQ wrote:
               | There's a pretty big difference in scale between Estonia
               | and USA.
        
               | jimhi wrote:
               | If Estonia had the GDP, political influence, or military
               | of the USA it might not hold up to the same level of
               | attacks.
               | 
               | It also helps that their population and schooling system
               | prioritizes coding and technical literacy.
        
             | dheera wrote:
             | But at some point we're going to need to build an
             | interplanetary civilization, so we might as well get
             | started on governance experiments for that future now.
             | 
             | Maybe this is why US can't keep up its space program but
             | China can.
        
           | nonethewiser wrote:
           | Seriously?
        
           | o_1 wrote:
           | let's all make an bot to read bills and vote on our behalf.
        
         | seaourfreed wrote:
         | GREAT, BUT! We need an API on who wrote which parts of the
         | bill. Find lobbyists who wrote parts. Find when there is an
         | evil part (where lobbyists get congress to sell out), and we
         | need to find out WHICH congress person put it in there.
         | 
         | We need to track the evil parts of bills to the congress person
         | who is the sell out for lobbyists (and the corporations beind
         | them)
        
           | ElevenLathe wrote:
           | For pieces that were added as amendments, it is at least
           | possible to determine who proposed the amendment. Instances
           | where the as-written initial bill is written on K Street will
           | probably always be impossible unless Congress pass absurdly
           | strict sunlight laws with teeth (i.e. make it illegal for
           | congresspeople to have substantive meetings without
           | livestreaming them) that inconvenience themselves.
        
             | clairity wrote:
             | yah, for that, we'd need complete social graphs for public
             | servants, which would quickly run afoul the congressional
             | staffs' civil liberties, because they'd try to hide as much
             | as possible behind other people. you'd need that to
             | appropriately apportion attributions back to the public
             | servant.
             | 
             | i'd be ok pushing for a legal carve-out for this social
             | graph however, as i'd posit that greater governmental
             | transparency overrides the potential encroachments of the
             | ~tens/hundreds of thousands of partisans and lobbyists
             | (<0.1% of population; though slippery slope could be
             | invoked here). you'd start with staffers and move out to
             | anyone paid directly by the office and their affiliated
             | political organizations, then move to large donors and
             | their PACs. obviously the current supreme court would try
             | to block this as an antecedent to the _citizen 's united_
             | case.
        
               | ElevenLathe wrote:
               | Oh yeah it would definitely be in the interests of the
               | ruled class. Unfortunately, since it is bad for the
               | ruling class, we won't get it.
        
           | TOMDM wrote:
           | git grep -n 'healthcare' | perl -F':' -anpe '$_=`git blame
           | -L$F[1],+1 $F[0]`'
        
           | zeruch wrote:
           | Until you define a method/definition of "Evil" you're out of
           | luck. What you can do, is use this to track changes, and then
           | match it to a corpus of other data to get a better fidelity
           | on what may influence legislation; financial transactions,
           | public statements and where they were made, state visits,
           | litigation, etc. Much of it in the public eye, hence
           | scrapable and able to be put into a data
           | lake/warehouse/cabana/dilapidated shack, and analytics
           | applied to it. From there you may find emergent phenomena.
        
             | cyberge99 wrote:
             | Isn't this what opensecrets.org does?
        
           | drexlspivey wrote:
           | I want a webhook for Nancy Pelosi's trades
        
           | galaxyLogic wrote:
           | I think even before that we need an API to tell us who voted
           | for or against each bill, and their party affiliation.
           | 
           | Also an easy way to find all votes of each elected
           | representative.
           | 
           | Then maybe an app that allows me to pick a few bills and a
           | few representatives and produce a matrix of how they voted on
           | those bills, also which proportion of each party voted yes or
           | no on those bills.
           | 
           | And finally for each proposed bill who voted for or against
           | to bring it onto the floor to be discussed and voted on, or
           | not.
        
           | samstave wrote:
           | We need the ability to understand exactly who profits from
           | any act/law/bill and excruiciating detail of the finances of
           | anyone in congress, coupled with max age limit for any seat,
           | including the Supreme Court.
        
           | tcmart14 wrote:
           | Just need a github for legislation. Want to see who added
           | what subsection? Check the commit history.
        
             | e_i_pi_2 wrote:
             | We do have this in the US! All laws should show who wrote
             | them, when, who approved it, etc, we just don't have a
             | great API for programs, and moreso we don't have the public
             | appetite to consume it
        
               | mikecoles wrote:
               | No. The request is to show who wrote individual lines or
               | sections. Currently the bill shows as being 'written' by
               | legislators Smith & Johnson but lacks crediting/blaming
               | who actually provided the wording for each section. The
               | goal would be to see who slipped in which pieces of the
               | bill.
        
           | CH1jZci6jV wrote:
           | I use to work in Congress. 100% of it is written by
           | lobbyists.
        
             | atlasunshrugged wrote:
             | This is categorically false. If you want an understanding
             | of what life in Congress is like, I highly recommend Mark
             | Strand's "Surviving Inside Congress"
        
               | xapata wrote:
               | It's not categorically false, just false. Some phrases
               | written by lobbyists survive in some bills.
        
               | atlasunshrugged wrote:
               | But then wouldn't the phrase I was referring to, "100% of
               | it is written by lobbyists" be categorically false
               | because it specifically emphasizes the percentage and
               | therefore the claim is false? If they had said that
               | sometimes phrases or even whole bills from lobbyists get
               | introduced I wouldn't have quibbled with it.
        
               | xapata wrote:
               | While the phrase has become used more loosely, I believe
               | (could be wrong, of course) that it is best used to
               | explain that the cause of being false is a category
               | error. It's like the distinction between a type error and
               | a value error. In this case, I'd say it's a value error.
               | The value 100 is false, not the type, because we know
               | that a nonzero amount of prose in legislation is indeed
               | written by lobbyists.
        
               | atlasunshrugged wrote:
               | Ah okay, this was really helpful, thanks! Not quite as
               | bad of a language faux pas as when I was a kid and
               | thought 'per se' was persay but I'm glad to know the
               | difference
        
               | [deleted]
        
               | [deleted]
        
             | refurb wrote:
             | No, 100% is not written, but yes some bills are written by
             | lobbyists.
             | 
             | A good story my professor told me is when he took a trip to
             | Congress, met his Congressperson, suggested a law that
             | would help entrepreneurs, then sat down with him and they
             | both drafted it in about 2 hours, then he took it to
             | Congress to table it for a vote. It didn't pass, but that's
             | how laws get written.
             | 
             | But then again, is lobbying bad? I mean, it's not stacks of
             | money passed under a table, it's _literally arguing your
             | case_. I mean isn 't that what Congresspeople are there
             | for? To hear their constituents concerns and desires?
             | 
             | Would anyone on HN argue that EFF shouldn't be allowed to
             | spend donations they receive to do work that helps them
             | lobby congress for say, privacy laws?
             | 
             | That's a good thing to me.
        
             | seaourfreed wrote:
             | We need WHICH congress-person approved it getting into the
             | bill. We have to VOTE OUT the congress-person linked to the
             | evil riders to bills (Budget bills, Defence bills, etc.)
        
           | sgammon wrote:
           | lots of this data exists. campaign finance and lobbying
           | reports help shine a light on this behavior.
        
           | fydkwheduxb wrote:
           | Everybody has lobbyists, there's no public cause that lacks
           | lobbyists in the USA and if you think it's only corporations
           | with effective lobbyists it's probably because you're
           | discounting a slew of causes and groups.
        
           | noveltyaccount wrote:
           | Git blame for bills, I love it! :D
        
           | matthoiland wrote:
           | I'd love to see a git history for our current US legislation
        
             | e_i_pi_2 wrote:
             | You're in luck, someone recreated the constitution in git
             | with the history of edits
             | 
             | https://github.com/jessekphillips/usa-constitution
             | 
             | Edit: just noticed the dates aren't accurate, but still
             | interesting and the authors are accurate
        
               | judge2020 wrote:
               | Can git do pre-1970 dates?
        
               | progval wrote:
               | The file/wire format can, but the official implementation
               | doesn't handle it well. There is some work in progress to
               | make it work, for this kind of historical work.
        
             | quadratecode wrote:
             | There is a project doing exactly this for German law.[1] I
             | also once cobbled together a rather primitive Python script
             | which commits Swiss federal law as MD-file into a repo
             | through GitHub actions.[2]
             | 
             | [1] https://github.com/bundestag/gesetze
             | 
             | [2] https://github.com/quadratecode/ch-law-tracker
        
             | tstrimple wrote:
             | Yes. We need git-blame here.
        
           | mortdeus wrote:
           | you are arguing for Git for legislation. not an api.
        
           | bozhark wrote:
           | All of this is somewhere, all of this information.
        
           | DannyBee wrote:
           | "We need to track the evil parts of bills to the congress
           | person who is the sell out for lobbyists (and the
           | corporations beind them)"
           | 
           | This would require a lot of changes to how bills are
           | literally shuffled around the building :)
        
           | Calamitous wrote:
           | Who wants to be the first to teach congress to use git?
        
           | naikrovek wrote:
           | i'd be happy with voting information for each bill that was
           | voted on by either house or senate.
        
           | yarg wrote:
           | Version track the bills.
           | 
           | That would be very cool.
        
           | sc90 wrote:
           | _Find lobbyists who wrote parts_ Is this usually noted on the
           | document?
        
             | sgammon wrote:
             | unfortunately, no. but other records can and do illuminate
             | such behavior.
        
           | indigochill wrote:
           | I've thought about this (as an outsider who doesn't know
           | anything) and wondered if plain old git would do the job.
           | I've heard Germany already does this, but when I looked at
           | https://github.com/bundestag/gesetze it didn't look like this
           | was representative of what I would assume to be the full
           | extent of German legislation.
           | 
           | In theory, you probably wouldn't find lobbyists contributing
           | directly, but you could find representatives and then link
           | them to lobbyists they've associated with.
        
           | cjpearson wrote:
           | It's a common misconception that increasing transparency
           | reduces the power of lobbyists, when it actually does the
           | opposite. [0] In short, the average voter doesn't care enough
           | to find out who added a specific line to a bill, but
           | lobbyists care a lot and they use the additional access to
           | monitor and influence legislators. Legislator accountability
           | is increased with more transparency, but they become more
           | accountable to lobbyists than to their constituents.
           | 
           | There needs to be a balance. A democracy that operates
           | completely in the dark isn't much of a democracy, but
           | Congress currently has the problem off too much rather than
           | too little transparency.
           | 
           | [0]
           | https://congressionalresearch.org/TransparencyProblem.html
        
             | Waterluvian wrote:
             | The existence of lobbying isn't a foregone conclusion. We
             | can have transparency without the problem you've adeptly
             | described if we eliminate or at least significantly
             | diminish lobbying.
        
               | chrisweekly wrote:
               | Good thing that only requires eliminating the influence
               | of money on politics.
        
               | afarrell wrote:
               | Lobbying is explicitly protected by the 1st amendment to
               | the constitution.
               | 
               | The validity of a contract where a company, person, or
               | community action group pays someone to lobby on their
               | behalf is not.
        
               | Waterluvian wrote:
               | That reveals another problem: treating the Constitution
               | (and its many edits) as a foregone conclusion.
               | 
               | Enshrining corruption in what's practically holy law.
               | What a coup.
        
             | bloaf wrote:
             | That's not my reading.
             | 
             | It sounds to me like transparency _does always_ increase
             | accountability full stop. It just turns out that
             | _accountability to lobbyists_ is a greater driver of
             | legislator behavior than _accountability to voters_.
             | 
             | The problem is therefore _neither_ accountability _nor_
             | transparency, but the disproportionate influence of
             | lobbyists.
        
               | afarrell wrote:
               | At the root of that problem is this:
               | 
               | 1. If you organize a team behind a goal and persist in
               | focusing on it, you are more likely to succeed than
               | someone who does not allocate their attention thusly.
               | 
               | 2. If you do the above, you need a way to pay for rent
               | and groceries.
        
             | [deleted]
        
             | zhynn wrote:
             | You might also find this academic paper interesting:
             | https://philpapers.org/go.pl?id=NGUTIS&aid=NGUTISv1
             | 
             | The title is a bit click-bait-y, but the argument is sound,
             | I think. Forcing transparency changes how people do their
             | work, especially what indicators of success they choose to
             | focus on (which may be easy to relate, but bad indicators
             | of success - like GPA).
             | 
             | Transparency does not automatically grant accountability.
             | 
             | I don't think we have a good handle on this problem, and we
             | make the situation worse by assuming that transparency will
             | solve the problems of corruption and government
             | accountability.
        
               | [deleted]
        
             | ibeckermayer wrote:
             | Transparency is a logical necessity for accountability. If
             | we don't know who wrote a law, then we can't hold somebody
             | accountable for it. Even if we take for granted the
             | truthfulness of the "transparency problem", the solution
             | doesn't lie in finding the right "balance" of secrecy and
             | transparency.
             | 
             | Law is backed by threat of violence; what separates
             | legitimate Law from the law of the jungle is its
             | _justification_. Everyone who the Law applies to (that is
             | to say, everyone) has a legitimate interest in knowing the
             | justification, so that they can determine whether such Law
             | is justified or whether their government has morphed into a
             | violent gang. Ergo transparency is fundamental to
             | legitimate law and governance.
        
             | seaourfreed wrote:
             | Just because the reckoning from citizens hasn't come yet,
             | doesn't mean it isn't coming at all. The transparency is
             | needed for citizens to find the bad actors in congress.
        
               | vkou wrote:
               | You're not addressing the problem proposed in the
               | parent's argument - that lobbyists will be the ones who
               | will use this, to ensure that the politicians they bought
               | and paid for are doing what _they_ want.
               | 
               | It seems like a pretty persuasive argument to me.
        
               | andsoitis wrote:
               | > that lobbyists will be the ones who will use this, to
               | ensure that the politicians they bought and paid for are
               | doing what they want.
               | 
               | I don't know that lobbyist depends on an API for that!
        
               | Lendal wrote:
               | Not all lobbyists are out to do evil, and not all
               | politicians who do their job are doing evil. The
               | alternative to listening to lobbyists and legislating is
               | politicians who don't do legislation at all and instead
               | spend their time fund-raising and running culture wars.
               | That's not the better-world alternative I'm here for.
        
               | Supermancho wrote:
               | > You're not addressing the problem proposed in the
               | parent's argument - that lobbyists will be the ones who
               | will use this, to ensure that the politicians they bought
               | and paid for are doing what they want.
               | 
               | That's not a problem, despite the characterization.
               | That's a helpful side-effect. Now you have more
               | definitive traceability.
        
               | kodah wrote:
               | I think GP is talking about creating an incentive system
               | that doesn't encourage or require a reckoning. There are
               | plenty of systems which were designed by people in good
               | faith who were unable to understand that the incentives
               | they thought they were creating were not in fact that
               | actual incentives. Creating line by line attribution
               | sounds like one such case.
        
               | DannyBee wrote:
               | It is not coming because citizens do not have time.
        
               | voidfunc wrote:
               | Would also wager a lot of us don't care. Government can
               | do incredibly fucked up things, but as long as quality of
               | life of is high and the money train keeps flowing, I'm
               | not going to do anything.
               | 
               | You'd really have to fuck some stuff up real bad for me
               | to wake up and give a shit.
        
             | JumpCrisscross wrote:
             | > _lobbyists care a lot and they use the additional access
             | to monitor and influence legislators_
             | 
             | This is ad tracking for lobbyists. If a lobbyist could
             | prove they got a line into legislation, they're worth an
             | order of magnitude more than they are today, when one is
             | left guessing if they did anything at all.
        
             | cwkoss wrote:
             | I am skeptical, this sounds like 'trickle-down economics'
             | where the theory is internally cohesive but the conclusions
             | don't actually line up with reality.
             | 
             | Seems like the page you linked is an anti-trasparency
             | advocacy org, what makes you trust them? Is there any data
             | to back up this assertion?
        
               | wudangmonk wrote:
               | If we went with its original name of 'chicken-shit
               | economics' I doubt there would have been as much
               | confusion about theory vs reality.
        
               | whatshisface wrote:
        
           | nnmg wrote:
           | Not exactly what you are looking for, but Open Secrets gets
           | you almost there: https://www.opensecrets.org/federal-
           | lobbying
           | 
           | Their API leaves a lot to be desired, but the data is much
           | easier to access and analyze than the raw data from the US
           | House or Senate websites.
        
         | sgammon wrote:
         | fiscalnote.com govtrack.us opensecrets.org openstates.org
        
         | vishnugupta wrote:
         | > if we could get this for every state and county legislature
         | 
         | Not an official source but someone took the pain of creating a
         | GitHub repo of Indian constitution with amendments as
         | commits[1]. Here's one commit[2] for example that's about
         | modifying some affirmative action details.
         | 
         | [1] https://github.com/prince-mishra/the-constitution-of-
         | india/c...
         | 
         | [2] https://github.com/prince-mishra/the-constitution-of-
         | india/c...
        
         | ElevenLathe wrote:
         | This actually also exists in https://openstates.org/, but it's
         | a separate nonprofit, not a government service.
        
       | atl4s wrote:
       | In a similar vein, here's the UK Parliament API directory:
       | https://developer.parliament.uk
        
       | sailplease wrote:
       | If anyone is interested I setup the bills and committee endpoints
       | in a google sheet, makes it easy to get the data in one spot,
       | manage pagination, etc.. You can simply copy the spreadsheet and
       | it will copy the api connectors, just enter your api key, you can
       | easily add other endpoints, change query params, etc.
       | 
       | Pagination seems to be limited to 250 on the endpoints and some
       | of the data sets are quite large so I set a limit on pagination
       | of 10 pages, if you want all the bills from all time, prepare to
       | wait.
       | 
       | Full disclosure it uses a free addon myself and my cofounders
       | created to easily push any api data into a google sheet. I just
       | find it useful to play around in a spreadsheet very quickly vs
       | setting up a db.
       | 
       | spreadsheet is here:
       | https://docs.google.com/spreadsheets/d/1amnbqb_J9W2r-XaVsrue...
        
       | davidy123 wrote:
       | I hope they soon provides schemas rather than just separate
       | human-only markdown description of fields. Both XML and JSON have
       | methods for this using Linked Data.
       | 
       | For JSON-LD, this would basically look like this (from
       | https://json-ld.org/spec/latest/json-ld/#the-context):
       | {         "@context": {           "name":
       | "http://schema.org/name",  - This means that 'name' is shorthand
       | for 'http://schema.org/name'            "homepage": {
       | "@id": "http://schema.org/url",  - This means that 'homepage' is
       | shorthand for 'http://schema.org/url'            }           ...
       | },         ... data part using name, homepage, etc       }
       | 
       | Once you have stable places for information (identifiers), you
       | can start building a real web as described by the semantic web,
       | by bundling schemas with the data you can freely use information
       | with human and machine understanding, until then you've got a
       | muddle.
        
       | simonw wrote:
       | I wonder why this has API keys at all? Maybe so they can keep
       | logs of who is using the API and for what purpose.
        
         | phantomread wrote:
         | It also helps when trying to put limits on greedy users or
         | maintain a ban-list. Attribution is also important, like you
         | said. Granted, an abusive user could just keep creating new
         | keys, but if they require something like email verification
         | then it's a little bit costlier to circumvent than nothing.
         | 
         | EDIT: Based on other comments, there's no email verification.
        
           | cmeacham98 wrote:
           | There isn't currently, but they could add whatever
           | requirements to generate new keys in the future they want. If
           | they didn't have keys that would break every existing client.
        
       | maxmcd wrote:
       | Is the OpenAPI json/yaml spec not available? Seems clear from the
       | UI that this is likely using the API, but I can't find an
       | endpoint that returns the spec.
       | 
       | edit: oh, it's just inline within the html source, strange
        
       | 11thEarlOfMar wrote:
       | Maybe I missed it while glancing through, but does this return
       | the actual voting by congressperson for each bill?
        
         | sgammon wrote:
         | I don't think so, but several other sources do provide
         | structured roll call data, which is what this is called.
        
         | acaloiar wrote:
         | Roll call vote data is available from ProPublica's Congress
         | API: https://projects.propublica.org/api-docs/congress-api/
         | 
         | ProPublica took over a number of the Sunlight Foundation
         | (Sunlight Labs') API projects:
         | https://sunlightfoundation.com/2016/11/01/sunlight-labs-upda...
        
         | naikrovek wrote:
         | don't see it.
         | 
         | i would like to see a vote summary, similar to what you see on
         | C-SPAN after a vote.
        
       | efitz wrote:
       | Cool idea.
       | 
       | Some suggestions for missing interfaces:
       | 
       | DELETE/Representative POST/Bill
        
       | drstewart wrote:
       | There's a joke somewhere about it desperately needing to support
       | PATCH methods
        
         | speedylight wrote:
         | That would be the the real life equivalent of a GTA V mod menu.
        
         | goatcode wrote:
         | The delete verb would be preferable, imo.
        
           | mindcrime wrote:
           | DELETE /congress HTTP/1.1       Host: api.congress.gov
           | Accept-Language: en            HTTP/1.1 200 OK
           | 
           | Wouldn't that be something?
        
             | trelane wrote:
             | more likely response codes:
             | 
             | 506 Variant Also Negotiates (you get pawned off on a
             | staffer)
             | 
             | 409 Conflict
             | 
             | And, of course, the most relevant: 402 Payment Required
        
               | bierjunge wrote:
               | You missed this -> 451 Unavailable For Legal Reasons
        
               | mindcrime wrote:
               | _And, of course, the most relevant: 402 Payment Required_
               | 
               | Good point!
        
             | [deleted]
        
             | [deleted]
        
             | ZeWaka wrote:
             | Wouldn't it be a 204 Not Found? ;)
        
               | dhritzkiv wrote:
               | 204 would be No Content
               | 
               | 404 would be Not Found
        
       | gennarro wrote:
       | Most government departments have some form of api. Many use
       | openapi (swagger) and have design decisions like this one,
       | excepting the major APIs, like FDA. They enable projects like
       | https://ofr.report/ or https://sec.report/
        
       | showerst wrote:
       | If you're interested in bill data, open states maintains a
       | federal scraper that outputs into a common format with our
       | scrapers for all 50 states as well.
       | 
       | https://github.com/openstates/openstates-scrapers
       | 
       | It uses the GPO's api though, not this one.
        
       | mandeepj wrote:
       | The root name is not plural, but final locations are, for e.g. -
       | Bill vs Summaries or Titles
        
       | devmunchies wrote:
       | Seems like a miss that this is using google fonts instead of the
       | font made by the govt https://public-sans.digital.gov/
        
         | joecool1029 wrote:
         | It's also using Cloudflare and set up to block Digitalocean
         | ip's outright from browsing anything at congress.gov and its
         | subdomains.
        
           | CreepGin wrote:
           | Sorry, why Digitalocean ip's? Anti-bots and DDOS? And, how do
           | you even find out about this?
        
             | joecool1029 wrote:
             | I don't know why, probably because DO is known to be cheap
             | and originates a lot of spam. It's just super annoying
             | because I use it as a cheap fairly reliable wireguard VPN
             | since my ISP's seem to reset/kill my ssh connections
             | otherwise.
        
         | flatline wrote:
         | Is this not just the default swagger output?
        
         | [deleted]
        
       | forgingahead wrote:
       | Missing a DELETE action for all incumbents, and a CREATE action
       | with proper attributes tree to create new and improved
       | representation.
        
       | logicallee wrote:
       | This is a very good start! What would close the loop is an
       | endpoint to serve legally binding notices.
       | 
       | Consider someone with a legally recognized special need necessary
       | for some bodily function.
       | 
       | For example, someone in a wheelchair wants to use a bathroom. Or
       | two people who can't speak want to get a condom by communicating
       | it non-verbally, by pointing at it or writing their request down
       | on a piece of paper, but whose requests are ignored whereas
       | speaking customers have their needs met.
       | 
       | In code you can just try:                  try usebathroom()
       | catch           cant
       | 
       | or                  try buycondomnonverbally()             catch
       | cant
       | 
       | The exact function call that makes it fail becomes obvious.
       | 
       | With an endpoint, you could apply the legal API to it and demand
       | that the proprietor provide legally mandated accommodations until
       | the failing function succeeds for the special case.
       | 
       | It's hard to deny you exist if there is a parking lot full of
       | employees and you can serve them a notice by GPS lookup.
       | 
       | If someone made _that_ service it would be an  "oh shit, they
       | _actually_ mean it " moment for every unaccountable black box
       | Establishment that skirts its accessibility obligations.
       | 
       | It would instantly improve the world for everyone.
        
       | ethbr0 wrote:
       | Was not expecting Swagger... neat!
       | 
       | https://en.m.wikipedia.org/wiki/Swagger_(software)
        
         | djbusby wrote:
         | Don't they call it OpenAPI now?
        
           | o_1 wrote:
           | yes
        
             | jzig wrote:
             | Depends on the version :P
        
           | issung wrote:
           | I think now "OpenAPI" is the schema definition, swagger is
           | the tool you actually use to display your OpenAPI specs in a
           | nice interactive GUI.
        
       | omginternets wrote:
       | Hmm... all the useful endpoints are returning a 402 status.
        
         | jonas-w wrote:
         | Maybe didn't pay your taxes?
         | 
         | https://www.webfx.com/web-development/glossary/http-status-c...
        
           | omginternets wrote:
           | ;)
        
       | adolph wrote:
       | I havn't seen this before but the .pagination.next url value is a
       | great convenience. On the other hand, the OpenAPI documentation
       | doesn't explicitly mention offset and limit for paginated
       | services even though it lists format for each service.
       | jq '.pagination.next ' member.json        "https://api.data.gov/c
       | ongress/v3/member?offset=20&limit=20&format=json"
        
         | AndreasHae wrote:
         | >I havn't seen this before but the .pagination.next url value
         | is a great convenience
         | 
         | Reminds me of HATEOAS [0]. Definitely makes it easier to browse
         | using a REST client.
         | 
         | >On the other hand, the OpenAPI documentation doesn't
         | explicitly mention offset and limit for paginated services even
         | though it lists format for each service
         | 
         | I could imagine that they use some kind of middleware for
         | pagination which leads to it not being explicitly included in
         | the OpenAPI spec, especially if they generate it from their DTO
         | classes instead of going API first.
         | 
         | Also, am I the only one who thinks specifying the expected
         | response format via query param is weird and they should just
         | use the Accept header instead? Eh, I guess it's better
         | supported by OpenAPI.
         | 
         | [0] https://en.wikipedia.org/wiki/HATEOAS
        
           | adolph wrote:
           | Yes, I see format in the query string here and there. It is
           | in the medical web service spec FHIR.
           | 
           | * In order to support various implementation limitations,
           | servers SHOULD support the optional _format parameter to
           | specify alternative response formats by their MIME-types.
           | This parameter allows a client to override the accept header
           | value when it is unable to set it correctly due to internal
           | limitations (e.g. XSLT usage).*
           | 
           | https://www.hl7.org/fhir/http.html#mime-type
        
       | simonw wrote:
       | Looks like the page size limit is 250 so you can fetch records
       | like this:                   https://api.congress.gov/v3/bill?for
       | mat=json&api_key=...&limit=250
        
       | BryLuc wrote:
        
       | smrtinsert wrote:
       | Incredible.
        
       | bickett wrote:
       | Hello!
        
       | hilyen wrote:
       | Not directly related, but I dream of a future where laws are
       | published on GIT. New laws, or updates get pull requested,
       | approval is voted on, then merged to master.
        
         | nscalf wrote:
         | This is, to some extent, the same original line of thinking
         | that spawned out things like Ethereum. A lot of people hate on
         | crypto, but at its core I think it's a very hopeful and
         | interesting idea.
        
         | omegalulw wrote:
         | I don't see much value in this beyond diffing? The hard part in
         | making laws is reaching concensus, not the actual edits.
        
           | avita1 wrote:
           | Understanding amendments would be a very good use case. Often
           | changes to the law are not new laws, but changes in other
           | laws. Any time I've tried to actually parse the law, I've
           | found getting a good picture of the current state of the law,
           | and a snapshot of the law in the past is tricky.
           | 
           | To take this example I found off the NYS assembly website
           | legalizing adultery (it was the first one I found, I swear)
           | 
           | https://nyassembly.gov/leg/?default_fld=&leg_video=&bn=A0010.
           | ..
           | 
           | It's phrased as "Section 255.17 of the penal law is
           | REPEALED", but if you try to find "the penal law", but if you
           | look up a a copy of the penal code do you see 255.17 in it?
           | If so, how can you find out what was actually repealed. If
           | not, do you need to hunt through every possible amendment to
           | figure out the state of the law is at the time of reading?
        
         | supermdguy wrote:
         | There was a bill that got published on Github a few months
         | back: https://github.com/responsible-financial-innovation-
         | act22/RF...
         | 
         | Not sure if any suggested changes got incorporated or even
         | addressed, but it's a really interesting concept
        
           | karmelapple wrote:
           | I helped make an example of this in GitHub for the
           | Declaration of Independence: https://github.com/usgov/forget-
           | the-king/pull/1
        
         | mike_d wrote:
         | That is exactly how it works, they just don't use git.
         | 
         | "New laws" have to quite literally be diffs of the existing
         | law.
        
         | peanutz454 wrote:
         | This was on front page a few months ago
         | https://news.ycombinator.com/item?id=18528365
         | 
         | Edit: 2018, so not a few months ago
        
         | b0afc375b5 wrote:
         | My dream is that the world would adapt a system of law so
         | simple that any one person would be a able to understand the
         | totality of it, removing the need for lawyers.
        
           | cheschire wrote:
           | Masks.
           | 
           | That one issue alone is a perfect example of why law is
           | complex and experts in law are needed. Morals are subjective.
           | Countries are large.
        
         | clx75 wrote:
         | Or if laws were executable descriptions of how to make certain
         | changes to world state.
         | 
         | There could be some sort of VM (state machine?) which executes
         | these laws (programs). A queue accepts change requests from the
         | edges, e.g. citizen1 wants to sell her car to citizen2 would
         | generate a change request. The queue processor validates the
         | change request, finds the appropriate reducer (= law) for it,
         | applies the reducer to current world state + change request and
         | derive the new world state.
         | 
         | The programs (laws) themselves could also be objects of the
         | world state. Changing the law is then another change request
         | (self-modifying code).
         | 
         | One big issue with this is that the reducers should probably
         | also work at the edges. Paying with a credit card in a shop
         | should work even if the Internet is down. Diverging state
         | histories should be the norm not an exception. We should figure
         | out how to ensure we can always resolve the merge conflicts.
        
           | npc54321 wrote:
           | Bitcoin.
        
       | todsacerdoti wrote:
       | The Congress.gov API has been added to Pipedream -
       | https://pipedream.com/apps/congress-gov/.
       | 
       | Please share what you build!
        
       | nodesocket wrote:
       | Maybe we can POST to file SEC claim against Nancy Pelosi and her
       | husbands rampant insider trading. Meanwhile, democrats continue
       | to hypocritically call out republicans on insider trading during
       | covid.
        
       ___________________________________________________________________
       (page generated 2022-09-09 23:02 UTC)