RWET – Poetic Form

I  once again continued working with news headlines this week. However this time I think I have a more robust collection of headlines. I found a news api that lets me pull in over 550+ headlines from 60 different news sources. The code I wrote basically gets the list of sources from the API and then uses that list to request 10 headlines from each source. These headlines are then saved in a list together and then if any of them contain numbers (in either written or numerical form) they are sorted into another list based on the numbers they use. E.g “Five people discover volcano”   would be assigned to a list within the 5th slot of another list. I then got the real time and date and tried to have the program print the date and time using these headlines. Here are some results:

2:10:

Alan Shearer Names The Two Strikers Who Can Break His Premier League Goal Record | SPORTbible: This startup wants to send electric planes from London to Paris within 10 years

March 23, 2:39:

The best laptop deals in March 2017: cheap laptops for every budget, twenty-third,

Less than half of women breastfeed after two months, survey finds: thirty-nine

March 23, 3:01:

Obituary: Martin McGuinness died on March 21st, twenty-third

Germany 1-0 England: Three Lions stars rated and slated: Germany 1 England 0: Lukas Podolski bows out with signature thunderbolt to light up final match

3:02:

Police officer, three others killed in Wisconsin shooting: reports: Less than half of women breastfeed after two months, survey finds

3:03:

South Korean ferry in which hundreds died raised after three years: Police Officer, 3 Others Killed in a Shooting in Wisconsin

3:04:

Anti-terror police arrest three in Birmingham after Westminster attack: U.K. Parliament Attacker Leaves Four Dead, Including Police Officer

3:05:

Germany 1-0 England: Three Lions stars rated and slated: Terror Attack Near British Parliament Leaves 5 Dead

[More updates coming]

The last two I found particularly interesting because the headlines refer to the same event with different numbers. In this case it seems like the number of fatalities increased and the second was an updated headline. This is essentially what I was interested in by making a time based form that deals with news. I wanted to create something that relays time in terms of world events. This update underscores both how prevalent this event was in the news of that time but also the nature of the event itself. The juxtaposition of the two headlines about the London attacks with different death tolls actually makes the event seem realer, to me at least. As if that extra person passed away while you were reading about it.

The program also just writes the value of time if it can’t find. I thought this would create the effect of having “unburdened” numbers – or numbers that haven’t been implicated in any major news that day. Refreshing this list over and over shows how certain numbers become widely reported based on the days events while others don’t. I still haven’t nailed this news thing down to where I want it exactly (I think part of the problem is that it takes to long to read through a 24 hour clock) but I think this is the closest I’ve gotten so far in terms of making something interesting.

 

 

Read More

RWET – APIs

I continued to work with headlines and news. This time I used an API to grab the most popular headlines on NYTimes.com and pick a random word to replace with a definition from Oxford dictionary. Sometimes the results don’t make sense but every now an then an interesting replacement occurs. Here are some examples of the output (my favorites are in bold):

Old Headlines:

A Quiet Giant of Investing Weighs In on Trump

Mexico City, Parched and Sinking, Faces a Water Crisis

You May Want to Marry My Husband

Steve Bannon Carries Battles to Another Influential Hub: The Vatican

Lessons on Aging Well, From a 105-Year-Old Cyclist

What a Failed Trump Administration Looks Like

Why Nobody Cares the President Is Lying

A Crack in an Antarctic Ice Shelf Grew 17 Miles in the Last Two Months

Lower Back Ache? Be Active and Wait It Out, New Guidelines Say

36 Hours in San Diego

How New York City Gets Its Electricity

7 Earth-Size Planets Orbit Dwarf Star, NASA and European Astronomers Say

Trump Campaign Aides Had Repeated Contacts With Russian Intelligence

Mental Health Professionals Warn About Trump

Ignorance Is Strength

Keep or Replace Obamacare? It Might Be Up to the States.

How Uber Deceives the Authorities Worldwide

New Headlines:

A Quiet Giant of Investing Weighs In on a trumpet or a trumpet blast

Mexico City, Parched a Boolean operator which gives the value one if and only if all the operands are one, and otherwise has a value of zero Sinking, Faces a Water Crisis

used to refer to the person or people that the speaker is addressing May Want to Marry My Husband

Steve Bannon Carries Battles to Another having great influence on someone or something Hub: The Vatican

