Subscribe: AlternateIdea - Home
http://feeds.feedburner.com/encytemedia
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
axes  axis  crime  data  graph  it’s  i’m  i’ve  jqplot  library  new  objectiveresource  portland  stop  store  things  time 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: AlternateIdea - Home

dealloc.me -- Justin Palmer





Last Build Date: Mon, 26 May 2014 14:04:44 PDT

 



Finding the perfect house using open data

Sat, 24 May 2014 00:00:00 PDT

My childhood backyard. Growing up in rural Mississippi had its perks. Most days my brother and I would come home from school, grab a snack from the fridge, and head outside to fish in the pond tucked behind the tree line or play basketball with the neighborhood kids. It was very much a community where everyone knew everyone. I had known many of the kids from my graduating class since second grade and my parents knew their parents since highschool and earlier. As beautiful as my hometown was, it was, like many small towns, economically depressed and void of all but the necessities. As I grew older, I became frustrated by this. We had one small grocery store, one stop light, two movie rental places and not a single fast food restaurant. We had no book stores, no electronic stores, no big-box stores and only a couple of places to grab a bite to eat. Truth be told, the gas station (one of those big ones, forever known as “The BP” long after a name change) was where we picked up most of our take out. When highway 72 was expanded to four lanes, a nearby gas station was converted to a “super” station. It was packed with a pizza place, fresh sub sandwiches, and the best chicken strips that have ever graced the space below a heat lamp. It was the community watering hole. The lack of access eventually wore on me. As I started to grow my design skills (my Hail Mary escape from factory work), I would hear of my peers in larger cities going out to eat, to the movies, or just having a beer at a nearby bar. Beer, by the way, was illegal where I grew up. Not just the consumption of it, the mere possession of it. Portland - Oregon by Patrick M. License CC BY-NC-SA 2.0 By 2007, after a couple of years on the outskirts of Memphis, TN, I had finally had enough and convinced my wife to move to Portland, OR. We knew very little about Portland at the time. In fact, we knew so little about the Pacific Northwest, we moved in the dead of winter, in a sports car, driving through the Cascade mountain range. It’s not exactly something I’m proud of; a hilariously ill-conceived cross-country trip. When we moved to Portland we decided we wanted to be in the center of it all. There was so much life around us; so much happening relative to our rural upbringing. I wanted to be as close to Downtown as I could be so I could go as often as I liked. We eventually settled on the Pearl District. A relatively new residential development that was previously occupied by a rail yard. Finally, I would have the access that I once craved. Almost anything I wanted was a short walk or streetcar ride away. All that I wished for growing up, I would have. Fast forward 7 years and we’re still in the Pearl District. We’ve added a member to our family who now desires access to the things I had while growing up. He wants a yard to play in, a basketball goal and a proper house where he can get excited without disturbing our neighbors. It’s an interesting scenario. The Pearl District and Downtown aren’t exactly teaming with affordable single family homes and the further you move out of the city center, generally the less access you have to the many things a dense urban area has to offer. But, in reality, I only wished for a couple of things out of a new location. The journey begins After thinking about the problem, I decided to list out a set of criteria for a location I would want to live. Other factors will eventually come into play, but I wanted to narrow down the city into “target zones”—that is, zones that meet a set of defined criteria. Walking distance to a grocery store: Living across the street from a grocery store has spoiled me. Walking distance to a rail stop: This will allow me to get to other locations in the city without a car relatively quickly. One could argue the bus system is just as good, but I would argue that it isn’t and I much prefer rail. I defined walking distance as ~5 blocks, but ~10 blocks is still a pretty sane distance. I want to be close to a grocery store and clos[...]



Portland, Oregon: The Age of a City

Sun, 30 Jun 2013 00:00:00 PDT

