Time Series Analysis of Trending Topics: Taylor Swift & Ebola

I thought it might be interesting to plot two very different trending topics over time using Twitter Trending Topic data. I imagined the twitterverse would be caught up in a pop culture vortex anticipating Taylor Swift’s new album, but in fact, all it took was one Ebola case in the US to turn it into a massively trending topic. Ebola has trended 78709 times this month, while Taylor Swift has trended only 3253 times. Obviously this is not a fair or appropriate juxtaposition, but I went ahead with it anyway.

Area. Red = Ebola, Green = Taylor Swift

Stacked Bar

For the Taylor Swift plot, a key date is Oct 21st when Taylor Swift accidentally released 8 seconds of white noise on iTunes in Canada, topping the Canadian charts. Oct 12th she made TV appearances and announced that she would release a new single on Oct 14th.

For the Ebola plot, a key date is the first death from the virus in the US on Oct 8th—leading to a huge spike in twitterverse. On Oct 13th, a nurse who became infected was identified and revealed to be on the road to recovery, and there is another spike.

I used the top locations where Taylor Swift was trending for both plots. Below is the full list of top 10 for each topic. Interestingly, Ottawa is the most on top of both of these trends.

# of times “Ebola” was in the Trending Topics this month:
Ottawa 2520
Toronto 1745
Portsmouth 1666
Bristol 1603
Austin 1542
Denver 1482
Birmingham 1471
New Orleans 1464
Cincinnati 1461
Winnipeg 1429
Norfolk 1409
Indianapolis 1308
San Antonio 1274
Atlanta 1269
Detroit 1268
Orlando 1248
Dublin 1245
Dallas-Ft. Worth 1236
Providence 1231
Phoenix 1222

# of times “Taylor Swift” was in the Trending Topics this month:
Ottawa 184
Brisbane 146
Birmingham 141
Kuala Lumpur 140
Dublin 140
Manchester 132
Brighton 106
Calgary 96
Leicester 88
Sheffield 87
Glasgow 82
Salt Lake City 75
Klang 73
San Diego 71
Bekasi 69
Nottingham 69
Cardiff 68
Charlotte 67
Belfast 66
Perth 63

It might be more interesting to try to plot the tone of the phrases people use in regards to these two topics. I’ll save that for another day.

Meat is Murder tag recommender system for spambots

The first thing I think of when I hear recommendation system, is a music recommendation system. So I tried to make one using Instagram data, which is probably the wrong form of social media / tag, but I was curious to see what might happen.

I set up a remote server and ran this script as a cronjob every 15 minutes for a few days, gathering a dataset of 61974 Instagram media items that contained the hashtag “music.”

Then I loaded all of the 300+ pickle files into an ipython notebook. I made a hashtable of users to tags, where each tag had a number that represents how often that user used that tag in connection with music.

I found that only 165 users produced all 61974 instagram posts. Obviously I screwed up the way I calculated the max_tag_id. As it turns out, I only got 198 unique media items. I’ll look into this later. In the meantime, I’ll use the Pearson Correlation Coefficient to smooth out the weight of each user’s tag.

I decided to run this again 200 times on a more specific tag where I might get multiple instagram posts from the same user. So I used the Morrissey with a dataset of 200 items. This time I got 4097 unique users and 8741 on 6633 media items.

I used like count to weight each tag, with each instance of the tag adding 1 and each tag adding 0.25.

The most popular tags:

‘morrissey’, 6623
‘thesmiths’, 2435
‘moz’, 1635
‘music’, 500
‘mozarmy’, 493
‘concert’, 385
‘live’, 351
‘love’, 298
‘smiths’, 267
‘truetoyou’, 233

User-Based Collaborative Filtering / Cosine Similarity & K-nearest neighbor

For a random user, olivia.lord, here are 10 nearest neighbors:

[(0.655, 'luke_ellis92'), (0.655, 'lau211'), (0.617, 'pixie_xtears'), (0.567, 'ramon_maspons'), (0.567, 'alanakillsit'), (0.535, 'willpagemlir'), (0.535, 'whorissey'), (0.535, 'v17tty'), (0.535, 'trimmtrabb_'), (0.535, 'thejacobgann')]

