I
produced this as an illustration of one of the datasets we're using on
our new project, GRIT. Controls explained on the right, but the main thing: clicking on sectors will remove all but the largest 5% of in-flow and out-flow trade connections, making it easier to follow the flows. (And toggling physics off will help with that too, probably...)
I'll be working on more/better ways to 'see' spatial economics as the project goes along and we get into the geography further.
I'm a researcher who's been using Processing for a number of years, and I'm just starting to think/write about it in more depth. A first bit of writing is up, and there'll be more to follow, including some code. Various others in my dept are poking into Processing too, so I'm hoping it'll be a good ongoing discussion.
Anyway, the first post: "What’s the difference between a boxplot and an x-ray? Visualisation and Processing".
I'm using the Processing library in Netbeans and I have a PGraphics object, in which I create vertex shapes. This works fine in JAVA2D (
image here) but not in P2D. I have it working, so that's all good - but was wondering what the problem is with P2D?
I'm drawing polygons, playing with
this library for loading shapefiles (which I don't see in the library list, btw...)
There's a method I pass the PGraphics to, in an object where the polygon data sits. I'm doing it this way so I can draw once, then re-use the image. Anything else is waaay too slow. Method below. In JAVA2D, "do we get here" gets to screen, in P2D not, so it seems to be closing the shape (pg.endShape) that fails: it just hangs.
Any thoughts?
While I'm writing: another shapefile loader in the library (new, MapThing) links only to docs, not to the download zip. I
found the zip here.
So, having sent some people a Java/processing app I made, it turns out since OSX Lion, Apple has applets turned off by default. There's some rigmarole you need to go through to enable it -
Steve Jobs: "Java's not worth building in. Nobody uses Java anymore. It's this big heavyweight ball and chain."
No, no-one's using it - apart from every single Android user, just for starters.
It's deeply annoying having to ask mac users to switch something on before they can view sketches or applets at all.
So, any thoughts on what Apple is up to? Is the Lion decision of a piece with the iphone/ipad OS walled garden - are they deliberately cutting Java off as part of a strategy against Android?
And is Steve Jobs right to call it a "heavyweight ball and chain?" I love programming in Java (and using the Processing library A LOT), but should I be getting out of my coding bunker more?
A visualisation for seeing how a random process a) produces the normal distribution b) leads to predictable outcomes. Bigger explanation on the webpage.
I'm building a graph visualisation for teaching/learning about time series, and have been looking for a way to allow a learner/user to click on html links and immediately see the result I want in the applet window. Aside from actually building a text and link system into the visualisation itself, I've been playing with posting data to the URL and, on reload, using the getDocumentBase() method to grab that info.
Here is the example I just knocked together on top of an old sketch, with three html links reloading the page and telling the sketch to rotate in different ways. Of course, using keys within Processing is better for this example (you can use arrow keys and A+S to rotate, in this case). All I wanted to do here was proof of concept: posting data to the URL and catching it in Java on the reload. I used two java URL methods to parse the URL itself: getQuery() and getRef(). They just pluck out the text after "?" and "#", so that's a convenient way to set a particular variable. The code is linked to: the only odd thing there is the try-catch block so it can be run as a non-browser sketch.
For the tool I'm working on, that should allow a user to click a link, and I can use that to set up the graph data and view in exactly the right way for the particular point I'm trying to get across, without having to ask them to set it up themselves via the Processing window.
So, firstly: did it load at all? I'm worried it's being temperamental on my machine. It seems to be working, but it also seemed to be doing some slightly odd things...
Secondly, are the links working? They work for me, but if the Processing project was too large, long reload times could be a pain.
Thirdly, has anyone else got ideas on how to do this better? Either some other really obvious method of feeding info to the Applet I've missed, or - well, I guess the alternative is just to have a series of numbered links in the Processing sketch itself and ask people to click each when they're at that particular point.
I'm using Processing in my PhD (something I'll write up here in a couple of months in detail, when I'm finished.) Yesterday, however, the model spewed out a series of the most bizarre images completely randomly.
Here's a link to a gallery of some of them.
At the moment, I have only the vaguest idea how it happened. It's a spatial economic model visualisation. The images are somehow related to where firms have bid their price down to zero, so people are attempting to buy near-to-infinite amounts. More than that, at the moment, I'm not sure! So: accidental art. Probably the happiest my PhD has made me, I think...!
Post-PhD, I'll try some more and work out exactly what's going on. I want to know what role the economic interactions have had in producing the range of patterns, or whether pure randomness would have done just as well.