Lessons on Aging Well, From used when mentioning someone or something for the first time in a text or conversation 105-Yeused when mentioning someone or something for the first time in a text or conversationr-Old Cyclist

What a Failed Trump the process or activity of running a business, organization, etc. Looks Like

a reason or explanation Nobody Cares the President Is Lying

A very good or skilful in an Antarctic Ice Shelf Grew 17 Miles in the Last Two Months

Lower Back Ache? Be engaging or ready to engage in physically energetic pursuits and Wait It Out, New Guidelines Say

36 Hours in relating to the San or their languages Diego

How New York a large town Gets Its Electricity

7 Earth-Size Planets Orbit Dwarf Star, NASA and relating to or characteristic of Europe or its inhabitants Astronomers Say

Trump Campaign Aides Had Repeated Contacts accompanied by (another person or thing) Russian Intelligence

Mental Health Professionals Warn on the subject of; concerning Trump

Ignorance Iceland (international vehicle registration) Strength

Keep or Replace Obamacare? It Might Be Up used with the base form of a verb to indicate that the verb is in the infinitive, in particular the States.

How Uber Deceives denoting one or more people or things already mentioned or assumed to be common knowledge Authorities Worldwide

If I run it again, It will often yield different results with the same headlines:

 

New Headlines:

A making little or no noise Giant of Investing Weighs In on Trump

Mexico City, Parched and Sinking, Faces a pour or sprinkle water over (a plant or area) in order to encourage plant growth Crisis

You May Want to join in marriage My Husband

What a Failed Trump the process or activity of running a business, organization, etc. Looks Like

Why Nobody Cares the the elected head of a republican state Is Lying

A Crack in the form of the indefinite article (see a) used before words beginning with a vowel sound Antarctic Ice Shelf Grew 17 Miles in the Last Two Months

in what way or manner; by what means New York City Gets Its Electricity

36 Hours in a borough of New York City, at the south-western corner of Long Island. The Brooklyn Bridge (1869\u201383) links Long Island with lower Manhattan

7 Earth-Size Planets Orbit cause to seem small or insignificant in comparison Star, NASA and European Astronomers Say

Trump Campaign Aides Had Repeated Contacts With Russian the ability to acquire and apply knowledge and skills

Mental Health Professionals inform someone in advance of a possible danger, problem, or other unpleasant situation About Trump

lack of knowledge or information Is Strength

Keep or Replace Obamacare? used to refer to a thing previously mentioned or easily identified Might Be Up to the States.

How Uber Deceives denoting one or more people or things already mentioned or assumed to be common knowledge Authorities Worldwide

 

Read More

RWET – Cut up 2: Sets and dictionaries

This week I continued to work with news and tried to make some lightly cut up headlines. What I ended up with is a script that reads in a whole article, splits it into headlines and body (kind of hacky), finds words unique to each article and then randomly replaces words in the headlines with these unique words. Here are some results:

I had to run this a bunch of times to get good results but I was happy with the way it created this news blending effect. I could see working more on distorting news articles.

The code is a bit sloppy this time but I was able to to make some light usage of dictionaries and sets. I found myself relying on lists a lot out of familiarity but could begin to see how other structures would be useful.

 

Read More

Towers of power – Final Proposal

Quest and I are planning to develop a people counting method based on GSM signals. Ideally this device will be able to demodulate GSM packets and extract ISMI numbers to form a list of unique devices which will be used to estimate a population. We see this as having a variety of useful applications from analyzing traffic flow to creating a grassroots means of counting crowds and events. In addition this device could also be used to gauge demand for GSM services in underserved locations. At this point we’ve tried to go through the tutorial available on RTL-SDR.com to demodulate GSM packets on our computers however, there seems to be some installation issues that may require help in office hours. We’ve been trying to learn all we can about the available data without having access to it.

Read More

RWET – Loops and Lists

This week in Reading and Writing Electronic Text I worked with loops and lists to make a script that breaks a series of headlines up into a sort of 24 hour clock. The idea is that each headline its slowly revealed over the course of a day as a play on the idea of the 24 hour news cycle.

I started with a text file that contained headlines from a bunch of large news outlets:

