Making a “Places I have been” map

US_Map_chris_visit20130713

For a while, I have maintained a list of places I’ve lived or visited as a note on Facebook. Recently, I decided to repatriate that content to this blog as a page. I also decided it would be nice to have a color-coded map of the states with the same information.

Here’s how I made the map:

I started with a blank SVG map of the states from the Wikimedia Commons, available under a Creative Commons license. (Here’s the actual version I used.) This map is very nice because you can edit it in a text editor. That makes it easy to change the colors of the state.

I wanted four colors for the states, showing the states in which I have lived, visited, had airport layovers, or never stepped foot in. In the original file, there was only one “style” of state, as shown in the CSS style sheet embedded in the file:

<style type="text/css">
.state {
	fill:#d3d3d3;
	stroke:#fff;
	stroke-width:0.75;
	stroke-opacity:1;
}
</style>

To this, I inserted three more styles. The resulting stylesheet is:

<style type="text/css">
.state {
	fill:#d3d3d3;
	stroke:#fff;
	stroke-width:0.75;
	stroke-opacity:1;
}

.statel {
	fill:#669966;
	stroke:#fff;
	stroke-width:0.75;
	stroke-opacity:1;
}

.statev {
	fill:#ff7f00;
	stroke:#fff;
	stroke-width:0.75;
	stroke-opacity:1;
}

.statea {
	fill:#ffcc33;
	stroke:#fff;
	stroke-width:0.75;
	stroke-opacity:1;
}
</style>

The colors are given by the fill attributes, and are specified as RGB hex triplets (e.g. #669966 is the green color used in the image).

Once I established the styles, it was straightforward to modify the states to assign the different styles. Each state is drawn in the SVG file with a path element; you just need to change the class attribute in the corresponding path element. For example, here is the original code to draw Colorado:


<path d="m 380.03242,320.96457 4.90324,-86.32496 -113.38856,-12.64396 -12.21382,87.93916 120.69914,11.02976 z" id="CO" class="state" />

And here is how I modified the code:


<path d="m 380.03242,320.96457 4.90324,-86.32496 -113.38856,-12.64396 -12.21382,87.93916 120.69914,11.02976 z" id="CO" class="statea" />

Note that the id attribute is used to identify the state.

Because browser support for SVG is imperfect at this point, I converted the SVG file to a PNG before uploading. Unfortunately, the version of the Imagemagick convert utility on my computer didn’t do the conversion correctly, so I used Inkscape instead.

Credit: Map of the US adapted from a file from the Wikimedia Commons that was originally created by Wikimedia Commons user Theshibboleth and modified by users Fibonacci, NuclearVacuum, and Wylve. Used under the Creative Commons Attribution-ShareAlike 3.0 Unported (CC-BY-SA 3.0) license. SVG source code of my modified version of the file. Both my modified SVG and derived PNGs are offered under the Creative Commons Attribution-ShareAlike 3.0 Unported (CC-BY-SA 3.0) license.

Michigan and Ontario photos

The Mackinac Bridge, connecting Michigan’s Upper Peninsula with the Mitten, is the third-longest suspension bridge in the world.

Mackinac Bridge (#1)

Mackinac Bridge (#2)

Bikes parked on Mackinac Island, where cars are banned:

bikes on Mackinac Island

The International Bridge, connecting Michigan and Ontario (from the Ontario side):

International Bridge

In Sault Ste. Marie, you can see two sets of fireworks in early July, for Canada Day and Independence Day:

bi-national fireworks

The Soo Locks (allowing ship traffic between Lake Superior and Lake Huron):

Soo Locks

I got this awesome souvenir from Michigan:

Oven mitten-chigan

ACHIEVEMENT UNLOCKED: round-trip Empire Builder, Chicago to Portland

A friend asked me (via the Eff Bee) about my recent trip from Chicago to Portland, and back, on Amtrak’s Empire Builder. (I just got back yesterday.) I wrote a fairly long comment on Facebook, and I thought it would be good to reproduce it here (lightly edited):

It cost me $376.20 for a round-trip ticket from Portland to Chicago. I got a reserved coach seat instead of a sleeper car compartment. A sleeper car compartment is substantially more expensive.

The seat you get is sort of similar to an airplane seat except with considerably more legroom. You can recline the seat without even slightly inconveniencing the person behind you, and there is a leg rest you can pull out to help be more comfy. That said, it’s not as comfy as an actual bed.

There was electrical outlets on my train but no WiFi. I got 3G pretty consistently in Illinois, Wisconsin, Minnesota, and North Dakota. In Montana, you don’t get 3G except when you are close to towns. The rest of the time was hit-or-miss. (My carrier is Verizon.)

The trip takes about two days. On my return trip, I left Portland at 4:45 p.m. Tuesday and got into Chicago at about 7:00 p.m. Thursday. My train was 3 hours late—which is common—and was scheduled to arrive at 3:55 p.m. Thursday. (On the other hand, on the trip out to Portland, my train arrived slightly early.)

On the train, there is a observation car with tables, seats, and large windows. You can hang out there when you are tired of sitting in your coach seat.

I would recommend bringing some of your own food. (I brought crackers, bagels, a jar of peanut butter, dried fruit, tuna in packets, etc.) You can buy food from the cafe in the observation car, but it’s a bit overpriced. (A 12-ounce cup of coffee or a 12-ounce can of soda costs $2.) There is also a dining car which is basically a medium-priced sit-down restaurant. (The entrees are between $15 to $25.) If you get the sleeper car compartment, the dining car meals are included.

One very nice thing about the train is you see the landscape you can’t really see while flying or driving. My father-in-law pointed out to me that the sleeping car accommodation, while expensive compared to a plane ticket, is not a bad deal compared to driving, staying in a hotel every night, and buying restaurant food for every meal.

Another thing I should mention is that half the train goes to (or comes from) Portland, and half of it goes to (or comes Seattle); they split apart (or join together) in Spokane. The practical significance of this is that the dining car goes to (or comes from) Seattle and the observation car goes to (or comes from) Portland. So, if you are coming from or to Portland, you won’t have the dining car west of Spokane (i.e. the first night on a eastbound trip, or the last morning on a westbound trip).

Overall, I think it’s worth taking the train if you aren’t in a hurry, want to see some beautiful landscape along the way, and don’t mind sleeping in a seat for two nights. I enjoyed my trip.