Topic Modeling – part 1

I’m going to try to offer an accessible explanation of the topic modeling I’ve been doing over the last couple of weeks. First, a massive shoutout to Joanne for scraping the dataset for us, to Martin and Kevin for their help with the cleaning/sorting/tagging, and to Micki for her suggestion to topic model just the syllabi (the “syllabus” is basically an abstract for each case) instead of the full text of each court decision. The data gathering/production has been an awesome group effort, and the topic model just feels like one piece where I’m steering the ship.

This will be Part 1, covering what LDA topic modeling is, and my first attempt at doing it on this dataset. I’ll link to the R code once we finalize which parts of our project are public and private — for now that’s only in our private data repository but I’m happy to share the code with anyone privately if that’s of interest. Part 2 will cover how I tweaked the model to improve the results.

So, what’s a topic model? The one I’m using is Matt Jockers’ LDA model, which he explains with a lunch buffet metaphor in this blog post. I’ll be honest… it’s not my favorite, but worth a read for a first taste. I’ll see if I can do any better here, though, by walking through my experience.

**Pre-firstly, I do some basic text cleaning. I take out all the punctuation, the numbers, and the whitespace, and make all letters lowercase (otherwise “taco” and “taco,” and “Taco” and “TACO!” are all different words). I also remove common words, based on a pre-determined/widely recognized list of stop words. For this project, if I leave in words like “and”, “because”, and “he”, it will be hard to get clarity about words that are more interesting to me, like “communism” or “obscenity.”

Firstly, I set some parameters for the model. (After that I basically just run a couple lines of code and then wait a few minutes for the computer to execute a series of computations, so “understanding topic modeling” is largely about knowing what the parameters mean.) One parameter I set is how many topics I want the model to return. This step is, as far as I can tell, a bit soft — i.e. I have a feeling that 20 is a more appropriate number of topics than 5 or 100, because Joanne and I brainstormed the topics we saw in the cases and came up with about 12-15. I want to give the model enough breathing room that it comes up with different, distinct topics (for example, to separate “school” and “flag” as two topics) but not so much that we lose the thread of a common idea (I don’t want “school” and “teacher” in two different topics). I started with a number that felt right, 20, knowing that I could adjust after looking at the topics I got.

Another parameter I set is how many times I want the model to sample over the topics. (This is the Gibbs Sampling part of Jockers’ blog post, FYI.) The model starts by taking all the non-stop words that occur at least 5 times in all the corpus, and dumping that list into 20 bins in 20 different random orders. This is the first iteration of our 20 topics: 20 groups of the same words, but randomly ordered as if the words were all equally unrelated. The topics will eventually be ranked from top to bottom, so words at the top are more “important” and words at the bottom are less important in that topic. All words in the whole corpus are present in each topic, they are just ordered by the statistical likelihood that they occur together. In the end, I’ll end up taking the top 10 words from each topic, but I could also examine the top 50 or top 200 if that would be useful to me.

Back to our 20 random buckets: because I set this parameter to 5,000, the model basically “re-creates” the topics 5,000 times, decreasing the amount of randomness with each iteration. Randomness is decreased by examining one word at a time, in the context of its original document (“which other words are present in that syllabus?”) and its current topic (“which other words are important in this topic?”).

So… the model eventually ends up computing that, for instance, the word “communist” co-occurs disproportionately often with the words “party”, “foreign”, “control”, and “soviet,” and those all rise to the top of one of the topics. I can export a spreadsheet that has 20 columns, each with the top 10 words in the topic. Here’s a selection of the topics my first model returned:

spreadsheet of 6 different topics listed out

A human could read a case syllabus and tell you that that particular freedom of speech case is about communism and foreign policy; the computer can compare its words to all the other words it could have had, but didn’t, and tell you that it has a relatively high proportion of Topic 11.

This brings us to the next step. At this point, we have 20 topics — we also want to know how those topics are distributed over the 573 case syllabi. Not every case will fit perfectly into one of those 20 topics, of course, and some may be a mix of multiple topics. That’s totally fine, and I can make a second spreadsheet to explore that. This one is much bigger: each column still represents one topic, so I have one “obscenity” column, one “communism” column, up to my 20 columns. Now, though, each row is for one of the 573 case syllabi, and each cell in the row is the percentage of the case taken up by the corresponding topic. Each row adds up to 1 (i.e. 100%), giving us the distribution for each case across 20 topics.

