It can get pretty quiet here. See Bostonography or Axis Maps for some other posts.

A guide to not being a sidewalk jerk

Hello friends.

It has become apparent that you are all terrible at being pedestrians. I feel confident saying that despite some good eggs and battle-tested walkers such as New Yorkers, most Americans are obliviously selfish, inconsiderate users of sidewalk space. It’s true even in a city like mine, where a large chunk of people commute on foot.

Perhaps it’s because cars are the default mode of transportation in this country, and once on foot outside a car, people view everything as some kind of personal leisure space, not a system that still requires a certain amount of order, competition, and cooperation.

Whatever the cause, the point is, my friends, that you are always getting in the damn way of other people who are trying to get places. I know you don’t mean to, but you do.

But I’m here to help. Here, using some handy diagrams, is a short guide to not being a jerk and getting the hell out of the way.

Guide to Not Being a Sidewalk Jerk

You’re welcome. Now get out of the way.

| 2 comments

2015

Sure, whatever, a 2015 retrospective. It’s no best-of list, reflection on the mapping industry, nor quantified-self infographic. I just thought a bit about what was important in my year—mostly, themes of friends, family, health, and beer—and sketched a few things, in map form of course. So yeah, it’s personal stuff that nobody else will care about, but hey, it was a nice exercise.

sunset Ocean City NJ
1. The Setting Sun
My grandmother, who would turn 96 today, passed away in March. We miss her dearly, of course, but there’s a comfort in seeing her honored in the sky every single day. Grandma appreciated a sunset like nobody else, and never missed a chance to greet “Mr. Moon” at night. During family vacations to the Jersey Shore each summer she led us all in the daily habit of gathering on the porch to watch the sun set over the marshes. Lately those shore vacations have coincided with my grandparents’ anniversary, so here in this map is the azimuth of sunset over Ocean City, New Jersey on July 25, 2015 when, despite her absence, the family marked their 73 happy years of marriage.

places visited 2015
2. The Places You’ll Go, The People You’ll See
This is a map of every place I visited long enough to stay at least a night in 2015. It wasn’t much of a year for travel but it did involve more out-of-town conferences than usual (NACIS, State of the Map US, even AAG a bit), and that brings extra appreciation of the people in my professional community. I’ve been in professional cartography for ten years now, and it’s such a tight-knit, friendly world that a business trip is never really business—it’s a gathering of friends. Special thanks to NACIS, the conference and society I’ve been part of for a decade, where I’ve learned a ton and formed many a lasting close friendship.

running routes
3. Usual Running Routes
This is a pretty new habit. I used to scoff a bit at runners but now wonder why I haven’t been doing it for years, given that I live adjacent to miles and miles of paths along the Charles River. I’m certainly running no marathons, but the ability to go 3 or 4 miles on a regular basis feels great when a few short months ago even 500 feet probably would have wiped me out. Plus, you know, eventually you reach an age where it becomes necessary to worry about the diet of beer and cheese you picked up back in Wisconsin.

routes to Parlor
4. Where Everybody Knows Your Name
I tweet about Parlor Sports a lot. This makes me sound like a sad alcoholic, probably, but it’s hard to stress enough how much this place is like a second home and its people a second family. Whether it’s to watch one of Boston’s illustrious sports teams (Go Pats), or to meet Mike and Jake and Ryan and Sydney for #geobeers, or simply to say hi to James or Garvey or Jon or Nikki behind the bar, it’s amazing to go to a place where indeed everybody knows your name. So here are my routes to and from the bar, depending on mode of transportation.

 

Mappy 2016!

| No comments

Where to hate daylight saving time and where to love it

tl;dr version: just scroll down and play with the map.

If you’re on Facebook or Twitter or really are any person in America with friends who say things, you hear it twice a year, in March and November: “LIFE IS THE WORST WHY DO WE HAVE TO CHANGE THE CLOCKS WE SHOULD GET RID OF DAYLIGHT SAVINGS [sic] TIME!!!!!”. Maybe you’re even one of the people saying it.

Usually the whining is short-term shock at the sudden change in the timing of day and night, not a reasoned assessment of what it means for the timing of daylight over the whole year. People often don’t even know what they’re complaining about: they’ll rail against “daylight saving time” even if it’s the early sunsets of standard time that they hate. For the record I’m no DST hater, because my morning commute is about 5 seconds (no pants required) so I never need to wake up before the sun, and I live in a place where the sun sets at 4:11 in the damn afternoon in winter so I’d love to push that back an hour.

