Brandon Roots
  • INTERACTIVE
  • FILM
  • ABOUT
  • CONTACT
September 28, 2020

Redacting the US Constitution

broots ITP, Programming A to Z

As citizens, we all have an obligation to intervene and become involved – it’s the citizen who changes things.

José Saramago

This week for Programming A to Z I was asked to make use of “something external” in a browser-based text experiment. Having already explored the Datamuse API with a time rhyming site I turned my attention more specifically to working with data from the JavaScript fetch() API.

Perhaps it is a product of the era we are living in, of “fake-news”, twitter deletions, and damning government reports, but redaction has been on my mind a lot lately. The idea that words and the ideas in them can be so compromising that they must be removed from public view I find endlessly fascinating.

The opening paragraph of the Mueller report.

Thinking about how to tie redaction into a a browser-based text experiment was the next challenge. The obvious candidates were partially classified government documents. Could I make use of the Mueller report? Looking at a public copy online I found that the formatting and optical character recognition (OCR) of the PDFs I had access to had numerous errors and would be a difficult starting point. OCR was especially unkind to the redactions often turning them into a random string of characters:

-~'<-,’•,•••• ~ •~’·,I -• •·,~•,•,•<

Hmm. Beginning with a well formatted text file would be much easier.

My sights turned to something readily available: the US Constitution. The source is in the public domain and I found a text file online courtesy https://www.usconstitution.net/const.txt

A section of JavaScript code from the experiment.

After calling the text in using the fetch() function I made use of split() and replace() and some regular expressions to divide the text into fragments and randomly present them back to the viewer. While this is something I am definitely interested in exploring further in its current incarnation nouns that are assigned power in the text, such as the “Senate” or “States”, are redacted on load and replaced on a click with who I think is ultimately in power.

Sticking with the public domain theme I have paired this experiment with Creative Commons music courtesy Nine Inch Nails under a share-share alike license.

Try the experiment here.

New Skill: Regular Expressions Lab: Tone Output Using An Arduino

Related Posts

Fractal Plant – Foiled by  Registers

Homemade Hardware, ITP, Solar Plant

Fractal Plant – Foiled by Registers

Since receiving the PCBs and successfully soldering the board together I have been trying to rewrite code for the I2C port expander. This has been immensely difficult! The Inkplate Arduino Library makes considerable use of an “Mcp” class, which is written to work with the MCP23017 GPIO expander IC. These chips are quite difficult to […]

“Handling” Playtest Week

Handling, ITP

“Handling” Playtest Week

Last week we attended “Playtest Thursday” on the second floor of 370 Jay St with our games. I came away from the experience with some very specific feedback. Seeing a number of people play the game showed me things I didn’t anticipate. Some folks approached the cabinet and immediately treated it as a touch screen. […]

Fractal Plant – Beta Build

Homemade Hardware, ITP, Solar Plant

Fractal Plant – Beta Build

The boards arrived! Amazingly within an hour of one another. Based on the experience I think that JLCPCB is a better value. With shipping OSHPark was $55.50 for 3 boards. JLCPCB was $26.36 for 10 boards. Aside from a higher cost OSHPark also left sharp bits of tabs around the edges of the boards which […]

Recent Posts

  • Fractal Plant – Foiled by  RegistersFractal Plant – Foiled by Registers
    May 9, 2022
  • “Handling” Playtest Week“Handling” Playtest Week
    May 5, 2022
  • Fractal Plant – Beta BuildFractal Plant – Beta Build
    April 24, 2022
Brandon Roots