spreadsheet showing relative percentages of sample topics in several rows of syllabi

Here, we can see a few cases that might potentially be labeled as “obscenity” or “communism” cases, because they have relatively large amounts of those topics. It’s possible to use this data to figure out if two topics consistently occur together, or if a topic ebbs or flows in importance. (For example, in the screenshot above, all of those cases register a 0 for the “university” topic — that is an important speech topic, but it’s not “popular” until later cases.)

These topics and topic distribution are a promising start, but Topics 14 and 15 in particular tell me that I can make the model better. That will be part 2!

NYC Community Fridge Archive – Group Project Update

Omeka Data Entry

As of this morning, we have entered over 60% of the data related to fridges and collections. Our data entry process was complicated by some factors:

  1. As I mentioned last week, Omeka didn’t like us importing a CSV file, so we had to enter every collection and every item manually
  2. Our dataset has a bunch of information that requires more effort to enter: for example, we decided to enter the Instagram handle for a fridge with a link to the Instagram page – same for websites, donation pages, and media coverage. This requires a couple of extra steps that take us some time.
  3. Our dataset (the Google Spreadsheet) was still organized according to our data research, not according to how the Dublincore metadata appear on the Omeka page. Very simply, this meant that we had to jump back and forth on the spreadsheet to copy the information we needed to enter in Omeka. I am happy to announce that our Research Lead (Lola) has edited the columns of the spreadsheet so that now entering the data in Omeka is more intuitive – and thus, easier for us.

Like Bri, I am a fan of Zotero. Zotero is awesome! So, last week I suggested we use Zotero to create a “bibliography” for each fridge. This way, the media coverage does not only look like one long link, but like a proper MLA citation. See the example of the Overthrow Fridge, which had a lot of media coverage because it was the first plant-based community fridge in the city.

I realized that not everyone feels comfortable with Zotero, so I created a tutorial on how to add media coverage to the fridges by using this software, and shared it on our team’s Google drive.

Contributions Page

As I announced last week, the contributions page is up and running. Last night we also did a bunch of testing, to see how different options (and different file types) would look on Omeka. It is our goal to keep testing this function, especially with bigger files, stranger files, and zip files. All kinds of files.

We are all very impatient to receive our first contributions from community fridges, and realized that having “an empty shelf” might not look super appealing to people coming to our website. So, we have decided to start entering:

  • Some of the photos that we took of the fridges. Of course, we need to respect our own terms and conditions, so: no pictures of people without their consent!
  • Articles and media coverage. These will be entered as items in the collection of a fridge.
  • Mission statements and other information that is publicly available on the websites of the fridges.

More Omeka Stuff

We decided to add a page dedicated to “Friends of the Archive”: our stakeholders, meaning all the people we contacted and that gave us feedback, help, and support. Montage will also test out some more functions of Omeka for how metadata are displayed, draft a homepage where we can use CSS, and install OHMS.

Lola also suggested looking at other Omeka projects with basic design, like https://gulaghistory.org by Harvard.

Our next meeting will be dedicated to developing metadata standards for different kinds of contributions: photos, audio, media coverage, poems, stories, and more.

Outreach/Social Media

As many of you have noticed, we have launched a pretty intense social media and outreach campaign. Our Community Outreach Manager (Allison) has figured out a strategy that works pretty well: visiting the fridges in person, sharing images and info about them on Instagram, and then chat with the organizers in the DMs. After establishing a relationship on Instagram, Allison follows up with them via email, to provide them with information about how to contribute to the Archive and how to sign up for the Oral History Project. She will also start contacting the artists that decorated the fridges, to ask them for photos and documentation of their artistic process.

Another important part of outreach will be media coverage: Andy will draft a press release that we can send out to local papers and food media (including podcasts) to promote the launch of our archive. Lola will reach out to CUNY to see if we can get included in a newsletter, or on CUNY tv/radio.

A little messy