There is a cool interactive piece about this by Keith Collins on Quartz charting how keeping or abolishing DST would affect your daylight hours. In New York, you’d have to wake up at 4:30 AM or go to bed absurdly early in order for DST not to increase daylight in your waking hours.

Daylight hours

If you wake up at 6:30 like a normal human (note: “normal” still sucks), DST makes you wake up in darkness for a handful of extra days in spring and fall. The daylight is regained in the evening, of course, but I’ll grant that waking up before the sun is miserable.

It’s noted on that page that the chart’s data “assume you are located in New York, but differences are minimal across the contiguous 48 states,” but I’m a geographer and must always disagree with any and all spatial claims, by anyone. I live in the same time zone where I grew up, but the sunrise/set times are almost an hour different between the two places.

Total daylight is a function of latitude and time of year, as seen in this plot from Wikipedia:

daylight

Latitude thus affects how early or late the sun rises and sets, but what the clock says depends on a location’s longitude within its time zone. The farther east it is, the earlier the sun will rise and set. Considering all this, I want to map sunrise and sunset times in the United States and see how they are affected by daylight saving time. I’ve done so by using a little bit of GIS and the super handy SunCalc JavaScript library by Vladimir Agafonkin.

Let’s map how many days of the year have reasonable sunrise and sunset times with and without daylight saving time. I define “reasonable” times as 7 AM and 5 PM. That’s kind of arbitrary, but assuming roughly half an hour of twilight, it puts some light in the sky around the time the average American wakes up (6:30ish based on some cursory poking around) and at the end of the business day (which, in my opinion, is still too dang early). But you can define them differently. Explore the coarsely gridded map below and see the geography of sunrise and sunset with and without daylight saving time.

To summarize, these are the scenarios using my preferred times. First, the state of things as they now exist:

Sunrise / sunset with normal DST

And here’s what everyone apparently wants, death to daylight saving time:

Sunrise / sunset with no DST

It looks like an improvement, right? The sunset map barely changes, while vast areas seem to get a lot more days with morning sun. So yes, maybe you could cut your coffee budget if you live on the western side of your time zone. Just remember you’d be giving up those wonderful summer evenings.

Now let’s go bonkers and implement daylight saving time all year long. Or, for the same effect, we could get rid of it but have everyone shift their time zone one to the east:

Sunrise / sunset with DST all year long

Admittedly the sunrise map looks bleak. But look at that sunset map. I mean, just look at it!

If you want consistent morning daylight, you should be as far southeast in your time zone as possible. I recommend the Big Island of Hawaii. If, like me, you’re all about evening sun, hop the border to the southwest part of the next time zone. But remember that’s for consistency, not total daylight. The farther north you go, the longer days will be in the summer—but the shorter they’ll be in winter.

Anyway, here’s all that in poster form for some reason.

DST maps

| 83 comments

City of Angles

INT. APARTMENT IN CAMBRIDGE MASS
Andy is being yelled at by someone less familiar with the region for never mentioning (apparently in an act of deliberate deception) that the area across the river from his home is part of Boston. You see, he always refers to it by its neighborhood name, Allston, which made it sound like a separate town.

The scene above got me thinking about the geography of place name hierarchies. I speak of locations in Boston almost exclusively according to particular neighborhood names because from my perspective “Boston” is too broad and unhelpful. It might mean a thousand feet away over a bridge, or it might mean something ten miles away; it might mean somewhere west of here or it might mean somewhere east. But to someone farther away, neighborhood-level specificity seems less necessary when speaking about the place.

At what distance away does casual reference break down from whole-city to individual neighborhoods? The question feeds into some of my thinking about about what a “city” is irrespective of municipal boundaries: if there’s a point outside the official city where most of the time it makes sense to speak of the city in terms of its sub-units, it may be reasonable to think of that point as part of the city, unofficially. What would a map of those points looks like? In a related and perhaps a more familiar scenario, how far away before a town near City X is absorbed into the “City X” name in casual conversation?

