Marking up blog posts with carbon emissions data

On Monday my friend Ton posted a brief update on his blog:

Arrived in Brussels for Edgeryders SF authors and economists meetup. Looking forward to it.

Like a lot of blogging, this post concerned travel: in this case, a train trip (I’m hopefully assuming, given the distance involve) from Amersfoort to Brussels).

I’ve been thinking a lot about the importance of surfacing the carbon impact of our daily activities; travel, especially, is important to focus on, both for its significant contribution to total emissions (48% here in PEI) and because travel is something that we have atypical agency in reducing (it’s easy to decide not to fly to Europe; deciding not to heat my home is harder).

Anecdotal evidence from my personal experience suggests that paying continuous partial attention to consumption can have a positive effect on reducing consumption: even absent any other drivers, the mere fact of observing, it seems, is helpful.

Which leads me to an idea.

HTML has a helpful extensibility that allows data to be embedded in web pages using “data attributes.”

What if Ton’s post embedded the carbon impact of his travel, and perhaps his mode of travel, turning this:

<p>Arrived in Brussels for Edgeryders SF authors and economists meetup. Looking forward to it. </p>

into this:

<p><span class="emissions" data-co2="7.5" data-travelby="train">Arrived in Brussels</span> for Edgeryders SF authors and economists meetup. Looking forward to it.</p>

(the CO2 emission of a train trip from Amersfoort to Brussels are estimated to be 7.5 km by EcoPassenger).

To the casual reader of the blog post, nothing would change.

But with a little JavaScript, a curious reader could pull out the carbon impact of the activities described in the post:

var emissions = document.querySelector('.emissions');
console.log(emissions.dataset.co2);

Adopting this as a standard practice would be beneficial for two reasons:

  1. For the blog author, forming a habit of documenting the climate impact of travel could be helpful in understanding more about (and coming face-to-face with) the accumulating effect of travel habits.
  2. For the researcher, being able to extract climate impact data from blog posts could prove a useful data surface, and could spur the development of browser-based tools that could use this information in interesting ways (i.e. change the colour of the browser toolbar based on the carbon impact of a post).

To experiment with this, I’ve started by marking up a blog post of my own, adding two chunks of “carbon markup”:

<p><span class="emissions" data-co2="1460" data-travelby="airplane">We flew Charlottetown-Montreal-Vancouver today</span>; we didn't leave Charlottetown until 4:00 p.m. and we're in bed in Vancouver at 11:00 p.m. Such is the wonder of the rotating Earth.</p>

and:

<p>We found our way to the SkyTrain, <span class="emissions" data-co2="0.067" data-travelby="transit">navigated to the Yaletown station</span>, walked up the hill to Burrard. And are now ensconced inside The Burrard.</p>

I can then extract the carbon impact of that post’s travels with this JavaScript:

var emissions = document.querySelectorAll('.emissions');
var total_co2 = 0;

emissions.forEach(function(trip) {
  total_co2 += parseFloat(trip.dataset.co2);
});

alert("Total CO2 from this post was " + total_co2 + " kg.");

which displays:

Alert showing total carbon emissions of 1460.067 kg,

I’ve no idea whether this methodology is the best methodology, but I like the fact that it’s simple and doesn’t take much expertise to inject into a post; it would certainly be possible to add structured metadata to a post using JSON or XML, but that would add a perhaps-unnecessary level of complexity. And for this to work, it has to be easy.

Thoughts?

Comments

Steven Garrity's picture
Steven Garrity on November 13, 2019 - 13:36 Permalink

While travel/transportation is likely a bigger issue, automated/embedded reporting of carbon impact seems like it could work even better for digital processes.

For example, like some of the 'digital health' features from Apple/Google that provide some insight into device/app use, our devices could tell us what impact their own use have had on our carbon footprint.

Maybe when I load your website, you could tell me how much carbon was emitted in the process of serving me this web page.

Jarek's picture
Jarek on November 13, 2019 - 23:24 Permalink

Could you imagine if for example Instagram had a display of CO2 emitted to get there next to peoples' pictures of travel destinations? Would put flight shaming on a whole new level.

(I should acknowledge that I've flown quite a lot in the past decade: https://bin.piorkowski.ca/footprint/data.json )

Ton Zijlstra's picture
Ton Zijlstra on November 14, 2019 - 06:54 Permalink

I very much like the notion of adding this type of info to postings, a richer layer of information. However I also feel that adding data or information in the machine readable part that is not also in the human readable part isn't preferable. Content before mark-up, in short.
A second consideration is that data-attributes are meant for use for the site-owner itself, not outside tools/visitors. So this is all about defining one's own practical use case.

One might be that I already count yearly the number of days I spent outside the Netherlands (by flicking through my calendar), and already track hours spent on trains / planes / in cars. So a way to connect that to blog posts I've written might be useful. It all is very 'quantified self' style stuff, so I'll muse about use cases in that light.