For me, it all feels a little messy and hard to wrangle in right now – which it has all along, but I think I expected that to change a bit as time went on. I have really struggled with getting this post up this week – I have been stuck by getting stuck. What is fair to ask of students at this time? How far to push colleagues? How far to push colleagues to push others? Who can help us gauge this? Our deadlines for the semester feel aggressive in the face of the emotional labor we are asking of our students. How could I have not realized that for the sake of the students and also the sake of our group? Our team has been wonderful – but I am struggling not to see some degree of my own failure here. On the other hand, our intention is something we trust and the students who have understood it have expressed a sense of empowerment at the idea. Is it right to ask/push (what is the word) for work from the students I know best? What would be wrong about it? And if there is something wrong, is that absolved by driving outreach to those I don’t know personally? There is something larger to be asked here. Before this project goes wherever it goes after this semester, I am going to have a long, hard look at how we ask what we do of students and how we engage them after they have submitted work. I am also struggling with why, in the face of all of these questions, I am still having a hard time scaling back the vision of how far to reach this semester, which has just a few short weeks remaining. I wish we had 4 more weeks…at least. This is perhaps also complicated by good news, which is that we may have confirmation from a school in Peru, our first global connect. And as another possible outreach angle, I have anonymous work (word clouds and digital images) to share from a teacher – having asked her students the questions from our student submission form. Another possible angle to bring to our group.

At a more process-oriented level, we have been sorting through work flow and diagraming our internal processes for the next round of submissions and/or if we scale to one more level/prepare to scale after the term is over. Our students currently live in NYC, upstate NY, Vermont, Texas, and Virginia – a really nice start of geographic distribution. Their work has made me pause, think, and step back. Some of it is hard to let fully sink in. All are moving in different ways.

Workin’ On It (2/2)

Meme creation as a way towards understanding Law. 

Comedy can create understanding by elevating the everyday or simplifying the incomprehensible. For example: there is a laugh of recognition when the pedestrian woes of our lives are laid out in all their purposelessness, the things we worry about discussed in a line or two as not worth the emphasis we place on them. Alternatively the complex can be broken down in a skit so that we giggle along with the understanding that the preciousness and strain of topics beyond us may not deserve their gravity. This is also a useful way to emphasize crucial points of a complex topic. 

The latest Meme I created is an attempt not at explanation, though that will be a focus for future posts, instead I thought to point at the hilarity of previously grave situations and how they are reflected in contemporary pop culture moments. 

The point is not to laugh at law, but to perhaps laugh at the graveness with which burning one’s personal property was once held in. Of course the burning of draft cards is destruction of government property which is fundamentally different from burning purchased goods. The act of burning the draft card was also taken as a vote of no confidence regarding the American involvement in foreign war. 

Part and parcel of our approach is to make memes which bring loft legal language into easily understood language. We are doing this through infographics which summarize cases and the website will offer brief colloquial explanations of what Freedom of Speech activity was at the center of the case; which is something that can get lost in all the deliberation over it. Offering contemporary, but sometimes trivial examples, allow the viewer to form a connection with the case law, and ultimately invites them to study it further.

Workin’ On It (1/2)

Helping out the rest of the team wherever I can has afforded me the opportunity to work on two small projects that are slowly introducing me to the world of legal language and case studies. The first is reading summaries of cases on Justia, the Supreme Court website for case details, and deciding if it fits with then scope of our “freedom of speech” theme. 

This part of the process involves manually looking at 1st Amendment cases not directly tied to “speech” cases and seeing if they fit. For example there are categories of: campaign spending (cf. governmental corruption), protest demonstrations (other than as pertains to sit-in demonstrations), and free exercise of religion among a dozen others. In each of these may be the odd edge case which requires the group to take a closer look at. Some of these invoice judgements which include terminology like “the free exercise of speech”, “praying”, “making speeches in the park”, or “substantial speech interests”.

What is the most difficult to contend with, however, is how to interpret actions as speech acts. Of course there are two field of Philosophy which contend with this problem: Philosophy of Action and Philosophy of Language. Intentionality, also borrowed from Philosophy, is crucial to deliberating on these issues. What has emerged as clear, and to borrow the Legal-thinking for a moment, have set precedent: Burning cards is seen as an action under “freedom of speech”, so is writing language on clothing. What is not as clear however is praying in schools, gathering in the park which involves chanting, and “a banner that reads ‘SEASONS GREETINGS,’ a creche or Nativity scene, which has been part of this annual display for 40 years or more”. 

During the course of this project I wonder to myself how many non-speech acts will fall under “freedom of speech”. How many other instances of human behavior which the government can “censor” or “interfere” with, will need to go before the court? These non-verbal ways of communication provide interesting edge cases through which lawyers must interpret Causation and Responsibility as well, making for an interesting discussion of Metaphysics. But that isn’t the end, since there is a value judgement placed on these actions which determine the potential harm to society or to oneself. Lawyers and Judges must make a call based on Ethics as well. This should strike anyone who understands the history of Law as a series of cultural touchstones as unsurprising.