I hopped on Twitter to think aloud and got into some interesting conversations with the late night and/or west coast crowd. (Follow the threads here if you care.) A common theme was the notion that this is not strictly a geographical question, and it certainly does have to do with knowledge and identities and all that. (I take issue with anyone who ignores that those are related to geography, though.) In any case, it remains an intriguing and perhaps answerable question, but just for a lark I wanted to pursue one potential spatial measure that Mike Migurski tossed out:

I think bearing has something to do with it: distance + scale, and are all the parts in the same direction? Then it’s the whole.

Maybe subtended angle?

Subtended angle in this case means, more or less, how much of your 360º view contains the city in question. For example, where I live (artfully illustrated above), Boston occupies something like 270º—in other words, if I walk in a random direction from home, I’ve got a 75% chance of hitting Boston.

Subtended angle is in large part a function of distance, but it decays more quickly and then kind of levels out into a long tail. Furthermore, with an irregular shape it also depends on what side you’re on. Boston, for example, is longer in one direction than another, so it takes up more of the view from the east and west than from the north or south. The weird shape also means that some places near (but outside) the city are almost surrounded by it, while other places the same distance away are not even close to surrounded. I did some ugly raster math to make a map of this for Boston just to compare it to my perceptions of place (and place name usage) in the area.

Maybe Mike is onto something! In some ways the pink/purple areas match my idea of the “city” here better than a simple distance map would, and are areas where it might make sense to use sub-city place names when referring to Boston. Then again, most people probably have little idea of where the city limits are, so if subtended angle has any relation to how they think of and speak about the city, it’s probably all subconscious and dependent on which parts of the city they ever actually visit. And the whole thing is complicated by cultural barriers and peculiarities, at least around here where crossing the Charles River is often seen as journeying into the unknown, and where you’ll see plenty of signs pointing to “Boston” even within Boston.

Still, a fun thought/map exercise!

| 2 comments

How to make a value-by-alpha map

Last week, Josh Stevens published a superb how-to guide for making bivariate choropleth maps, something not directly supported in most GIS applications. Go read it. I’ll wait here.

Josh included a mention of value-by-alpha maps, a pet technique of some colleagues and me. It boils down to a specific type of bivariate choropleth map, in which one variable is intended as a weight for the other and is symbolized by opacity. The idea is offered as an alternative to cartograms—a way to give more visual weight to more significant entities, and suppress less significant ones. Recent examples of the technique include wind energy mapping and midterm election maps.

Anyway, Josh’s post inspired me to write a quick and dirty how-to for value-by-alpha maps. (Dirty because I’m skipping nice things like legends and labels.) So here are a couple of ways to make one. I’m making a map of 2008 US presidential election results, just like our first attempt at this. (Example data here.)

Using GIS and graphics software

First, a method for making static maps using GIS (QGIS in this example) and graphics programs like Illustrator and Photoshop.

1. Make a choropleth map of the “variable of interest”

Here, it’s the percent of votes won by Obama.

Don’t use too many classes. For a diverging color map like this, use at most four to six colors. For a sequential scheme, use two or three. When thinking about data classification, remember that a lot of the map will fade away in the final product. My first thought with this map was to limit the dark colors to more extreme values than this, but I found that the end map became a sea of meh and failed to tell much of a story, so I expanded those outer classes.

2. Duplicate the layer and make a grayscale map of the “equalizing variable”

The “equalizing variable” is the one that will be used to give more or less visual weight to units on the map. In this example it’s population—counties with more population are more significant in the election’s outcome than counties with few people. (Yeah, it really should be total votes, but population is a decent proxy for that.)

Brightness in this map will correspond to opacity in the final map. Don’t use a straight black-to-white scheme here. Bottom out at 10–15% brightness so that units don’t totally disappear from the map. On the other end, don’t let the gap between pure white and the second-brightest color be too large, or else the map may look like only a few points of color. The middle colors of my map differ in brightness by 30% and go up to 90% white, with the top color being pure white. It doesn’t sound like much of a difference between 90% and 100%, but the visible difference is more than you might expect.

Depending on the data, default classification schemes may not serve you well. County population is such a case; most defaults would group far too many counties into the low or high ends. In other cases, something like quantiles might work well. If you use a classification that groups too many units into similar ranges, you may as well stick with a standard univariate choropleth map.

3a. Export to vector and combine

tl;dr — use the grayscale layer as an opacity mask on the color layer

I exported my QGIS map to SVG with two choropleth layers. Here’s a procedure in Illustrator.