PROBLEM OF THEIR OWN Canada sees spike in border crossings from US
Rex Tillerson Arrives in Mexico Facing Twin Threats to Relations
Kim Jong-nam killing: North Korea condemns Malaysia
ACLU Sues Milwaukee Over Police Stop-and-Frisk Policy
Trump Meets With Corporate CEOs Thursday on Economic Policies
Bannon told EU it was flawed just before Pence’s visit
7 potentially habitable exoplanets discovered
2 cops charged in Florida woman’s accidental shooting death
Obama-linked activists have a ‘training manual’ for protesting Trump

I then shuffled the order of the headlines (to keep the output interesting) and broke each line into a list of words. The number of words in each line was used to figure out how to display it over the course of a day and then each word is designated a time slot. I created a loop to simulate a 24 hour cycle with this method. I imagine this could be a part of an installation that would act live a very slow moving new ticker.

The code:

import sys
import random
all_lines = []
minutes = -60
lines = []

for l in sys.stdin:
lines.append(l.strip())

random.shuffle(lines)

for line in lines:
line = line.strip()
word = line.split(” “)
all_lines.append(word)

for x in range(24):
wordTimerForEachHeadline = []
currentWordNum=[]
minutes+=60
print “\n”,
print “Today’s Headlines”,
print str(minutes/60)+(“:00”)
for i in range(len(all_lines)):
wordTimerForEachHeadline.append(1440/(len(all_lines[i])))
currentWordNum.append(minutes / wordTimerForEachHeadline[i])
print all_lines[i][currentWordNum[i]]

The output:

Today’s Headlines 0:00

Trump

Obama-linked

7

ACLU

Rex

PROBLEM

Bannon

Kim

2

Today’s Headlines 1:00

Trump

Obama-linked

7

ACLU

Rex

PROBLEM

Bannon

Kim

2

Today’s Headlines 2:00

Trump

Obama-linked

7

ACLU

Rex

OF

Bannon

Kim

2

Today’s Headlines 3:00

Meets

activists

7

ACLU

Tillerson

OF

told

Kim

cops

Today’s Headlines 4:00

Meets

activists

7

Sues

Tillerson

THEIR

told

Jong-nam

cops

Today’s Headlines 5:00

Meets

activists

potentially

Sues

Arrives

THEIR

EU

Jong-nam

cops

Today’s Headlines 6:00

With

have

potentially

Sues

Arrives

OWN

EU

Jong-nam

charged

Today’s Headlines 7:00

With

have

potentially

Milwaukee

Arrives

OWN

EU

killing:

charged

Today’s Headlines 8:00

Corporate

a

potentially

Milwaukee

in

Canada

it

killing:

in

Today’s Headlines 9:00

Corporate

a

potentially

Milwaukee

in

Canada

it

killing:

in

Today’s Headlines 10:00

Corporate

a

habitable

Milwaukee

Mexico

sees

was

killing:

in

Today’s Headlines 11:00

CEOs

‘training

habitable

Over

Mexico

sees

was

North

Florida

Today’s Headlines 12:00

CEOs

‘training

habitable

Over

Facing

spike

flawed

North

Florida

Today’s Headlines 13:00

CEOs

‘training

habitable

Over

Facing

spike

flawed

North

Florida

Today’s Headlines 14:00

Thursday

manual’

habitable

Police

Facing

in

flawed

Korea

woman’s

Today’s Headlines 15:00

Thursday

manual’

exoplanets

Police

Twin

in

just

Korea

woman’s

Today’s Headlines 16:00

on

for

exoplanets

Police

Twin

border

just

Korea

accidental

Today’s Headlines 17:00

on

for

exoplanets

Police

Threats

border

before

Korea

accidental

Today’s Headlines 18:00

on

for

exoplanets

Stop-and-Frisk

Threats

crossings

before

condemns

accidental

Today’s Headlines 19:00

Economic

protesting

exoplanets

Stop-and-Frisk

Threats

crossings

before

condemns

shooting

Today’s Headlines 20:00

Economic

protesting

discovered

Stop-and-Frisk

to

from

Pence’s

condemns

shooting

Today’s Headlines 21:00

Economic

protesting

discovered

Policy

to

from

Pence’s

Malaysia

shooting

Today’s Headlines 22:00

Policies

Trump

discovered

Policy

Relations

US

visit

Malaysia

death

Today’s Headlines 23:00

Policies

Trump

discovered

Policy

Relations

US

visit

Malaysia

death

 

 

Read More