How old are the houses on your block? After stumbling upon a dataset of the Portland metro area released by the City of Portland, I wanted to answer this question myself. The dataset contains 619,000 structures and 544,033 of them list the year they were created. After loading this up in TileMill and adjusting the color schemes, some beautiful patterns begain to emerge. Interesting facts about the dataset 4,452 structures were created during the 1800s. The oldest identifiable building by name is the Oaks Pioneer Church. The dream of the 90s is still alive in 75,434 structures. The 1890s haven’t fared so well, with only 942 structures still standing. The busiest year was 1978 with 10,265 structures listed. There’s a building on SW Stark built in 1899. It contains a Vintage clothing store. Patterns Patterns are everywhere in the data. It looks like 50s-era housing development relied more on the grid system, than say, the 80s and 90s where the cul-de-sac was seen more often. It’s also interesting how a lot of the neighborhoods east of I-205 didn’t exist prior to the 50s. Sabin/Irvington Neighborhood, NE Portland Beaverton, OR Ladd’s Addition, SE Portland North Portland The Housing Crisis With home prices reaching their peak in 2006, and foreclosures on the rise, you can see a decline in new structures. Eventually this would lead to the sub-prime mortgage crisis. 01000200030004000500060007000200020012002200320042005200620072008200920102011201270596086609861746515651042131916194115421603630347 This has been a fun project and I hope to keep working on it. Maybe take into account the size and type of buildings, or the number of stories. Have a look at the map yourself. I would love to know if you find anything interesting! [...]



Portland Max & Streetcar Crime Data

Tue, 28 Jun 2011 00:00:00 PDT

I’ve added quite a few features to Portland Crime over the past few months: trends, history, and much more. However, one feature request pops up more often than others—public transit crime.

I’ve worked on adding this feature, but I find myself rushing it along due to time constraints and I’m just not happy with the results. Until I find the time to sit down and hash out the design for this feature, I’m going to keep it under wraps.

It’s not all bad news. Just because my efforts haven’t been successful, doesn’t mean others couldn’t use the data in some creative way. With that in mind, I want to share the data I’ve collected with anyone who wants it. Details below.

What counts as a transit crime report?

According to Wikipedia, Portland blocks are 200ft x 200ft. Given teleportation isn’t a reality, it’s assumed you’ll need to cover a minimum distance of 200ft to reach a stop. Therefore, crimes within a radius of 200ft from a MAX stop’s lat,lon point will be counted towards that stop.

There are many factors that can result in one stop having more crime than another stop. Population, ridership and activity to name a few. These numbers are raw counts. They are not adjusted.

Other Information

  • Location: Some crimes don’t include location data and will not be included in totals.
  • Reports, not arrests: These are “reports”. They do not necessarily result in a conviction or arrest.
  • Duplicates: Some stops are on multiple routes and are included more than once. You should not add counts from two stops with the same stop_id together.

Download

That’s it. If you have any questions or requests, feel free to message portlandcrime or me on twitter or email me.

{.info} Download Max & Streetcar Crime Data →

(image) (image)



D3 is Not a Graphing Library, Let's Design a Line Graph

Fri, 24 Jun 2011 00:00:00 PDT