Select the grayscale layer, then cut it.

Select the color layer, find the transparency panel, and click the Make Mask button.

Activate the square on the right if it’s not already active. You’ll probably see a blank artboard at this point.

Now paste the grayscale map that you cut a minute ago. Use paste in front so that it stays in the right place. At this point you’ll see some colors again.

Click that left square in the transparency panel again, then deselect everything, and there you have it: a value-by-alpha map!

3b. Or do it as raster

You could do the same thing with raster graphics using Photoshop or similar. Export your two map layers to images and put them into Photoshop layers. Again select and cut the grayscale one. Create an opacity mask on the color layer, and paste the grayscale map into the mask. Below is the button to click to create an opacity mask on a layer.

Web maps

If you’re a web mapper, it’s just as easy to make a value-by-alpha map in the browser as with desktop software. Here’s the same map from above done with D3, having exported the data to GeoJSON.

1. The typical D3 map setup.

Add an SVG element, create projection and path variables, blah blah blah.

var svg = d3.select("body")
  .append("svg")
  .attr("width",800)
  .attr("height",500);
var projection = d3.geo.albersUsa()
  .translate([400,250])
  .scale(1000);
var path = d3.geo.path()
  .projection( projection );

2. Make a scale for the color layer.

D3’s threshold scales work well for customized data classifications. Here we have a domain of the interior class breaks for the election data (40%, 50%, and 60%), and a range of the four colors that go in between and outside them.

var colorScale = d3.scale.threshold()
  .domain( [ .4, .5, .6 ] )
  .range( [ "#ca0020", "#f4a582", "#92c5de", "#0571b0" ] );

3. Make a scale for the grayscale layer.

With this scale, we don’t want to map the data classes to actual colors, but rather to numbers, because we’ll use these directly for opacity attributes. The numbers in the range below correspond to the brightness values of my grays (15%, 30%, etc.).

var grayScale = d3.scale.threshold()
  .domain( [ 50000, 100000, 500000, 1000000 ] )
  .range( [ .15, .30, .60, .90, 1 ] );

4. Load the geodata and assign color and opacity according to the two data properties.

d3.json( "election.geojson", function(json){
  svg.selectAll( "path" )
    .data( json.features )
    .enter()
    .append( "path" )
    .attr( "d", path )
    .attr( "fill", function(d){
      return colorScale( d.properties.Obama_pct);
    })
    .attr( "fill-opacity", function(d){
      return grayScale( d.properties.POP2010 );
    });
});

Run all that in a web page, and oh hey look at that, a value-by-alpha map!

So there you have it, two ways to make value-by-alpha maps! Alternatively, you could use good ol’ indiemapper, which supports value-by-alpha and handful of ordinary and crazy multivariate symbols.

| 4 comments

#tbt: My first map

On a recent dull evening, I went digging for forgotten treasures on an old laptop. This is always good for a laugh and a tear (the latter because my a-hole younger self left photos right on the desktop seemingly to say, hey future self, you loser, remember when you had all this hair?), but the real mission was, as always… maps!

The computer is from my grad school days in Wisconsin, 2005–2007, but it also has files from my undergraduate days at Ohio Wesleyan University, 2001–2005. Here’s a grab bag of a few treasures found. Let’s begin at the end.

Treasure 1: Master’s thesis, 2007.

Oh god.

This thesis will not go near the internet, because it’s terrible. If you want to see it, I can provide directions to Science Hall in Madison, where you can find it wasting space—actual, physical atoms that deserved better—on a shelf in the Geography Library. The premise of the thesis still sits well with me: it aimed to study how people use street maps and aerial images differently (think “map” vs “satellite” in Google Maps). But the execution wasn’t great.

What was kind of cool, though, was the little interactive user study itself, which was a Flash thing that had people drawing paths on top of random maps. You could even edit the paths. Somehow it was wired up to send me an email full of coordinates when a user finished. It’s just a fun reminder of things that I forgot I could once do in Flash.

Look at the IRB-approved torture if you want. Enter any random number on the first screen, and be patient when it asks you to answer a question on a survey that you don’t have; the “Next” button does appear after a short delay.

Treasure 2: Cartography, 2007.

