JOHN LOCKE, ARCHITECT

  • Featured Work
  • Design Blog           
  • Photography
  • Graphic Design
  • Dept of Urban Betterment

About

Hello. I live in New York and work at The Living. I hold a graduate degree from Columbia University's GSAPP and an undergraduate architecture degree from the University of Texas at Austin. I have more than seven years of professional experience at noted architecture firms, including New York-based Rogers Marvel Architects and SOM. I also tackle freelance graphic and photography work with my partner in crime, the multi-talented Jackie Caradonio at Lion in Oil. In addition, I teach a course, Hacking the Urban Experience, at Columbia. View my CV here: CV(html). Thanks and have a nice day.

Contact

john.h.locke{at}gmail.com
310.735.3333

Architecture Portfolios

Portfolio 2002-2007 (issuu)
Portfolio 2008-2009 (issuu)

HOME / BLOG
2012024 research, scripting | No Comments »Tags: research, scripting, twiiter

void in the center

 

I’m pulling the last 100 tweets from within a half mile radius of latitude 40.800808 x longitude -73.965154 (otherwise known as the desk in my bedroom where I’m typing this now). And right off the bat I can see that the tweeting frequency of some of my neighbors is impressive, out of 100 tweets there were only 42 different users, all of whose profile images are displayed above based on the frequency of their messaging. Voyeurism is something built into New York’s dna, the simultaneous repulsion and attraction of surveillance that was so effectively conveyed in Rear Window. Sometimes when riding the train, on the rare occasions when you’re sans earphones, you can’t help overhearing fragments and context-less snippets of random stranger’s conversation. Most of the time they’re pretty banal, on the order of sports predictions and office gossip, about nothing interesting but still interesting. And that’s what makes the hidden, invisible conversations going on in this five block vicinity so fascinating to me in a way I can’t really describe. 100 random tweets hold no mysteries, but the 100 tweets of the people around me do. A secret knowledge that gives added meaning to the ruby aficionado I see walking down the street or the Mavs fan at the bar, all faces that are part of a huge story that can never end. I’ve started following ThatsOro.

 

Click more for the code. Based on great examples here and here.

 

 

import twitter4j.conf.*;
import twitter4j.internal.async.*;
import twitter4j.internal.org.json.*;
import twitter4j.internal.logging.*;
import twitter4j.json.*;
import twitter4j.internal.util.*;
import twitter4j.management.*;
import twitter4j.auth.*;
import twitter4j.api.*;
import twitter4j.util.*;
import twitter4j.internal.http.*;
import twitter4j.*;
import twitter4j.internal.json.*;

ArrayList username = new ArrayList();
ArrayList imgs = new ArrayList();


double lat;
double lon;
double res;
String resUnit;

PImage twitimg;

void setup() {
  size(990, 480);
  background(255);
  smooth();
  noStroke();

  ConfigurationBuilder cb = new ConfigurationBuilder();
  cb.setOAuthConsumerKey("XXXXX");
  cb.setOAuthConsumerSecret("XXXXX");
  cb.setOAuthAccessToken("XXXXX");
  cb.setOAuthAccessTokenSecret("XXXXX");

  lat = 40.800808;
  lon =73.965154;
  res = 1;
  resUnit="mi";

  try {

    Twitter twitter = new TwitterFactory(cb.build()).getInstance();

    Query query = new Query();
    GeoLocation nyc = new GeoLocation(lat, lon);
    query.setGeoCode(nyc, res, resUnit);
    query.setRpp(200);

    QueryResult result = twitter.search(query);


    ArrayList tweets = (ArrayList) result.getTweets();


    for (int i = 0; i < tweets.size(); i++) {
      Tweet t = (Tweet) tweets.get(i);
      String user = t.getFromUser();
      Long id = t.getFromUserId();
      String url = t.getProfileImageUrl();
      String msg = t.getText();
      Date d = t.getCreatedAt();

      username.add(user);

      imgs.add(url);
    };
  }

  catch (TwitterException te) {
    println("Couldn't connect: " + te);
  };
}


void draw() {

  int k = (frameCount % imgs.size()); 
  String pix = imgs.get(k);
  String users = username.get(k);

  PFont font;
  font = loadFont("FuturaLT-ExtraBoldOblique-18.vlw"); 
  fill(0);
  textFont(font);
  text(k + " " + users, 0, 35);

  fill(255, 200);

  rect(0, 0, 220, 45);

  twitimg = loadImage(pix, "png");
  image(twitimg, random(width), random(height));
  //text(users, twitimg.x, twitimg.y);

  fill(255, 1);
  rect(0, 0, width, height);

  fill(222, random(50, 150));
  textSize(random(10, 30));
}
« devilish hairpieces
predator bear »

reply

COPYRIGHT © 2004-2015 \ JOHN LOCKE \ ALL RIGHTS RESERVED (RSS)

TOP OF PAGE

last update: 20150721:2100