Friday, September 12, 2014

Edmonton's (by)Lawbreakers

Before I get to the fun stats, bear with me while I rant for a bit.

The Edmonton Police Service offers a handy-dandy little tool known as the Neighborhood Crime Map, that shows where crimes take place across the city, and gives some insight into past crime behavior. I was all set to do an analysis of the data, and was pretty excited about what I was going to be able to show, but then more carefully read the terms and conditions which include:

While it is acceptable to pass the website link on to others in your community, you will not share the information found on the website with others other than with members of the Edmonton Police Service or other law enforcement agencies
Seeing as others have explicitly asked for permission to share the data and were turned down, and the EPS has "dealt" with others who used it without permission, I've decided not to publish any of my analysis. But shame on them. The site isn't so user-friendly that it's perfectly optimized to give the best information possible, and offering data to the public but forbidding them from discussing it doesn't really count as "open data."

* * *

That being said, the City of Edmonton publishes open data that's actually open. This includes my new favorite data set: Bylaw Infractions!

The bylaw infraction data set includes heinous crimes like "Weeds" and "Unsightly Property", but also things people are actually concerned about like "Unlicensed Businesses," "Graffiti," and "Snow/Ice on Walk". So lets do everything I would have done for actual crimes, and instead look at people who let their grass grow too long.


Weather, unsurprisingly, has a decent effect on bylaw infractions that are reported. On the one hand, it's not at all surprising that people report weeds in the summer, and snow on sidewalks in the winter:

On the other hand, a similar graph for infractions for unlicensed businesses makes, as far as I know, no sense. For some reason, every January or February a lot of people get fined for unlicensed businesses. Most likely kids selling off their Christmas presents, I reckon:

At least the new year stings seem to be getting less intense over the years... yay?

Finally, we also have graffiti and unsightly property, which look something like this:

Apparently properties are more unsightly during the summer - who knew? More reasonably, the complaints probably are easier to make when there isn't snow covering a poorly-kept lawn (or whatever "unsightly" means...). As for graffiti, there's a fairly consistent double-peak pattern every year, where graffiti artists seem to take a bit of a break around September. Maybe it's something to do with them hooligans getting busy going back to school? Who knows...



Looks an awful lot like graffiti is concentrated downtown and in Strathcona. I'd comment on how that may or may not be associated with actual crimes, but I'm not allowed to by the EPS Terms and Conditions. Instead... it seems correlated with tall buildings...?

Snow/Ice on Walk

Unlike graffiti, snow and ice left on sidewalks seems to be a bit more spread out around the city. Apparently the southern suburbs are either better at shoveling, or better at hiding ice, than their northern neighbors.

Unlicensed Businesses

If you want to run a business but don't have a license, I wouldn't go downtown or to West Edmonton Mall. That's just what they'll be expecting.

Unsightly Property

Mirror, mirror, on the wall, where's the unsightliest property of them all? Well, the most violations happen in Alberta Avenue, and in general just north of downtown. Keep looking sharp, suburbs!


Not super surprisingly, the neighborhoods with high weed violations tend to correlate quite well with unsightly properties. It would really suck to get a double-whammy for both at once, wouldn't it? At least some of the oh-so-pretty suburbs (like Windermere and Summerside) are getting caught on weeds too!

Nosy Neighbors

Take a look at this:

When it comes to who's actually reporting these bylaw infractions, it's almost a perfectly even split between bylaw officers and everyday citizens for "tattle-tale" infractions like not shoveling, ugly houses, and weedy gardens. On the other hand, I'm solidly impressed that the vast majority of unlicensed businesses are reported by citizens. I guess people don't like being ripped off? On the other hand, nobody much seems to mind graffiti apart from the bylaw officers...

So there ya go. Not quite the crime post I wanted, but still fun to look at nonetheless. Thank you to the City of Edmonton for having actual open data, no thank you to the EPS Crime Map, and special thanks to my friend Daniel for suggesting the bylaw infractions as an alternative!

Tuesday, September 2, 2014

Edmonton's Census Correlations

Back in May, a lovely website went viral that listed a number of spurious correlations between unrelated sets of data. It was loads of fun to read, and a lovely reminder that correlation doesn't imply causation.

Edmonton's 2014 census data was released last week, in a glorious Christmas-like occasion for people like me who are into that sort of thing. The census asked a couple fun questions and broke the results down by neighborhood, and I originally figured it might be a fun idea to comb through the data for ridiculous correlations like the Spurious Correlations website.

Unfortunately nothing super ridiculous stood out. Regardless, take a look at some of the more fun findings from the Census that maybe haven't been picked up on by other sources:

Married people don't like renting

I mean, really, nobody really likes renting, but it seems like married people especially don't.

Low apartments make you lazier

In general, living in an apartment correlates with transit alternatives that aren't driving, but people in high-rise apartments walk to work way more than people in shorter apartments. Sure, this is maybe because most of the people who walk to work live downtown and that's where the high-rises are, but it's more fun to think that short apartments compel people to bus...

This fun graph

Basically, as neighborhood populations change, people's jobs change too. For instance, the most common time to have a family member in preschool is when you have people in your house under age 5 (duh), but the second most common is when you have people aged 35-40. That double-peak pattern gets shifted over by 10 years and flattened out for grade 7 kids.

Other moderately interesting (but less pretty to graph) correlations include:

  • Full-time workers like driving their own cars, but only really post-secondary students bother consistently taking transit to work
  • People who've been in their house a long time tend to pay attention to the newspaper and radio more for their city info, but people who've been there for less than 3 years seem to prefer the city website
  • People who go to Catholic school seem to like driving more 
  • People working part-time are more likely to have lived in their house for more than 5 years than people working full-time (but less likely than if there are high school kids in the house!)
  • 25 to 40 year olds tend to move around the most, after then they seem to stick in the same house for a while