Working with graphing libraries can be tedious. Designing them can be downright frustrating. Each one of them slightly different, but most of them share two common flaws: a design-by-configuration and template design approach. A bar graph can be just a few bars with labels and tick marks…until it isn’t. Want to change the background color? New option. Want to change a bar color? New option. Want to hide the x-axis labels? New option. Want to highlight a specific bar with a different color? Good luck doing that. As long as you stay within the confines of the template, it’s simple, but, anytime you want customize a specific aspect of the original template, more configuration options are added to the library. You should avoid “design by configuration.” I’m going to use jqplot, a pretty popular graphing library, in the following examples. This isn’t an attempt to single out jqplot. Many graphing libraries use this template approach. I’ve went down the rabbit hole myself. With that out of the way, lets take a look at a simple line graph in jqplot. Before we begin: This is not a LOC comparison. This is about writing code that makes sense. I’m using CoffeeScript in most places and JavaScript where appropriate. If you’re not familiar with CoffeeScript, you can follow along with the JavaScript code. The complete CoffeeScript file can be found here. var plot1 = $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]); This looks simple enough. First we include the proper renderers and then we create the default graph by specifying an element and passing in a nested array of data points. Once this renders, we end up with labels, grids, colors and shadows which were never specified. We’ll need to configure the graph to adjust or remove these items. What happens when we need to tweak a few things? We end up with a crazy mix of nested hashes that become really hard to parse. And if you need more than one axis, things can really get crazy. In this jqplot example, “up to 9 y axes are supported”. I’ve never seen a graph with 9 y axes! The larger question is, why would you stop at 9? var plot = $.jqplot ('chart2', [[3,7,9,1,4,6,8,2,5]], { // Give the plot a title. title: 'Plot With Options', // You can specify options for all axes on the plot at once with // the axesDefaults object. Here, we're using a canvas renderer // to draw the axis label which allows rotated text. axesDefaults: { labelRenderer: $.jqplot.CanvasAxisLabelRenderer }, // An axes object holds options for all axes. // Allowable axes are xaxis, x2axis, yaxis, y2axis, y3axis, ... // Up to 9 y axes are supported. axes: { // options for each axis are specified in seperate option objects. xaxis: { label: "X Axis", // Turn off "padding". This will allow data point to lie on the // edges of the grid. Default padding is 1.2 and will keep all // points inside the bounds of the grid. pad: 0 }, yaxis: { label: "Y Axis" } } }); D3: Layers, Shapes, Text and Scales What about D3? D3 is a relatively new visualization library. Created by the extremely talented and proactive, mbostock. D3 can do many things (that we’ll get into later), but for now, let’s define what a “graph” is. At its core, a graph is just layers of paths, primitives, color and text—something SVG is perfectly suited for. Lets take a look at a simple SVG line graph in d3. data = [3,7,9,1,4,6,8,2,5] w = 700 h = 300 max = d3.max(data) # Scales x = d3.scale.linear().domain([0, data.length - 1]).range [0, w] y = d3.scale.linear().domain([0, max]).range [h, 0] # Base vis layer vis = d3.select('#chart') .append('svg:svg') .attr('width', w) .attr('height', h) # Add path layer vis.selectAll('path.l[...]



Hello Again, World

Thu, 16 Jun 2011 00:00:00 PDT

2008 wasn’t that long ago, but it feels like a lifetime since I’ve last blogged in any consistent fashion. A lot has changed since then. The web has changed, Father’s day has new meaning, and a plurality of developers are actually taking JavaScript seriously. It’s amazing what can be accomplished in just a few short years.

It’s an exciting time to be a web developer. Browser vendors are releasing frequent updates, HTML 5 is really taking off and an entire crop of new technologies and toys have surfaced. Node, Mongo, CoffeeScript, Backbone, Polymaps and d3 are several examples of this. Not to mention the proliferation of GitHub has made tracking and contributing to these projects pretty painless.

Speaking of projects, I’ve been working on a few of my own. The one I’m most excited about is Portland Crime. I started Portland Crime back in October of 2010 and shortly thereafter entered it into the city of Portland’s Civic App competition and came away as runner up in 3 categories. At its core, Portland Crime allows you to monitor crime reports in the Portland area. There are also some interesting features such as time of day trends and historical views. The code is open source, feel free to poke around, or even better, contribute to the project.

The next project I’d like to undertake is to start blogging agin. I’ve been working on getting this blog up and running for almost a year. Each time, stopping short of actually publishing anything. I hope to change that, and I hope you’ll stick around for future posts.

(image) (image)



TooGame - Game Videos and Release Dates on your iPhone

Sun, 30 Aug 2009 00:00:00 PDT

I’m an avid console gamer. That means I’m always wondering when the latest and greatest game will be dropped. It was time for an iPhone application.

Logging on to gaming websites on a mobile browser can be painfully slow given most of them are full of ads, images, flash and videos. I wanted something fast and simple that would allow me to see upcoming and recent releases across a variety of popular platforms so I developed TooGame.

(image) (image) (image) (image)

  • You can view upcoming and recent releases within a 30 day span
  • View YouTube videos, details, box art, and genres
  • Reserve or purchase on Amazon using amazon’s mobile site

Check it out on the app store!

(image)

(image) (image)



Introducing HTTPRiot - Easily Consume REST Resources on the iPhone and OS X

Sat, 11 Jul 2009 00:00:00 PDT

If you’ve ever tried to do networking with Foundation you know that wrestling with NSURLConnection and NSURLRequest can be painful. Thankfully, we’ve seen a few third party tools step up to alleviate some of this pain. I want to introduce you to a couple of those tools and show you what I’ve been working on as well. UPDATED: Fixed the permission issue on the download link The current crop of tools There are some excellent HTTP libraries available for the iPhone and OS X. So why do we need another one? Balance. There are two particularly popular libraries that I’m going to talk about: ASIHTTPRequest and ObjectiveResource. I’ll explain the benefits and tradeoffs of each and also explain where HTTPRiot fits in to this equation. ASIHTTPRequest ASIHTTPRequest is a highly flexible lower level tool (relative to HTTPRiot & ObjectiveResource). It can do a lot of things and do them well. Besides the basic GET, POST, PUT and DELETE you can also upload files, post form encoded data, handle basic authentication and a host of other really nice things. Not to mention it can handle synchronous and asynchronous requests–something HTTPRiot and ObjectiveResource can’t do. This library is all about flexibility and this flexibility doesn’t take away from how easy it is to use. This is code you should definitely have in your bag of tricks when you’re in need of an all purpose HTTP library. The tradeoff for ASIHTTPRequest is that it can’t automatically convert XML and JSON. There is also no mechanism for setting default configuration options which results in you having to configure things like delegates and selectors for every asynchronous request. To be fair, ASIHTTPRequest was never meant to be used this way, thus I would take these tradeoffs with a grain of salt. ObjectiveResource If you’ve ever used ActiveResource with Rails you’ll probably be familiar with ObjectiveResource’s style. ObjectiveResources is a high-level library that does a lot of behind the scenes work. It’s built specifically to consume REST resources. It can convert to and from JSON and XML (ASIHTTPRequest can’t) and it will automatically initialize models and do all sorts of other work for you. This makes it a great fit for working in conjunction with a Rails app. The tradeoff of ObjectiveResource is that it doesn’t handle XML and JSON that’s not produced by Rails well. I’m not sure what kind of results you’d get if you fed it something like Govtrack’s bill data. ObjectiveResource is also a big library with a lot of moving parts. In addition to the networking code, the library also includes ObjectiveSupport, a nice library in itself that’s loosely based on ActiveSupport. One final thought about ObjectiveResource—there are a lot of methods added to NSObject. Apple doesn’t explicitly say not to do this, but they do warn you of the consequences: “You can define categories that add methods to the root class, NSObject. Such methods are available to all instances and class objects that are linked into your code. Informal protocols—the basis for the Cocoa delegation mechanism—are declared as categories on NSObject. This wide exposure, however, has its dangers as well as its uses. The behavior you add to every object through a category on NSObject could have consequences that you might not be able to anticipate, leading to crashes, data corruption, or worse.” With all that being said, ObjectiveResource is definitely worth checking out. I know a few people who are using it and love it. HTTPRiot Like ObjectiveResource, HTTPRiot was inspired by its Ruby counterpart: John Nunemaker’s httparty. Hence the name. HTTPRiot serves as a balance between ASIHTTPRequest and ObjectiveResource. You get a certain amount of flexibility and a higher level api. Like ASIHTTPRequest, you can send GET, POST, PUT, and DELETE re[...]



YouTube Launches House & Senate Hubs

Mon, 12 Jan 2009 00:00:00 PST

YouTube has just announced HouseHub and Senate Hub.

(image) (image)



Best Practices For Cocoa and CocoaTouch

Fri, 10 Oct 2008 00:00:00 PDT

Best Practices For Cocoa and CocoaTouch—Invaluable tips from Cocoa developers.

(image) (image)