Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: checksums or digital signatures for statute text #124

Open
dogweather opened this issue Sep 23, 2023 · 4 comments
Open

Idea: checksums or digital signatures for statute text #124

dogweather opened this issue Sep 23, 2023 · 4 comments

Comments

@dogweather
Copy link

dogweather commented Sep 23, 2023

I'm kicking around ideas for enabling the end user to verify a website's text against the official API content. E.g., I pull from the API to create this page:

https://newyork.public.law/laws/n.y._insurance_law_section_3217-d

Now, how can I help site visitors verify that the text is unchanged and up to date? Currently I do two things:

  1. I link to the equivalent page at nysenate.gov:
Screenshot 2023-09-22 at 11 01 28 PM
  1. I wrote this explainer-style page:

https://newyork.public.law/laws/information-about-updates

I'd like to take this further

Somehow - maybe a browser plugin - that'd check the text after loading the page. My current best idea is to reduce the two texts to a normalized whitespace and then do a diff. It'd reflect the result to the user, and on demand show how it arrived at that result.

Now, if the API included e.g. a SHA checksum or public key-based signature, that could enable more scenarios.

@KevinCaseiras
Copy link
Member

Hi @dogweather,

We actually have an api endpoint for getting a list of updates to a specific law sub document (looks like this is missing from our documentation though).
i.e. https://legislation.nysenate.gov/api/3/laws/ISC/3217-D/updates

Does this help?

@dogweather
Copy link
Author

dogweather commented Sep 25, 2023

Thanks, that sounds very useful, I'll check it out. I'm also getting pretty good results doing this on-the-fly diff. Here, it's showing that on my site, I've removed the redundant (?) title from the body text that some statutes have.

Screenshot 2023-09-25 at 11 05 13 AM

The real challenge IMO is how to provide anything of meaning to the end user. I.e., if you're wanting confirmation that a site is accurate, it doesn't help much for the site to tell you, "Yep, I'm accurate!" :-)

So I'm thinking about a "show me" page where the plugin walks through how it arrived at its conclusion. Kind of like some AI's do.

@KevinCaseiras
Copy link
Member

hmm, yeah that's an interesting problem. The text diff sounds like a reasonable solution, we actually do something similar internally to check bill text accuracy.

Let me know how it goes.

That website looks amazing btw, well done!

@dogweather
Copy link
Author

That website looks amazing btw, well done!

Thanks, I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants