Where do student fees go?

I combined the PFC, ACFC, DFC, and EMU budget documents from the ASUO website to make a bubble chart of 2010-2011 incidental (student) fee allocation. Check out the bubble chart of the 2010-2011 distribution below, and feel free to create your own visualizations from the data set with IBM Many Eyes.

Thanks to the Oregon Commentator for the EMU numbers.

Posted in Blogs Import Web, Visualizations | Tagged , , , , , , , , | Leave a comment

IBM Many Eyes: Visualizing ASUO PFC budget data

Posted in Blogs Import Web, Uncategorized | Leave a comment

Update: YQL/jQuery RSS aggregator

I rewrote the script from my previous post to pull a couple more sources and sort them by publication date.

– Using the Yahoo-generated REST query seems to work better than assembling it myself, but I’m not sure why. When I build it, it returns the results, but it doesn’t sort them — it’s just the feeds stacked on top of each other.

– I borrowed the sub-query code to sort and filter unique entries from this question on Stack Overflow. Again, I haven’t been able to get it to work when generating it in the script. More investigation here is needed.

– It’s hard to tell which feed is which when you get the merged data back. I wrote some quick regexps that test the link URL, but that’s not ideal. It’s not clear if there’s a clean solution. I feel relatively comfortable with it because we’re consuming our own data sources.

– To limit the number of results, use truncate. It may seem obvious, but using limit doesn’t do what you want. “Piping” the result to truncate at the end is right (I think).

– Don’t select *. By grabbing only the fields you need, you reduce the size of response by a lot. The body of the posts are really big, for example.

– jQuery loves trying to make life easier with anonymous callbacks, but it breaks caching. I think. Anyway, if you define you callback function, you’re probably making it easier for Yahoo to cache the query. The WordPress blogs aren’t especially speedy, so in addition to reducing load for Yahoo, it may decrease client load times by caching. I’m not sure about any of that. Maybe Yahoo can cache the same query with different callbacks. I should probably back up these claims with some research and experiments.

Future: I’d like to pull the images from the blog to tease them. This conflicts with the don’t-select-everything idea because the image tags are in the post body. I have two ideas so far to fix this: Get the image URL into a different field (maybe the summary?) or perform a second query on the client to get the post’s body data.

Posted in Blogs Import Web, Frontend, jQuery | Leave a comment

Teasing WordPress posts with YQL, jQuery, JSONP and iframes

The Emerald’s blogs run on an install of WordPress MU. I wanted to pull the latest post on each blog into the homepage of the main site to drive traffic to ‘em. I obviously didn’t want to update the teases by hand — that would just be silly.

Bonus: this way I get to play with YQL. It’s pretty neat. YQL, in brief, lets me throw a WordPress RSS feed at it and it gracefully returns JSON data for me to play with.

Many of the YQL-jQuery examples use anonymous JSONP callback functions which break caching on YQL’s end because every request is different. I believe strongly in caching, so I defined static callback functions to standardize the GET requests being sent to Yahoo. I hope this means they can cache those queries.

The ability to use a SQL-like query language to pull RSS, get just the title and link properties, and limit to the more recent post is just awesome.

I’ve included the code below, but it’s running for real here.

The iframe in the homepage of dailyemerald.com grabs that page and boom. Done.

Except sometimes it grabs an ad. I think CollegePublisher is doing some JavaScript-iframe magic to display ads or something, but I’m not sure exactly what. Even if I knew, I’m not sure I could anything about it. Room for growth.

Feel free to use/enhance/maim/whatever the code. It’s not pretty, but it works. *fingerscrossed* Please let me know if you use it or make it better.

Posted in Blogs Import Web, Frontend, jQuery | Tagged , , , , , , | 1 Comment