Personal Blog #7: Organized Chaos

This week’s tasks were all about organization. Each of us have been gathering so many links and images to rebus sources that our Google folders were becoming unruly. As a result, we were at a standstill as to how to go about curating the rebuses to add to the website. We settled on a method and have recently finalized the metadata thanks to Ostap. So, now the not-so-fun part of creating docs, copying, pasting, putting into folders, etc. And then we’ll finally be able to see everything we’ve collected and narrow down a final corpus. I’m a bit behind on doing this due to a busy work week but hope to catch up this weekend.

Bianca’s discovery of “rebus” in the crossword puzzle last week had me thinking about rebuses which use type only, different from the pictorial rebuses that I have been focusing on. I found an article on the English literal rebus and will try to type some clever examples. It’s surprisingly difficult to type some of these given the limitations of computer word processing (typewriter, where are you?) and I’m not even sure how they will turn out in WordPress… Answers at the bottom of the post.

B
—–
TIME

DOSE DOSE

B
E
A
T

THEHANGRE

Answers: be on time, double dose, down beat, hang in there!

Personal Blog- Giving back/incentives

This week our team focused on incentives and rewards for our contributors. This conversation reminded me of my Open Education and Open Educational Resources studies in my Digital Pedagogy course. There, I learned about co-creation practice, when the educator/instruct and the learners work together to construct a piece of material that others can use. During this practice, educators have to make sure the learners are still learning while contributing to the collaborative work. They also have to make sure to scale their work and that each learner has the necessary skill and equipment to contribute to the creation. With care and inclusivity, the instruct must note the amount of time, effort, and dedication the class takes to assemble the product that may be used for years to come. With this comes the issue with incentives.

In this vein, our team made a point to discuss the incentives and rewards not only for our awesome young ladies that contributed, took the time to meet with us, create a sample project, and assisted in some of the decision making for our site, but also the students who took the time to create wonderful works of arts for our archive. We are still deciding how best to recognize their achievements and make them feel part of the archival process, making truly a by the youth for the youth project.

Personal Blog – Metadata

This week, I’m focusing on producing what will eventually amount to appraisal of my collection of heraldry that I’ve amassed. The first step was going through my entire collection and selecting the most appropriate and viable images. This was somewhat time-consuming, but relatively easy. Generally, I selected the images that were larger, more vibrant, and more detailed. For instance:

This is an example of a coat of arms that would fit the bill.
This image depicts an example of an element of heraldry, the canton. This image is smaller, and has less detail, and for good reason too – it’s mainly to demonstrate where the canton would appear on a coat of arms. Thus, it wouldn’t serve as well as, for instance, the above image.

I narrowed the collection down to roughly 33 images from the 400 or so I have collected. By appending metadata to an image, one can give it empirical context. In other words, in the case of our project, a user that comes to the site and sees a rebus will have less trouble interpreting or analyzing it if something of a “given” is established by way of metadata.

Personal Blog: Visiting City Hall Park

I finally found time this past weekend to visit my cemetery location in person. Even before the pandemic I never spent that much time downtown, but I have visited City Hall Park numerous times since moving here (13 years ago). What struck me most was how little I had paid attention before. Everything I thought I had “discovered” about the area was all laid out in a massive ground plaque near the south entrance. The public executions, the jails, that City Hall and Tweed Courthouse occupy the places where the First and Second Almshouses stood, respectively.

Commemorative Plaque in City Hall Park Reading Cradle of Liberty

Commemorative plaque in City Hall Park, section of which reads “Cradle of Liberty.” Image taken by Bri April 10, 2021.

The plaque is a large circle of dark stone, with different segments representing different historical eras, from Dutch settlement to 1999—the date of a major renovation to the park. The plaque strikes me as something that was a much better idea on paper than it is in reality. The surface is very slick and must be very hazardous to walk over in inclement weather (the city has been sued over it: see here). In addition, it is just not very easy to read. The letters are filled with dirt, pigeon droppings, and other debris; the large segment size and the curved lines make the text and accompanying maps that much harder to read. I spent the better part of 20 minutes trying to get through it all, and I was already familiar with much of the history being relayed. It is both too much text and not enough, in my opinion. The period covered is too long for a plaque to provide any depth to the historical eras. And the particularly troubling aspects of the space have been carefully assigned to the Dutch (public executions) and British (starvation and execution of American prisoners of war). The inheritance is acknowledged, but only at a surface level (quite literally).