I don’t really know what this is. There was a folder simply titled “Cartography” as though my early-career digital organizational plan was shove all the files from this day until retirement into this folder. But it turned out to be a slide show of images. Hard to say why it exists, but it’s a neat glimpse at UW-Madison cartography 8 or 10 years ago.

Credits for the maps therein include: Heather Francisco, Ben Sheesley, Jeff Stone, Aaron Erkenswick, Jamon Van Den Hoek, Eve McGlynn, Rob Roth, Joel Przybylowski, Dave Heyman, Zach Johnson, Matthew Bloch, and me. But I almost certainly missed a few, not to mention the couple of slides of commercial maps.

Treasure 3: A study on spatial context in interactive maps, 2007.

In a very grad-schoolesque episode, two fellow students and I embarked on a small research project for no reason other than to learn, and to present it at a conference. It had something to do with guaging people’s understanding of spatial context and overall landscapes based on using paper maps versus interactive maps, the hypothesis being that when you can search and zoom right to a point of interest, you don’t gain much spatial understanding. We had no strong conclusions, though.

We presented this at the AAG conference in San Francisco. After the talk, a professor I can’t remember from a university I can’t remember told us that one of his students had done pretty much the same study before. Oh well. (The same student’s name came up at the next year’s conference, as apparently she had also studied my thesis topic, only better. I never met this enemy of mine, but maybe she never really existed and was only a story that professors use to make people look like idiots at conferences.)

Treasure 4: My first AAG conference registration, 2006.

LOLOLOLOL I used to think going to AAG conferences was a good idea.

Treasure 5: Categorizing buildings of Delaware, Ohio, 2004

Warning: you’ll want sunglasses for this one.

It’s a simple color-coded map that categorized buildings in downtown Delaware, Ohio, mainly commercial buildings oriented toward pedestrians or automobiles, and residential buildings. Delaware is the town where I went to college. It’s mildly frustrating to live in a town called Delaware. Even within Ohio, telling people “I’m heading back to Delaware” would elicit some confused questions. To be mixed up with a state that consists solely of an I-95 toll booth… sigh. Anyway, it’s a pretty nice small town, despite the Columbus sprawl that has now swallowed it.

This map was part of something or other that I did for an urban geography class. I loved those classes. It was vintage geography, studying the forms of cities, the kind of stuff that would eventually draw me to things like Kevin Lynch and Bostonography. Not the social theory stuff that would end up driving me away from urban geography in grad school.

Treasure 6: My first map, 2003.

Not really. I don’t know what my first map was. Probably some crayon doodle or macaroni art. What we have here is perhaps my first map as a cartographer. It comes from late in college, my junior year, and was my classs project in John Krygier’s Geography 353 course at Ohio Wesleyan. True to how my career would turn out, the whole dang thing is a web page. Way to stay the course, Woodruff.

So here it is, a series of chloropleth [sic] maps of a century of population change in Ohio.

Click and behold:

ANIMATED

GIFS

It’s thrilling to remember this. I was just writing some setInterval thing in JavaScript to animate something on a map. To think that I’ve been animating maps since practically day one!

These maps aren’t beautiful, being mostly straight ArcGIS exports and even Excel charts. But it’s nice that there is no evidence that I ever made maps before learning about ColorBrewer, despite some later aberrations like the Delaware map above. (How fun to note that some years later, fortune would hand us keys to the ColorBrewer site itself. Fear me, for I am now the thing standing between your students and godawful rainbow color schemes.)

Treasure 7: THE MEMORIES!

Now, I am no old timer in cartography. My first maps were not only digital maps; they were web maps. But I’m no spring chicken either. Perhaps an early autumn chicken. No, wait, this chicken, seen recently on Kauai:

Always running to stay just enough ahead of the car(tography)’s advances to avoid being overtaken and crushed. And too stupid to jump out of the way and live in peace on a beach. (The rental car in this analogy represents cartographic technology, although in reality your average map tile is far more sophisticated than a Nissan Versa.)

Anyway, the point is that there have been plenty of advances and changes in how maps get made during the past dozen years. My own basic “make a map” workflow has changed enough that I’ve already lost some earlier skills. (You know how sometimes people claim that we lost all that 60s technology to put people on the moon? It’s like that, except instead of human beings walking on a celestial body, it’s a garish MS Paint map.) It’s fun to remember what we used to do, and admire old works, but not to miss it all and lament change—even when old maps were good, the experience always led to something better.

| 2 comments