I also tried recommending tags to users with Manhattan. That gave far fewer results. For example, it did not return any results for olivia.lord. melchiano, it gave two results: (‘meatismurder’, 4), (‘pescara’, 4).
Item/Tag-Based Collaborative Filtering

Here are the 20 top tags for ‘Morrissey’:

[(0.795, 'thesmiths'), (0.772, 'moz'), (0.643, 'londonisdead'), (0.613, 'losangeles'), (0.612, 'london'), (0.611, 'mozsquad'), (0.61, 'superestrella'), (0.61, 'rockentuidioma'), (0.61, u'ma\u0144a'), (0.61, 'madentertainment'), (0.61, 'kroq'), (0.61, 'elmovimientodelrock'), (0.609, 'tributoacaifanes'), (0.609, 'pergamo'), (0.609, 'mana'), (0.609, 'flashback'), (0.609, 'eastlosangeles'), (0.609, 'citiesnightlife'), (0.608, 'jaguares'), (0.608, 'citiesrestaurant')]

for ‘music’:

[(0.536, 'instamusic'), (0.487, 'rock'), (0.455, 'follow4follow'), (0.44, 'instarock'), (0.44, 'igersmilano'), (0.435, 'musicarock'), (0.435, 'enjoy'), (0.434, 'igersitaly'), (0.431, 'instagold'), (0.43, 'britrock'), (0.419, 'gig'), (0.408, 'gigs'), (0.403, 'uk'), (0.395, 'tagsforlikes'), (0.394, 'teatrolinear4ciak'), (0.394, 'nightclub'), (0.393, 'nightlife'), (0.372, 'night'), (0.363, 'likeforlike'), (0.36, 'milan')]

for ‘mozfest’:

