Today’s project: providing access in XML to data about provincial electoral districts and polling divisions from Elections PEI via the Elections PEIAPI. The API saw initial use last year when we exposed municipal election ward and poll information; it’s now been extended to cover provincial election data as well.
Through the API you can get programmatic access to things like:
information about returning officers (name, address, telephone)
information about regular and advance poll locations for each poll
It’s a simple RESTAPI that associates each of the electoral district’s regular HTML web pages with an equivalent XML page. So the regular old human-readable page of information about District 12, Poll 5 at:
The development of the API with Elections PEI is a long-term effort and will continue; as such, we welcome feedback to api@electionspei.ca about how it meets, or does not meet, your data needs.
A chunk of my summertime work this year was consumed with coding up a mobile version of the foliage-reporting tool we created for Yankee Magazine 7 years ago that’s been running on the web every autumn since.
The free app, called Leaf Peepr, is now available for both iOS (App Store link) and Android (Market link); it lets people report foliage conditions – i.e. what colour the leaves are – while on the go, and to submit photos and descriptions of foliage at the same time. These reports get aggregated together and are used to colour the live fall foliage map that’s on the web and also viewable from within the app.
Although I’ve been making websites targeted at mobile devices for many years now – the mobile City Cinema timetable, for example, and the mobile bus schedule – this was my first time developing a bona fide installable application for mobile devices, and it was a good learning experience.
The app shares a common HTML and JavaScript code base for both iOS and Android, uses jQuery Mobile as its UI framework, and is wrapped inside PhoneGap to allow it to be distributed as an executable through the App Store and the Android Market.
While this isn’t quite “write once, run anywhere,” it’s certainly a more streamlined process than coding native apps in their respective native languages of choice, and the common browser engine parentage of iOS and Android meant that, UI-wise, everything pretty well “just worked” on both platforms. Response time of the UI isn’t quite as fluid as it would be with a native app, but it’s certainly more than acceptable.
The only place I ran into some difficulties during development was with slight variations of returning network status information (“is the device online?”) and geolocation (we need to know where the device is so that we can associate reports with a location); PhoneGap has a standard method for obtaining these, but there are quirks that I needed to work around for various edge cases (i.e. device was online when app launched, then went offline, etc.).
Because the development is in HTML and JavaScript, the designer at Yankee, who coded up the UI elements, was working in a familiar environment, and the learning curve for me was primarily getting the development and compilation environments set up in XCode and Eclipse respectively (along with the frustration of the slightly-different key bindings for each).
Our initial submission to the App Store was rejected on a technicality: the Google Maps log was scrolling out of view on the map view, which violates the requirement that it be always visible. We re-submitted the app and it was approved; total time from initial submission to being available to the public was 10 days. For the Android Market, because it lacks this review process, the turnaround was about 30 minutes.
If you’re in New England this fall and want to help in the foliage reporting effort, please install the app on your device and let me know how it goes.
I first visited Malmö back in 2005 when I took the train over for supper after my first reboot. One of the things I lamented on that trip was the difficulty in taking photos of the Turning Torso, the stunning Santiago Calatrava-designed skyscaper in the city’s western harbour.
This summer I resolved to get up close to the building and to finally take some photos, and so a couple of weeks ago Oliver and I walked over from the central train station on a windy, chilly summer day to see what we could see.
Up close it’s an even more intriguing building, one that seems to defy what I expect humans are capable of constructing. If you ever find yourself in Malmö it’s worth the 30 minute walk (or 5 minute bus ride) from downtown to take a look for yourself.
My friend Morgan tweeted this morning “I think that @ruk’s letter press results are what’s keeping the postal industry afloat.” Which reminded me that I planned to provide an accounting of the costs associated with my Mail Me Something experiment. So here goes.
Item
Cost
Druckwerkstatt Studio Fee (5 days total)
$53.84
Druckwerkstatt Per-Print Fees (180 prints total)
$72.56
Druckwerkstatt Paper Costs
$22.20
Postage Costs (5 mailings to 40 people)
$239.99
Envelopes
$36.85
TOTALEXPENSES
$425.44
By the end of the process I had 40 people on the weekly mailing list, which means that the total “per subscriber” cost was roughly $10.63, or about $2.12 per subscriber per week.
After they signed up I invited “subscribers” to donate $5.00 via PayPal at their option, and I also provided a more flexible donation link, where they could donate larger amounts; 13 of the 40 (one third) donated a total of $85.00, leaving me with $340.44 to pick up myself.
I didn’t launch this experiment as a money-making endeavour, and so I don’t consider that a “deficit” but rather a very cheap learning experience: about $8 per hour of studio time.
I thorough enjoyed the experience of spending five days of my “working vacation” at Druckwerkstatt, away from the digital hubbub (my mobile phone didn’t even work in the basement, so it was a full-in 19th century experience); having an “audience” imposed the same sort of rigor on the process that having an audience of readers for this blog provides.
And receiving photos and descriptions of the final products in their new homes around the world has provided me with tremendous joy.
Thank you to all who participated. Who know: now that I have 40 of you on a mailing list, I might just have to keep sending things…
Last Thursday, as our final touristic activity of the summer in Europe, Oliver and I took the train north from Malmö to Helsingborg to visit the Grafiska Museet – the “graphics museum” – located on the grounds of the Fredriksdal Museums and Gardens.
Grafiska Museet turned out to be a compact by well-resourced museum of letterpress printing, complete with a nice collection of presses, a solid collection of metal and wood type, and, on the second floor, an uncommonly well-designed set of exhibits offering an introduction to printing.
There was, alas, no actual printing happening on the day of our visit – a guide explained that the printers are all pensioners of indefinite schedule – but this was more than made up for by an enthusiastic and thorough demonstration of the Intertype type-casting machine by one of the nicest museum guides I’ve come across.
He cast Oliver his first name in both regular and bold, trimmed the result and wrapped it in masking tape (so as to reduce the lead-poisoning potential), all the while opening hatches and flipping switches to show us how the machine magically turns molten lead into cast type.
While we came for the museum specifically, we were pleasantly surprised to find that Fredriksdal Museums and Gardens itself made for an interesting additional visit: I’m not a “formal gardens” person, but even I was wowed by the breadth and complexity of what they’ve created on this site, from spice gardens to maple orchard, flower gardens to fruit trees, we spent an additional couple of hours wandering the grounds.
If you happen to find yourself in a group mixed between print-o-philes and regular everyday people, a visit to Fredriksal is an excellent choice, as you’ll both be catered to. Take the train from Malmö (or the train and then ferry from Copenhagen) and then catch a city or regional bus from the train station to the site (search schedules for route to “Gisela Trapps v. 1”): it’s about 10 minutes from downtown. There’s a serviceable café surrounded by a lovely outdoor eating area where you can grab a snack or lunch, and you could easily spend an entire day wandering around.
When we spoke last on Tuesday I was just back from an afternoon of rail-bicycling, a trip facilitated by the lend of our friend Morgan’s Saab.
On Wednesday morning Oliver and Catherine were due in Odense, two hours and a bit to the west of Malmö, to visit our friend Signe and her dog Sally (Signe and Sally spent the last 5 years in Charlottetown and just returned home to Denmark this summer). With Morgan’s car still in hand I dropped them off at Malmö Central Station around 9:00 a.m. and then headed to the nearest gas station with a car wash to polish and gas up the car before returning it to Morgan’s garage.
I almost made it: as I was turning left into the Statoil gas station the car completely lost power: no engine, no power steering, no power brakes. Fortunately I had enough momentum to glide across the street and down into the Statoil parking lot, narrowly missing an opportunity to cut off the neighbouring McDonalds’ drive-thru entrance.
The car was dead: it would turn over, but no start. And there was a big red exclamation point inside a triangle on the dash.
Before calling Morgan I did some Googling for help and found a lot of it – apparently Saabs don’t start quite regularly – but none of it helpful enough to get me back on the road.
So I called Morgan, and we launched into an hour long SMS-and-phone-call mediated joint research mission that took me through pouring water on the transmission (my idea; suggested on the web as a possible way of unsticking the “crank position sensor”), filling up the windshield-washer fluid (to clear this item from the warnings log on the dash and possibly uncovering the more dire warnings hidden underneath), and just waiting for a while to see if cooling down helped.
None of this worked.
So Morgan, fortunately close by, walked on over for some on-site help.
And then the garbage truck arrived. It seems that I was parked in front of a no-parking sign on the front of the fence around the gas station’s dumpster. And the garbage truck needed to empty the dumpster. I flung my hands up in despair, and agreed to try to push the car out of the way.
And then Morgan arrived. Which was good, because there was no way I was going to push and steer that car by myself.
So I steered, Morgan pushed, and we got the car out of the way.
After a little bit more trial and error Morgan resolved that the solution was out of our reach, and put in an email to his mechanic. And we retired back to Morgan’s place for some coffee and conversation.
If you’re going to blow up somebody’s car, Morgan turns out to be a pretty good candidate: we had a nice afternoon of coffee, more coffee and then lunch, and appeared to both be able to look upon the incident as a Great Adventure.
The car is, last I heard, in the arms of BilPartner, with a tentative diagnosis of fuel pump-failure.
Romeleåsens Dressincykling has been on my “must do next time I’m in Malmö” list for quite a while, but circumstances never aligned to get me there. Today, thanks to the generous lend of a car from my friend Morgan, sunny weather, and Catherine (of knees-incompatible-with-cycling) occupied at crafts demonstrations for the day, circumstances did align, and Oliver and I set off for rural Björnstorp, about 30 minutes out of the city. Here’s what we were headed for:
Dressincykling is “trolley cycling,” and in this case at least it means riding a cycle-powered railway inspection contraption over 7 km of an abandoned rail line from Björnstorp to Veberöd. There’s room for a “driver” – the one who cycles – as well as a passenger (who sits on a wooden bench) and also for a bag or other supplies you might want to take.
I phoned ahead for a reservation and was told to show up a 1:00 p.m., and, sure enough, when we arrived the owner was at home waiting for us. A 5 minute introduction – how to cycle, how to turn around (pick up the 60 kg cycle and rotate it), how to use the brake (it’s a foot pedal, not a hand brake or “cycle backwards” brake) – a 200 SEK (about $30) payment and we were on our way, cycling through the fields and woods of rural Skåne.
Oliver – he averse to all carnival rides and most anything where he’s in motion – was freaked out for about the first 5 minutes, but when he realized that I could slow down and stop at any point, that the contraption couldn’t fall over, and that it was speed-limited by my legs, he calmed down, started to crow like a train whistle and settled into the ride. I even convinced him to try cycling for a moment or two (it didn’t take).
The rails were, as rails are, flat, and the cycle offered much less friction than a regular bicycle, so even though we traveled 14 km over the afternoon, it didn’t feel like we’d cycled that far (you cycle out 7 km then turn around and cycle back 7 km).
About 20 minutes into the trip there’s a pleasant picnic area (100 m up the road there’s also a café, but it was closed, something we learned with some quick Google Translating of “stängt”). We stopped for a rest, spent some time with a very nice black cat, and used the toilet that’s off in the woods and surrounded by a shelter made from sticks.
After this break we were off again, and about 30 minutes later we came to the end of the tracks. Having come completely unprepared and so without food or water, we were happy to find that Veberöd is a well-resourced little town with ATM, grocery store, pizza shop and public library (does one need anything else for survival?). We bought some chicken curry sandwiches at the gas station along with some bottled water and some chocolate, ate in the town square, and then headed back to the cycles.
Waiting at the rail-end we found a Swedish family and their two cycles, and we swapped cycles to make logistics easier and I got some help turning ours around. The ride back was slightly inclined, so I got a little more winded than I thought I would from the easy downhill there. But it was nothing too fatiguing, and with a brief stop to renew ties with the cat we were back at home base about 45 minutes later.
Altogether the trip took us about 3 hours from start to finish. We rode through forests and fields, crossed about half a dozen roads (which are well-signed; one even has a STOP sign you swing out before crossing), and never ran into any trouble. The cycles are well-maintained, the little introduction just enough information, and the people we met along the way were friendly and helpful.
If you ever make it out yourself, I recommend taking a picnic lunch: there’s room enough on the deck to carry it all, a very nice picnic area to eat it in, and you’ll be glad for the break (say hello to the black cat for us). If you, like us, go unprepared, from the end of the line just cross the road, follow the path to the sidewalk, the sidewalk to the main road, turn right and about 500 m along you’ll find food, water and cash. All in, a great day-trip from Malmö or Copenhagen.
On the train yesterday Oliver and I counted 18 science museums that we’ve visited over the years, from Boston to Košice, Genoa to Lisbon. Given that I spent an entire semester of high school embedded in the Ontario Science Centre, it’s a sort of institution near and dear to my heart, and although there’s overlap from city to city – the infra-red camera, the spinning chair you sit in while holding a spinning bicycle wheel and the like – each museum has its niche and we’ve never been bored. You might even say we’re science centre tourists.
Yesterday was no different: we caught the train from Malmö, where we’re spending a week visiting friends, across the water to Copenhagen for the day (this sounds exotic, but it’s a quick 30 minute train ride that feels little different than going from Oakville to Toronto on the GO Train). Our destination was the Experimentarium in the northern suburb of Hellerup.
We had a fantastic time, and spent almost 5 hours there. We started our visit with the special Body Worlds exhibition that’s been making its way around the world. To be honest, the prospect creeped me out a little: Body Worlds centres around a collection of “plastinated” bodies – real human bodies whose formerly-living owners had donated them to be preserved and put on show. And while it is all a little creepy, it was also fantastically interesting to see things like the nervous and circulatory systems, muscles and brain exposed. We both learned a lot about how the body fits together and left feeling, I think, a little more animal.
The rest of our time was taken up in the vast second floor exhibit hall, exploring everything from animation to sedimentary processes (a passion Oliver, grandson of a sedimentologist) to a very well constructed exhibit on the senses.
If you too are science centre tourists, or even if you’re not, I highly recommend this Danish take on the form: it’s a great way to spend a day with kids in Copenhagen.