While tracking down a copy of Living and Learning: The Report of the Provincial Committee on Aims and Objectives of Education in the Schools of Ontario (known popularly as the “Hall-Dennis Report”) yesterday at Robertson Library I found, helpfully catalogued beside it, a copy of Education or Molasses: A critical look at the Hall-Dennis Report.

Given that the former has been at the core both of how I experienced education as a child and how I regard it as an adult, the latter provides me an opportunity to examine some of my deeply-held beliefs in a new light.

It’s a delightfully acerbic read.

🗓️
Education  •  History  •  Ontario

I can’t remember why this is in my pocket.

“Keep this coupon for guaranteed immortality?”

“Keep this coupon if you ever want to see you son again?”

“Keep this coupon to claim your coat?”

I can never throw it away.

🗓️

Some days your heart just sings. Thanks to members of the Legislative Assembly, this is one of those days. From Hansard from last Thursday evening, a mention of my quick hack to demonstrate the utility of HTML in legislative documents.

Chair: The hon. Leader of the Third Party.

Dr. Bevan-Baker: This isn’t related to aquaculture or fisheries and agriculture specifically, but many in the House will probably remember Peter Rukavina was here the other night –

Mr. McIsaac: Yes.

Dr. Bevan-Baker: – and Peter is a great advocate of open data. Today he watched us here in the House with our desks overflowing with paper and trying to get from one section to another and accommodate them, and he just spent – he was just here yesterday so he did this in 24 hours – but he transmitted a whole section from a PDF, which is, as programmers, that’s where data goes to die, into an HTML form which allows you to access all kinds of stuff. He sent me the link here. I’d really like to send that around the House.

An Hon. Member: (Indistinct).

Dr. Bevan-Baker: It’s so much less work, less paper. It’s much more user-friendly. There’s just so much here which I think we could improve this process so we’re not kind of trying to find our way through bits of paper.

Mr. McIsaac: Yeah, I –

Dr. Bevan-Baker: I just wanted to comment on that.

Mr. McIsaac: It’s interesting because I saw Peter here yesterday and he sent me a note, too, and he said this is actually his favourite part of the House is doing estimates.

Dr. Bevan-Baker: Yeah.

Mr. McIsaac: Not Question Period or motions or whatever. But I’ll tell you an example. I went to the priorities committee today with my tablet and I got there and couldn’t get on. I didn’t have any hard copies. So I’ll apologize for having the hard copy but it’s really helpful.

Dr. Bevan-Baker: Yeah. No, I don’t think we need to apologize for where we are, but as a joke actually then he says: I move that for the next fiscal year we set ourselves a goal of crafting a thoroughly modern version of the estimates. I’d go with that.

An Hon. Member: Hear, hear!

Dr. Bevan-Baker: Anyway –

Mr. Trivers: Modernize it (Indistinct)

Dr. Bevan-Baker: – I’ll send that around so everybody has access to it.

Mr. McIsaac: Sounds good

I appreciate Dr. Bevan-Baker raising the issue, and I appreciate the spirit of collegiality his comment was met with by other members.

🗓️

A couple of days ago I wrote about my reverse engineering of the video archives of the Legislative Assembly of Prince Edward Island, and I suggested, at the end, that additional hijinks could now ensue.

When I read How I OCR Hundreds of Hours of Video, I knew that’s where I had to look next: the author of that post, Waldo Jaquith, uses optical character recognition — in essence “getting computers to read the words in images” — with video of the General Assembly of Virginia, to do automated indexing of speakers and bills. I reasoned that a similar approach could be used for Prince Edward Island, as our video here also has lower thirds listing the name of the member speaking.

So I tried it. And it worked! Here’s a walk-through of the toolchain I used, which is adapted from Waldo’s

The structure of the video archive I outlined earlier lends itself well to grabbing a still frame of video every 10 seconds, from the beginning of each 10-second-long transport stream.

I’ll start by illustrating the process of doing OCR on a single frame, and then run through the automation of the process for an entire part of the day.

Each 10-second transport stream has 306 frames. I don’t need all of those, I just need one, so I use FFmpeg to extract a single JPEG like this, run against this transport stream file.

ffmpeg -ss 1 -i "media_w1108428848_014.ts" -qscale:v 2 -vframes 1 "media_w1108428848_014.jpg"

The result is a JPEG like this:

JPEG frame capture from Legislative Assembly video

I only need the area of the frame that includes the “lower third” to do the OCR, so I use ImageMagick to crop this out:

convert "media_w1108428848_014.jpg" -crop 439x60+64+360 +repage -compress none -depth 8 "media_w1108428848_014.tif"

This crops out a 439 pixel by 60 pixel rectangle starting 64 pixels from the left and 360 pixels from the top, this section here:

Cropped Video Section

The lower third is different for members with multiple titles, like the Premier, and back bench members, which is why such a large swath is needed, vertically, to ensure all members’ names can be grabbed.