I spent much of my visit then walking around the entirety of the park and examining City Hall for just about every angle. I experienced many complicated feelings. It is a beautiful building, made all the more picturesque by the magnolias in full bloom. But the police were ever-present, and there are barricades all around City Hall, keeping everyone from getting very close—the seat of government barricaded from the very people it represents. (It seems like these have been left up since last summer during the George Floyd protests and subsequent short-lived Occupy City Hall movement demanding the city defund the police; see here.)

Blooming Magnolia Trees in Front of New York City Hall

Blooming magnolia trees in front of New York City Hall. Image taken by Bri April 10, 2021.

Despite knowing which corner of the park held the cemetery marker I was here to visit, it took me forever to find it. It is technically part of the park, but it is outside the nicely manicured and ornately fenced part of the park, in a more shabby small grassy area on Centre Street near Chambers Street. This marker is also light on details. These “fragmentary remains” were disturbed and reinterred here as the result of a 2010 renovation of the area, which has me wondering how many bodies were disturbed and disregarded in earlier renovations and construction projects in the space. Executed bodies, incarcerated bodies, starved bodies, poor bodies—bodies treated as a burden to the State in both life and death.

Fragmentary Remains Marker in City Hall Park

Burial marker in City Hall Park: “The fragmentary remains of early New Yorkers were found by archeologists during construction in the vicinity of City Hall Park and reinterred at this site by the City in 2010. Multiple 18th-century burial grounds once existed here associated with the Almshouse, a poorhouse built in 1736 where City Hall now stands; the Barracks, four structures in the north of the park built by the British in 1757 to house soldiers; the New Gaol, a prison east of City Hall built in 1759; and the Bridewell, a prison to the west of City Hall built in 1775. The adjacent African Burial Ground was in use by 1712. During subsequent excavation in the vicinity of City Hall Park and Tweed Courthouse as part of the 2010 City Hall Rehabilitation project, addition fragmentary remains of early New Yorkers were unearthed and reinterred at this site by the City in 2013.” Image taken by Bri April 10, 2021.

The costs of volunteerism and visibility

As Amanda points out, our recent outreach efforts have surfaced new learnings related to the well being and concerns of our contributors. The process of soliciting contributions has raised questions of reciprocity and the importance of understanding not just the general contexts but more significantly the immediate perceptions of our participants. Similarly, shifts from initial commitments to reticence to contribute highlight the risks of sharing personal experiences with the public at large. These learnings once again foreground the importance of engaging with a praxis of ethical care.

As one approach to an ethic of care, Rita Manning describes an ethic of care as “a way of understanding one’s moral role, of looking at moral issues and coming to an accommodation in moral situations”. She further defines care as involving “a basic human capacity to recognize and respond to the needs of others and to moderate our behavior in light of the good or harm it might cause to others.” Manning highlights four aspects of care: (1) moral attention, (2) sympathetic understanding, (3) relationship awareness, and (4) accommodation and harmony  (Manning 2009, 105-107).

In constructing a website and archive dedicated to the amplification of under-represented voices, it is easy to overlook the time and effort taken by contributors to create contributions. This raises the question of volunteerism within an environment of pressures and stresses, resulting in large part from the consequences of regimes of neoliberal austerity. It could be argued that our time under these regimes of exploitation and oppression becomes the ultimate site of extraction. As perhaps the most existentially finite resource without which life is impossible, time for living and being could arguably be counted as one of the most precious characteristics of life within the biosphere. Given the extent of already extracted time, setting aside additional time often involves difficult evaluations. Moral incentives and volunteerism need to be understood in the context of these and other pressures and stresses.

In terms of vulnerabilities resulting from publicly sharing personal experiences, the environment of public spaces under current adversarial and competitive conditions is fraught with potential abuses that often result in negative consequences. As digital media increasingly reduces the possibilities of anonymity, sharing personal experiences leads to justifiable ambivalence. This ambivalence prompts an imaginary of a world of public spaces designed to protect the privacy of individuals and their public personas. Until these protections are in place, it would seem to be a practical matter to carve out smaller protectable spaces within the world wide (and wild) web. As content creators consider these issues, the dilemma remains between the potential benefit through public visibility and the costs of such visibility.

Reference

Manning, Rita. 2009. “A Care Approach” in A Companion to Bioethics, 2nd Ed. edited by Helga Kuhse and Peter Singer 105-116. Chichester, UK: John Wiley & Sons.