[(1.0, 'twisterella'), (1.0, 'piccadilly'), (1.0, 'ijo'), (1.0, 'hijau'), (1.0, 'bandung'), (0.577, 'underground'), (0.5, 'indonesia'), (0.2, 'pop'), (0.005, 'morrissey'),

for ‘vegan’:

[(0.715, 'savethemall'), (0.701, 'savetheanimals'), (0.701, '17ottobre2014'), (0.695, 'nikon'), (0.642, 'govegan'), (0.377, 'paladozza'), (0.311, 'worldofmortissey'), (0.311, 'thesmuths'), (0.311, 'postconcert'), (0.311, 'parnaso'), (0.311, 'igersrome'), (0.311, 'ig_rome'), (0.311, 'ig_italia'), (0.311, 'animalliberationfrobt'), (0.294, 'worldofmorrissey'), (0.294, 'liveinrome'), (0.278, 'peta'), (0.275, 'charme'), (0.257, 'concert'), (0.234, 'traplord')]

for ‘meat’:

[(0.612, 'murder'), (0.426, 'animals'), (0.408, 'free'), (0.354, 'witness'), (0.354, 'will'), (0.354, 'whoputthe'), (0.354, 'wearing'), (0.354, 'up'), (0.354, 'unhappy'), (0.354, 'typical'), (0.354, 'twitter'), (0.354, 'town'), (0.354, 'tormentors'), (0.354, 'toosoon'), (0.354, 'there'), (0.354, 'thequeenisdeath'), (0.354, 'theonlyonearoundherewhoisme'), (0.354, 'stop'), (0.354, 'speechless'), (0.354, 'smithsarmy')]

Sequencer Concept: WAAM

I’m really inspired by the Web Audio API. Anybody on a desktop web browser can just open up their JavaScript console, give themselves some oscillators, and make a modular synth.

I’m also inspired by the web’s potential as an educational resource where you can learn by remixing other people’s work. For example, kids are learning how to code by remixing Scratch projects.

There have been attempts to create a standardized platform to share Web Audio code modules. For example, component.fm—it’s really cool! Similarly, there are application-specific sites like sccode, for people interested in sharing SuperCollider code. There are also sites that let people make music by adding a visual interface or live coding environment to the web audio api. For example, Web Audio Playground, Wavepot, Gibber. And then there are sites that just let people make music in a browser, like AudioTool and Soundation.

I want to make a website where people can not only share/remix each other’s modules through code, but also make music with them. The site’s temporary title/url is WAAM.cc or WAMod.cc. It would serve two general audiences: people who code, and people who make music. Sometimes, these audiences overlap.

The site allows users to store and browse at least two types of data objects:

  1. Musical patterns – kind of like MIDI scores, a series of note on/off, velocity, with multiple voices/channels
    • patterns have a BPM, beat-length, tatum-length, loop on/off
    • patterns can include multiple voices
    • patterns can be programmed “live” using MIDI or ASCII. Patterns can also be programmed via a visual interface. Patterns will display in a visual interface.
  2. Synth instruments – the voices used to play back musical patterns
    • synths output digital audio
    • synths standardized constructor and methods like
      • triggerAttack
      • triggerRelease
    • synths have “public” variables that can be modified through a visual interface, or mapped to MIDI input
    • synths have authors, and contributors

Continue reading

Thumb Piano


I made a thumb piano / kalimba / mbira / sanza / likembe / lamellaphone / out of tines from a sprung steel rake. It was very difficult to find a rake, since most people don’t have anything to rake here in NYC. I tried Home Depot, Ace Hardware, a few small hardware/home/garden shops and finally found one at Garber’s Hardware. I took a 20 minute walk with rake in hand. Along the way, I picked up a bike spoke which would come in handy later. I knew because I was following some good directions.

2014-10-16 15.18.38

I hacksawed off some tines, and they were very difficult to remove. I had to strip the paint off to slide them through…

2014-10-16 16.11.42

I picked up this electrical grounding bar with set screws that could be used to secure the tines and easily adjust their tuning. I used the metal saw to chop off the terminals I wouldn’t use (it had 21). Unfortunately it only has two spaces for screws that can fasted it to the base (a block of oak wood, in this case). And those two spaces are on the far left side, leaving the spaces on the far right slightly unsecured and buzzy. I’d like to do something about this eventually. But anyway…

2014-10-16 16.44.45

The bike spoke sits in the bridge and the vibrations of tine against this metal spoke help enhance the vibrations.

2014-10-16 17.19.10

I borrowed some glue to secure the bike spoke after filing space for the bike spoke to sit.

2014-10-16 23.14.45I experimented with placement of two blocks of wood on either side of the set screw terminal, using a tine to try to determine where I could get the best tension…

2014-10-16 17.01.08

 

I secured the wooden pieces with self-drilling screws and they are so thin (and 1/4″) that one of them snapped because of the tension. But it’s ok for now…and here’s where I’m at so far! I haven’t really tried to tune it yet just messing around with tones/overtones that sound interesting…

Inspiration:

Instructables Set Screw Lamellaphone

Kalimba Magic

Bart Hopkin’s book Musical Instrument Design

Next: Overtone Tuning in Lamellaphones

DRM for In Vitro Meat: The Carnoisser

John, Karam and I met up a couple times this week, and I think we’ve narrowed in on an idea.

We’re interested in exploring the “open source / closed source” axis for a future of meat that could involve 3d bio-printing. We want to highlight the contrast between this technology’s rhetoric (potential to feed the entire world!), vs. the realities of our capitalist food system.

We considered writing a speculative patent application.

Now we are leaning more towards making a marketing pamphlet for a product called the Carnoisser.

The Carnoisser will be sort of like a hybrid between a Maker Bot and a Keurig. John pointed out how Keurig, the coffee pod pioneer, has taken measures to discourage DIY pods and promote only the use of licensed Keurig pods.
2014-10-14 15.23.19

Terreform ONE

This weekend, I tagged along on a guided tour of New Lab and the Brooklyn Navy Yards, courtesy of Mitchell Joachim of Terreform ONE. Mitchell is an ecological architect who uses biomaterials to promote sustainable design. I had hoped to talk about his projects like the in vitro meat habitat (pictured below) but wound up hopping on a tour that he was giving his class of architecture students from RPI.

 

2014-10-12 14.59.56

BIodegradable chair for kids, made of mushrooms and cellulose

2014-10-12 14.51.10

Fab Tree Hab – Living Tree House

2014-10-12 14.52.30

Heavy Duty 3d (bio?) Printer

2014-10-12 14.59.53

In Vitro Meat Habitat

2014-10-12 14.57.05

Bottom Right: prototype for a Post Carbon City made with Phytoplankton

Our group has narrowed down an idea of what we’d like to make, and we need more information about what the future might hold for 3D Bio Printing.

Lamellophone

I’m going to make a thumb piano.

I’m planning to use:

– metal tines from a rake, or spring-tempered steel from here. The tines will average less than 10cm and I’d like to have 12 of them, which would make 120cm or about 4 feet.
– resonant wood (I’ve been saving my oak)
– bike spoke
15 terminal grounding bar with 3 spots to mount to base

I’m reading Bart Hopkin’s book on musical instrument design and looking here for some guidelines.

Some notes:

Frequency = A/Length^2 where A is some value of the material itself.

Overtones: “you can make the fundamental more prominent and increase sustain by creating a tongue shape with more mass toward the end or, equivalently, thinning it near the base (which also, of course, lowers the pitch)”

In Vitro Meat + Plankton + Pumpkin Group Brainstorm

Themes:

  • Energy
  • How would this solve hunger / food scarcity / part of a bigger system of change?
  • food chain ethics
  • “natural” (w/ human involvement? over time vs. immediate lab results?)
  • cloning organs / body parts for health
  • immortal cells
  • what happens if Future Foods succeed?
    • to livestock (cattle? pigs?)
    • to cultures where meat is prominent (Mongolia? Argentina?)
  • Productivity vs Income graph –> cheap food / who profits from “cheap” food and can cheap also be sustainable?
  • Patents vs open source food solutions / food phreaking

Dimensions to Map:

Vegan vs Paleo
Legal to Illegal
Ethics
distance from source
energy produced / consumed
time to produce
environmental sustainability
GMO vs Selective Breeding
Natural to Modified
$$$ to ¢

Sheet Metal + Oak

This week’s prompt was to make anything out of any two materials. I was overwhelmed by the options. I couldn’t pick two materials, let alone decide what I wanted to make. Ideally, the concept should come first. I had a bunch of ideas, but couldn’t commit to one. Instead I decided to let the materials guide me. I settled on sheet metal and oak, thinking they could be used to make some sort of instrument, perhaps as research for my NIME project.

When I approach fabrication, it’s important for me to feel that whatever I’m making will be useful. I fear wasting resources on something that I won’t actually use. Of course, I learn through the process of making, so that’s useful. But I want to be able to take pride in the physical manifestation of the learning process.

This is not something that I feel when I’m programming. When I’m programming, I don’t need to worry about whether what I make will be useful, because it will not take up space in my blue bin. If I’m not proud of the final product, nobody else will have to see it. And if I spontaneously decide to incorporate some new element, I can download it for free in seconds. I can get away with these kinds of things in my creative programming explorations. But with fabrication, I’ve found that I really need to take time to sketch and outline a plan.

Unfortunately, I did not settle on any single plan this week. Here’s where that led: Continue reading

Enclosure

I set about trying to turn this radio shack speaker into a guitar amplifier by adding my an amplifier circuit, a gain knob, an input jack, and an on/off switch.

I thought that using an existing enclosure from the scrap shelf would be better than building my own, since I had some wood that was very thin and would probably have to glue it together anyway. It turns out this may not have been the best idea. The radio shack speaker’s enclosure was glued together, the electronics were glued too. It had a thick layer of particle board that I had to chip away to make room for my panel mount components. This also made soldering pretty difficult. I finished soldering the circuit but need to troubleshoot because it isn’t functioning just yet. Next time I will give myself more time and plan further in advance!



2014-10-02 20.25.23