The resulting TIFF file looks like this:

Lower Third Cropped Out

Next I use ImageMagick again to convert all of the cropped lower thirds to black and white, with:

convert "media_w1108428848_014.tif" -negate -fx '.8*r+.8*g+0*b' -compress none -depth 8 "bw-media_w1108428848_014.tif"

Resulting in black and white images like this:

Black and white lower third

Now I’m ready to do the OCR, for which, like Waldo, I use Tesseract:

tesseract "bw-media_w1108428848_014.tif" "bw-media_w1108428848_014"

This results in a text file with the converted text:

Hon H Wade Maclauchlan

mmm-‘v
Mun (-1 n1 hI-Anralui l‘nl‘ln nan-Iv

Tesseract did an almost perfect job on the member’s name — Hon. H. Wade MacLauchlan. It missed the periods, but that’s understandable as they got blown out in the conversion to black and white. And it got the fourth letter of the Premier’s last name as a lower case rather than upper case “L”, but, again, the tail on the “L” got blown out by the conversion.

And that’s it, really: grab a frame, crop out the lower third, convert to black and white, OCR. 

All I need now is a script to pull a series of transport streams and do this as a batch; this is what I came up with:

#!/bin/bash

DATESTAMP=$1

curl -Ss http://198.167.125.144:1935/leg/mp4:${DATESTAMP}.mp4/playlist.m3u8 > /tmp/playlist.m3u8
IFS=_ array=(`tail -1 /tmp/playlist.m3u8`)
IFS=. array=(${array[1]})
UNIQUEID="${array[0]}"

START=$(expr $(($2 * 6 - 1)))
DURATION=$(expr $(($3 * 6)))
END=$(expr $(($START + $DURATION)))

echo "Getting video for ${DATESTAMP}"

rm -f /tmp/concatentated-video.ts

while [ ${START} -lt ${END} ]; do
  echo "Getting chunk ${START}"
  PADDED=`printf %03d $START`
  echo "Changing to ${PADDED}"
  curl -Ss "http://198.167.125.144:1935/leg/mp4:${DATESTAMP}.mp4/media_${UNIQUEID}_${START}.ts"  > "ts/media_${UNIQUEID}_${PADDED}.ts"
  ffmpeg -ss 1 -i "ts/media_${UNIQUEID}_${PADDED}.ts" -qscale:v 2 -vframes 1 "frames/media_${UNIQUEID}_${PADDED}.jpg"
  convert "frames/media_${UNIQUEID}_${PADDED}.jpg" -crop 439x60+64+360 +repage -compress none -depth 8 "cropped/media_${UNIQUEID}_${PADDED}.tif"
  convert "cropped/media_${UNIQUEID}_${PADDED}.tif" -negate -fx '.8*r+.8*g+0*b' -compress none -depth 8 "bw/media_${UNIQUEID}_${PADDED}.tif"
  tesseract "bw/media_${UNIQUEID}_${PADDED}.tif" "ocr/media_${UNIQUEID}_${PADDED}" 
  let START=START+1
done

With this script in place, and directories set up for each of the generated files — ts/, frames/, cropped/, bw/ and ocr/ — I’m ready to go, using arguments identical to my earlier script. So, for example, if I want to OCR 90 minutes of the Legislative Assembly from the morning of April 22, 2016, starting at the second minute, I do this:

./get-video.sh 20160422A 2 90

I leave that running for a while, and I end up with an ocr directory filled with OCRed text from each of the transport streams, files that look like this:

, . 1
Hon J Alan Mclsaac
MHn-Jrl (v0 Axul: HIVIHP thi | l'llr‘HF"

and this:

_ 4'

Hon. Allen F. Roac‘h

As Waldo wrote in his post:

Although Tesseract’s OCR is better than anything else out there, it’s also pretty bad, by any practical measurement.

And that’s born out in my experiments: the OCR is pretty good, but it’s not consistent enough to use for anything without some post-processing. And for that, I used the same technique Waldo did, computing the Levenshtein distance between the text from each OCRed frame and a list of Members of the Legislative Assembly.

From the Members page on the Legislative Assembly website, I prepared a CSV containing a row for each member and their party designation, with a couple of additional rows to allow me to react to frames where no member was identified:

Bradley Trivers,C
Bush Dumville,L
Colin LaVie,C
Darlene Compton,C
Hal Perry,L
Hon. Allen F. Roach,L
Hon. Doug W. Currie,L
Hon. Francis (Buck) Watts,N
Hon. H. Wade MacLaughlan,L
Hon. Heath MacDonald,L
Hon. J. Alan McIsaac,L
Hon. Jamie Fox,C
Hon. Paula Biggar,L
Hon. Richard Brown,L
Hon. Robert L. Henderson,L
Hon. Robert Mitchell,L
Hon. Tina Mundy,L
James Aylward,C
Janice Sherry,L
Jordan Brown,L
Kathleen Casey,L
Matthew MacKay,C
Pat Murphy,L
Peter Bevan-Baker,G
Sidney MacEwen,C
Sonny Gallant,L
Steven Myers,C
None,N
2nd Session,N

The idea is that for each OCRed frame I take the text and compare it to each of the names on this list; the name on the list with the lowest Levenshtein distance value is the likeliest speaker. 

For example, for this OCRed text:

e'b

Hon. Paula Blggav

I get this set of Levenshtein distances:

Bradley Trivers -> 20
Bush Dumville -> 18
Colin LaVie -> 18
Darlene Compton -> 20
Hal Perry -> 17
Hon. Allen F. Roach -> 18
Hon. Doug W. Currie -> 18
Hon. Francis (Buck) Watts -> 22
Hon. H. Wade MacLaughlan -> 19
Hon. Heath MacDonald -> 19
Hon. J. Alan McIsaac -> 17
Hon. Jamie Fox -> 16
Hon. Paula Biggar -> 8
Hon. Richard Brown -> 17
Hon. Robert L. Henderson -> 22
Hon. Robert Mitchell -> 20
Hon. Tina Mundy -> 16
James Aylward -> 19
Janice Sherry -> 19
Jordan Brown -> 17
Kathleen Casey -> 18
Matthew MacKay -> 18
Pat Murphy -> 18
Peter Bevan-Baker -> 19
Sidney MacEwen -> 19
Sonny Gallant -> 17
Steven Myers -> 19
None -> 19
2nd Session -> 20

The smallest Levenshtein distances is Hon. Paula Biggar, with a value of 8, so that’s the value I connect with this frame.

Ninety minutes of video from Friday morning results in 540 frame captures and 540 OCRed snippets of text.

With the snippets of text extracted, I run a PHP script on the result, dumping out an HTML file with a thumbnail for each frame, coloured to match the party of the member speaking I identified from the OCR:

<?php

$colors = array("L" => "#F00",  // Liberal
                "C" => "#00F",  // Conservative
                "G" => "#0F0",  // Green
                "N" => "#FFF"   // None
                );

$names = file_get_contents("member-names.txt");
$members = explode("\n", $names);
foreach ($members as $key => $value) {
  if ($value != '') {
    list($name, $party) = explode(",", $value);
    $p = array("name" => $name, "party" => $party);
    $m[] = $p;
  }
}

$fp = fopen("index.html", "w");

if ($handle = opendir('./ocr')) {
  while (false !== ($entry = readdir($handle))) {
      if ($entry != "." && $entry != ".." && $entry != '.DS_Store') {
        $ocr = file_get_contents("./ocr/" . $entry);
        $jpeg = "frames/" . basename($entry, ".txt") . ".jpg";
        $ts = "ts/" . basename($entry, ".txt") . ".ts";
        $ocr = preg_replace('/[^a-z\n]+/i', ' ', $ocr);
        $mindist = 9999;
        unset($found);
        foreach($m as $key => $value) {
          if ($value != '') {
            $d = levenshtein($value['name'], trim($ocr));
            if ($d < $mindist) {
              $mindist = $d;
              $found = $value;
            }
          }
        }
        fwrite($fp, "<div style='float: left; background: " . $colors[$found['party' . "'>\n");
        fwrite($fp, "<a href='$ts'><img src='$jpeg' style='width: 64px; height: auto; padding: 5px'></a></div>");
      }
  }
  closedir($handle);
}

The resulting HTML file looks like this in a browser:

Friday Morning in the House, colour-coded

The frames that are coloured white are frames where there was either no lower third, or where the lower third didn’t contain the name of the member speaking. It’s not a perfect process: the last dozen frames or so, for example, are from the consideration of the estimates, where there’s no member’s name in the lower third, but my script doesn’t know that, and it simply finds the member’s name with the smallest Levenshtein distance from the jumble of text it does find there; some fine-tuning of the matching process could avoid this.

Changing the output of the PHP script so that the names of the members are included, the thumbnails a little larger, and each thumbnail linked to the transport stream of the associated video, and I get a visual navigator for the morning’s video:

One more experiment, this time representing each OCRed frame as a two-pixel-wide part of a bar, allowing the entire morning to be visualized by party:

The Morning Visualized

Leaving thumbnails and party colours out of it completely, here are the members ranked by the number (of the total 504) 10 second frame captures they appear in the first frame of (the total is not 540 because the remaining frames had no lower third and thus no identified speaker):

  42 Hon. Paula Biggar
  37 Peter Bevan-Baker
  36 James Aylward
  30 Hon. Robert L. Henderson
  28 Hon. Allen F. Roach
  19 Hon. J. Alan McIsaac
  17 Hon. Jamie Fox
  15 Steven Myers
  15 Bradley Trivers
  13 Sidney MacEwen
  13 Hon. H. Wade MacLaughlan
  12 Hal Perry
  11 Colin LaVie
   9 Hon. Doug W. Currie
   8 Hon. Robert Mitchell
   8 Hon. Heath MacDonald
   6 Hon. Tina Mundy
   5 Darlene Compton
   5 Bush Dumville
   4 Sonny Gallant
   4 Jordan Brown
   3 Kathleen Casey
   2 Hon. Richard Brown

Visualized as a bar chart, this data looks like this:

Bar Chart of Frames per Member

And finally, here’s a party breakdown (it’s important to note that this is only a very rough take on the “which party gets the most speaking time” question because I’m only looking at the first frame of every 10 second video chunk):

Pie Chart Showing Frames per Party

Peter Bevan-Baker, Leader of the Green Party, is the only speaker in the Green slice; he’s the second-most-frequent speaker — 37 frame chunks — but the other parties spread their speaking across more members which is why the Green Party only represents 11% of the frame chunks in total.

As with much of the information that public bodies emit, the Legislative Assembly of PEI could make this sort of analysis much easier by releasing time-coded open data in addition to the video — as sort of “structured data Hansard,” if you well. Without that, we’re left to using blunt instruments like OCR which, though fun, involve a lot of futzing that should really be required.

🗓️

My eagle-eyed brother spotted this shot of our house on season one, episode three of the HGTV series Humble Home Hunters.

Here’s a video clip for context:

🗓️

Although I was deeply involved in the original project to broadcast audio of the Legislative Assembly of Prince Edward Island online (to the point where I was working with Island Tel technicians to run a 2-wire copper circuit from Province House to the Sullivan Building), I was long-gone from the project by the time video broadcast was started, so I’ve no secret insider knowledge of how it all works.

But I’m naturally curious, so here goes.

From the main Video Archives page, when you click on the link for a specific day, you end up loading the same page, but with three parameters. Here are the parameters for April 21, 2016, for example:

file=20160421
number=2
year=2016

The file parameter is self-evident: it’s the year, the month, and the day as YYYYMMDD.

The year also explains itself: it’s YYYY.

The number parameter appears to be either 1 or 2, depending on whether there was just a morning session (1) or whether there was a daytime and an evening session (2) on the given date.

On this page, there’s an instance of JWPlayer that has either one or two playlists referenced, like:

http://198.167.125.144:1935/leg/mp4:20160420A.mp4/playlist.m3u8

for a Wednesday, where the House only sits once, and:

http://198.167.125.144:1935/leg/mp4:20160421A.mp4/playlist.m3u8
http://198.167.125.144:1935/leg/mp4:/20160421B.mp4/playlist.m3u8

for a Thursday, where it sits in the afternoon and the evening.

These M3U8 files are playlists that reference the another M3U8 file; inside they look like this (for April 20, 2016):

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=1371939,CODECS="avc1.77.31,mp4a.40.2",RESOLUTION=640x480
chunklist_w1709954322.m3u8

That last line is the filename of another M3U8 file that contains the filenames of the actual “chunks” of the video, each 10 seconds long:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:12
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:11.433,
media_w1709954322_0.ts
#EXTINF:10.167,
media_w1709954322_1.ts
#EXTINF:10.166,
media_w1709954322_2.ts
#EXTINF:10.167,
media_w1709954322_3.ts
#EXTINF:10.166,
media_w1709954322_4.ts
...

This means that you can grab video for any 12 second chunk from a URL like this:

http://198.167.125.144:1935/leg/mp4:20160420A.mp4/media_w1709954322_0.ts

where 20160410 is the YYYYMMDD, followed by an A (first sitting of the day) or a B (second sitting of the day), followed by an arbitrary filename with a number at the end that increments for each 10 second chunk.

So, for example, if I want to get 10 seconds of video from April 20, 2016 starting 30 minutes into the morning sitting, I would calculate that 30 minutes contains 180 10-second chucks of video, so the video should be at:

http://198.167.125.144:1935/leg/mp4:20160420A.mp4/media_w1709954322_179.ts

And, sure enough, I can grab that video using FFMPEG:

ffmpeg -i http://198.167.125.144:1935/leg/mp4:20160420A.mp4/media_w1709954322_179.ts 20160420.ts

And if I want to grab a minute of video from that point I can concatenate six chunks together (MPEG transport streams are nice inasmuch as you can freely join them together like this and everything continues to work):

curl -sS http://198.167.125.144:1935/leg/mp4:20160420A.mp4/media_w1709954322_179.ts >> all.ts
curl -sS http://198.167.125.144:1935/leg/mp4:20160420A.mp4/media_w1709954322_180.ts >> all.ts
curl -sS http://198.167.125.144:1935/leg/mp4:20160420A.mp4/media_w1709954322_181.ts >> all.ts
curl -sS http://198.167.125.144:1935/leg/mp4:20160420A.mp4/media_w1709954322_182.ts >> all.ts
curl -sS http://198.167.125.144:1935/leg/mp4:20160420A.mp4/media_w1709954322_183.ts >> all.ts
curl -sS http://198.167.125.144:1935/leg/mp4:20160420A.mp4/media_w1709954322_184.ts >> all.ts
ffmpeg -i all.ts 20160420A-30-minutes-in-1-minute.mp4

This would give me an MP4 file containing one minute of video, the concatenation of 6 chunks of 10 seconds each.

To generalize this, just using BASH, to pull video starting at at a given time for a given duration from a given date, I can do this:

#!/bin/bash

DATESTAMP=$1

curl -Ss http://198.167.125.144:1935/leg/mp4:${DATESTAMP}.mp4/playlist.m3u8 > /tmp/playlist.m3u8
IFS=_ array=(`tail -1 /tmp/playlist.m3u8`)
IFS=. array=(${array[1]})
UNIQUEID="${array[0]}"

START=$(expr $(($2 * 6 - 1)))
DURATION=$(expr $(($3 * 6)))
END=$(expr $(($START + $DURATION)))

echo "Getting video for ${DATESTAMP}"

rm -f /tmp/concatentated-video.ts

while [ ${START} -lt ${END} ]; do
  echo "Getting chunk ${START}"
  curl -Ss "http://198.167.125.144:1935/leg/mp4:${DATESTAMP}.mp4/media_${UNIQUEID}_${START}.ts"  >> /tmp/concatentated-video.ts
  let START=START+1
done
echo "Got video; concatenating..."

ffmpeg -loglevel panic \
  -i /tmp/concatentated-video.ts \
  ${DATESTAMP}-${START}-${DURATION}.mp4

I save that as a BASH script called get-video.sh and then make it executable and run it with three parameters:

chmod +x get-video.sh
./get-video.sh 20160414A 30 2

This will grab 2 minutes of video from the afternoon session on April 14, 2016 starting 30 minutes in. Uploading this to YouTube results in this video:

One can imagine that, understanding all this, it should now be trivial to do all sorts of remixing, indexing, visualizing and other useful hijinks with the video archive.

🗓️

My favourite part of the legislative calendar in Prince Edward Island is the “consideration of the estimates,” a line-by-line review by Members of the Legislative Assembly of the Estimates of Expenditure and Revenue. The Clerk tells me that this exercise is increasingly uncommon in other jurisdictions; I’m happy it’s one that Prince Edward Island has held onto, as the questions from the opposition on government’s spending and revenue often shed interesting light on how and what government is doing, and provide a useful set of critical eyes on an operation that can always benefit from it, no matter the government of the day.

I sat in on the consideration of the estimates for the Department of Agriculture and Fisheries yesterday, and I was immediately struck by the degree to which the process remains unelevated by the gifts afforded by digital technology: every question to the Minister was followed by a flurry of page-turning in the marked-up binder he used to guide him, and while he did a creditable job making his way, many questions remained unanswerable, at least immediately, because the answers were filed elsewhere.

This got me thinking that, through the transformative powers of HTML, we could make the Estimates of Expenditure and Revenue a much more navigable guide simply by linking it, internally and externally, with relevant information, information that might even obviate the need for the opposition to ask questions in some cases because the answers would be self-evident. In other words, we could avoid back-and-forths like this (from April 20, 2016):

Hansard Excerpt from April 20, 2016

and this:

Hansard Excerpt from April 20, 2016

and this:

Hansard Excerpt from April 20, 2016

These are all examples of process bottlenecks that could be solved by better information management: a well-indexed, hyperlinked, intelligent Estimates of Expenditure and Revenue web resource would connect the otherwise disconnected dots and allow members to concentrate their discussions on substantive issues, not on “what section is that under?” questions.

Here’s a simple example, of more utility to we the people than to legislators, but one that illustrates what I’m thinking about. Page 10 of this year’s Estimates of Expenditure and Revenue is a table titled “Expenditure Summary by Department” that, in essence, says “here’s how we spend our money.” It’s a high-level summary broken down by department and agency that shows the current budget’s estimate and the previous budget’s estimate and forecast. In the PDF the government releases, it looks like this:

Page 10 of the Estimates

The line items in the first column are an excellent candidate for hyperlinking. Converting the table to HTML (a non-trivial process at present as the structure of the PDF is labyrinthine), it’s then easy to make each department and agency a link to a page on the government website:

  2016-2017
Budget Estimate
2015-2016
Budget Forecast
2015-2016
Budget Estimate
CURRENT      
Agriculture and Fisheries 32,965,200 34,147,300 34,726,200
Communities, Land and Environment 20,728,600 19,913,500 20,526,200
Economic Development and Tourism 1,137,800 1,092,700 1,187,100
Innovation PEI 32,203,100 33,294,400 25,078,100
Tourism PEI 13,609,100 13,454,400 13,727,500
Education, Early Learning and Culture 250,979,300 245,184,600 243,711,900
Island Regulatory and Appeals Commission 1,200,300 1,200,300 1,200,300
Executive Council 7,244,300 7,098,100 7,334,200
Family and Human Services 96,808,400 95,661,200 94,205,200
Finance 73,852,200 69,525,900 71,886,000
Council of Atlantic Premiers 188,400 188,400 188,400
Employee Benefits 60,138,400 60,612,300 55,429,900
General Government 10,300,000 4,837,000 6,300,000
Health and Wellness 12,547,600 12,536,600 12,540,900
Health PEI 604,664,100 592,843,000 586,431,600
Justice and Public Safety 52,541,700 48,938,000 49,290,300
Transportation, Infrastructure and Energy 111,688,600 104,672,200 108,993,600
Interministerial Women’s Secretariat 438,600 438,600 438,600
Workforce and Advanced Learning 120,690,000 121,498,000 121,831,000
Employment Development Agency 5,231,500 5,206,500 5,231,500
Auditor General 2,028,800 1,911,200 2,056,700
Legislative Assembly 5,992,100 6,422,800 6,422,800
PEI Public Service Commission 7,344,700 7,182,100 7,320,000
PROGRAM EXPENDITURE 1,524,522,800 1,487,859,100 1,476,058,000
Interest Charges on Debt 126,698,100 127,966,400 127,016,400
Amortization of Tangible Capital Assets 68,600,700 66,500,300 65,671,100
TOTAL EXPENDITURE 1,719,821,600 1,682,325,800 1,668,745,500

It would be easy to add intelligence to the estimates so that hovering over any number would provide some additional insights, like (this non-functional mockup):

Estimates Calculator Widget Mockup

Looking under the hood of the Estimates of Expenditure and Revenue PDF file reveals, via metadata, that essentially the same document flow has been in place since fiscal 1996-1997:

PDF info for Estimates file.

In the intervening 20 years we’ve learned so much about how to make information more useful by making it more linked, more navigable, more like a node in a network than an paper enclave.

I move (am I allowed to make motions here?) that for the next fiscal year we set ourselves the goal of crafting a thoroughly modern version of the estimates.

🗓️

As reported earlier, Premier MacLauchlan generously offered me a ride to Summerside last night for the Learning Partners Advisory Council meeting.

While I don’t believe there are any formal rules governing the reporting of such adventures, common sense would dictate that the discussions that took place during the ride are covered under a cone of silence.

And so if, say, the Premier accidentally revealed his plans to take PEI out of Confederation1, discretion would suggest I not mention it here. 

So I will limit my colour commentary to this: the Premier drives a late model SUV that, as is custom these days, has a mid-console display screen. For most of our trip the radio was turned to CBC Prince Edward Island, 96.1 on the FM dial. And yet the station identifier appearing on the display was “Kicks96.”

I found this quite bothersome and wondered how such a thing might happen.

The most prominent radio station I could find using the “Kicks96” nom de plume is WQLK-FM which broadcasts from a transmitter in Richmond, Indiana, like CBC PEI, on FM 96.1.

I imagine there could be several ways that the Premier’s car stereo could come to think of FM 96.1 as Kicks96. Perhaps the vehicle was assembled in range of Richmond, and the radio station presets setup there? Perhaps the radio itself was manufactured in the area? Perhaps the stereo grabs its presets from some sort of web service that got confused during the update? Perhaps the Premier is also secretly the Governor of Indiana?

I called Kicks96 in Richmond, IN and spoke to a helpful receptionist who transferred me to an equally helpful production manager for the station. He confirmed there were no automobile assembly plants in the area, no formal arrangements with the Premier’s automobile manufacturer to pre-install Kicks96 on the stereo (although he wished there were). He mentioned that there were several other radio stations in the US that used the “Kicks96” tag, and the clues might be found there instead of in Richmond. His best guess, and it was a long shot he said, is that when the radio station presets were installed it may have been at night when, due to “skipping”, the Indiana signal reached all the way to PEI.

I tried to call CBC Prince Edward Island, but all branches on their telephone tree lead to voicemail, and there’s no “Press 7 to ask Kenny Adams questions about FM propagation” option.

At this hour, thus, the Kicks96 mystery remains a mystery.

Otherwise, the ride was pleasant; we were joined by the Learning Partners Advisory Council co-chair Bill Whelan, and had a good chat, there and back.

You will be happy to learn that we did have a chance to speak briefly about Gross Fixed Capital Formation and related issues, and my newfound ability to speak somewhat intelligently about the GDP stood me in good stead.

The Island will be well-positioned when we join our Icelandic cousins in a new Confederation. Oops, I wasn’t supposed to talk about that. was I.

I owe the Premier a solid for the ride; maybe next time I’ll drive.

1. No such plans exist, and this was not actually something we talked about. Although wouldn’t it be cool if plans did exist, and by mentioning them here I have started a constitutional crisis!

2. I am hoping that the CSIS blog-scanner doesn’t flag this post for containing “shotgun” and “premier.” I use it in this sense, of course.

🗓️

So remember yesterday when I was chickening out of asking Premier MacLauchlan for a ride up to Summerside? Well my chickening out was genuine, but what I didn’t factor in, somewhat naively, is that the Premier would find out about my chickening out and offer me a ride anyway.

Which, of course, this being Prince Edward Island and all, he did.

Last night while Oliver and I were out at the John Cousins, Catherine answered the phone at home; the caller inquired as to whether I had a ride to Summerside or not, and when Catherine said she didn’t know, the caller left their name and number and asked her to have me to call them back when I got in. The caller was Premier MacLauchlan.

Which makes it doubly important that I have a deeper understanding of Prince Edward Island’s Gross Fixed Capital Formation because, you gotta know that, with the way things are going, the Premier is actually going to ask me about it.

I first became aware of the very notion of Gross Fixed Capital Formation only yesterday, while reading the province’s Annual Statistical Review (a document that should be on the bedside of every Islander). Here’s what it says in the economic overview for 2012-2013 (emphasis mine):

Growth between 2012 and 2013 was largely the result of a 4.5 per cent increase in exports. Final domestic demand increased 1.8 per cent, while household consumption expenditures increased 1.6 per cent. Government gross fixed capital formation increased by 3.7 per cent. Imports increased by 1.8 per cent. Real gross domestic product growth was revised up for 2011 to 1.6 per cent and revised down for 2012 to 1.0 per cent.

In regular peacetime reading, I would translate this, roughly, as “blah blah blah, blah blah, blah.”

But these are not regular times. I needed help.

Who better to ask about what all this means, and why we measure it, than the province’s Director of Economics, Statistics and Federal Fiscal Relations, Nigel Burns, an estimable man to whom I’ve addressed similar questions in the past and always received a thorough and helpful answer.

So I called Nigel up. And here’s what I learned.

The summary that appears in the overview I quote above (“increased by 3.7 per cent”) uses numbers from a Statistics Canada-provided table that appears on page 53 of the Annual Statistical Review titled “Real Provincial Gross Domestic Product, 2009-2013 (Millions of Chained (2007) Dollars) Prince Edward Island”. Here’s the table, with the “Government gross fixed capital formation” highlighted:

2014 PEI Annual Statistical Review Excerpt: GDP

The “3.7 per cent increase” referenced in the overview is the increase of $242 million in 2012 to $251 million in 2013 in the last two columns of the highlighted row above.

Breaking this down, with Nigel’s help, here’s what this means.

This table reports on the Real Gross Domestic Product of the province (often referenced as “the GDP”); this, Statistics Canada says, is a report of the “total value of the goods and services produced” in the province. You calculate it by adding up everything spent on stuff (roads, laundry detergent, schools, olive oil) and adding this to the difference between exports and imports.

So in 2013, for example, we spent $6,285 million on stuff; add this to the difference between exports and imports of -$1,283 million and you get a GDP of $5,006 million.

In rougher numbers: $6.3 billion spent, minus $1.3 billion in import/export difference, equals $5 billion in GDP.

The Gross Fixed Capital Formation part of this is the portion of the “stuff” that is fixed: roads, houses, schools, buildings, bulldozers, photocopiers, hammers (as opposed to, say, cable TV, mayonnaise, and toothpicks).

And the Government Gross Fixed Capital Formation is the portion of that which is spent by governments (federal, provincial and municipal).

So, in other words, in 2013 the federal, provincial and municipal government on Prince Edward Island spend a combined $251 million on “fixed stuff.” They built schools. Bought snowplows. Built a wharf. Dug some ditches. Add it all up and it cost them a quarter billion dollars.

As it happens, the “Millions of Chained (2007) Dollars” part of the table means that governments didn’t actually spend $251 million on fixed stuff in 2013 on Prince Edward Island, they spent $251 million in 2007 dollars on fixed stuff in 2013. Converting the numbers to 2007 dollars removes inflation from the numbers, and allows apples-to-apples comparisons to be made.

I asked Nigel why we’d measure government gross fixed capital formation at all — what does it tell is, from a policy-making perspective? — and he told me that, in part, it gives us an indication of the involvement of governments in the economy. If, for example, there was a 20% decrease in government gross fixed capital formation from one year to the next, this would tell us, in essence, “wow, governments really pulled back on investments in infrastructure last year.”

And as a component of the GDP it allows us to see what role government spending on fixed stuff plays in the larger shape of the economy.

As it happens, most of the macroeconomic things you hear the Premier and his ministers talking about are packed into that table.

For example, last October the Premier gave an address to the Summerside Chamber of Commerce where he reported, in part:

My second observation on the trade front brings us close to home. Prince Edward Island has a balance-of-trade deficit that hobbles our economy. Simply put, we buy more than we sell. On an annual basis, we spend $1.3 billion more in purchases from outside the province than we generate in receipts from out-of-province sales. While we can be deservedly proud of our expanding export story, our province will not be geared for sustainable growth unless we can shrink that balance-of-trade deficit. It currently represents more than 20% of our total GDP.

The story he told in that paragraph is also told in the GDP table: the “exports of goods and services” number is $2.3 billion and the “imports of goods and services” number is $3.6 billion. So we’re importing $1.3 billion more than we’re exporting. 

Or when the Minister of Education, Early Learning and Culture said, in the Legislative Assembly, on April 14, 2016:

The next area of my responsibility, and something that I’m becoming very interested in and learning a tremendous amount, is the area of culture. The culture sector contributes $121 million to our local GDP

That’s $121 million that appears in various places in the “expenditures” section of the table — theatre tickets, musical instrument purchases, and so on.  It seems like a lot, but when you take $121 million as a proportion of the total provincial expenditures of $6,265 million, it turns out to be only 1%. An important 1%, of course – the soul of the province, you might say – but only 1% nonetheless. And if you’re trying to move the GDP, perhaps not where you’d put a huge amount of emphasis if you want to make big gains. Which is both important to understand, and also important, as a way of thinking, to confront.

Peter Bevan-Baker, Leader of the Third Party, released a briefing document when he introduced the Well-being Measurement Act in the Legislative Assembly last fall that nicely summed up the need to confront this:

  • Traditional methods of determining progress such as Gross Domestic Product and Gross National Product measure production and consumption.
  • These systems do not measure the effects of production and consumption on society, the economy and the environment. They do not measure quality of life of a place, or the wellbeing of its people.
  • By using only economic measurements like GDP, Prince Edward Island remains at risk of failing to meet the needs of its residents, struggling to develop a sustainable economy, and not being able to meet the environmental challenges that are ahead.

Which is to say, I think, that it’s all very well and good to increase the GDP, but what if increasing the GDP decreases the qualities of some of the things in our lives that we value? At the very least, shouldn’t we measure those things so that we can understand the rise and fall of the GDP in a more human, day to day context?

I’m intrigued by that notion.

And also embarrassed to find that, after hearing the term GDP batted about in the media for 50 years, it wasn’t until today that I opted to find out what it really means.

So, that’s a lot to talk about on the car ride to Summerside now, isn’t it.

🗓️

One of my favourite passages in the biography of former Prince Edward Island Premier Alex B. Campbell written Hon. Wade MacLauchlan just before he became Premier himself:

Campbell went on to build good relationships with NFU leaders. Wayne Easter recalls one meeting “at which we had given the premier shit likely,” after which Campbell offered to drive him back to his truck which was parked several blocks away. Easter says, “I’ve never forgotten it to this day. I was twenty-two or twenty-three. Alex was driving the car and chatting away, not about the meeting. This was quite something, driving in the car with the premier.

Premier MacLauchlan co-chairs the Learning Partners Advisory Council of which I’m a member.

We have our second meeting tomorrow night, up in Summerside, about an hour’s drive to the west. I thought seriously about asking the Premier for a ride up to the meeting, but in the end I chickened out: I’m nowhere near as fast on my feet as Wayne Easter, and I’m pretty sure I couldn’t hold my own. He’d say something like “how do you feel about our fixed capital formation for fiscal 20141” and my most considered response would be “um.”

Of course, we could just talk about seafood pie. And I’ve missed a great opportunity.

I had my own delightful encounter with Alex Campbell about 15 years ago. I was working as a new product developer for the Anne of Green Gables Store, and was sent to meet with Alex to see if he might consider selling his driftwood creations. He welcomed me to his Stanley Bridge cottage, served me a glass of lemonade or two, and we had a nice chat. No new products were secured, but it was otherwise a remarkable afternoon for a young pup like me.

Postscript: the Premier read this post, gave me a call, and offered me a ride. What a strange, wonderful world we live in.

1. Just in case it ever comes up in casual conversation – or you should find your hitchhiking self picked up by the Premier – Prince Edward Island gross fixed capital formation increased by 3.7 per cent in fiscal 2014. According to the World Bank, gross fixed capital formation “includes land improvements (fences, ditches, drains, and so on); plant, machinery, and equipment purchases; and the construction of roads, railways, and the like, including schools, offices, hospitals, private residential dwellings, and commercial and industrial buildings.”

🗓️

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /now, look at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, see things I’ve favourited elsewhere, or get in touch (peter@rukavina.net is the quickest way).

I have been writing here since May 1999: you can explore the 25+ years of blog posts in the archive.

You can subscribe to an RSS feed of posts, an RSS feed of comments, an RSS feed of favourites elsewhere, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email. I also publish an OPML blogroll.

InstagramYouTubeVimeoORCIDOpenStreetMapInternet ArchivePEI.artDrupalGithub.