TIL: 2020-03-19

While taking my morning walk before starting work, I decided to read my telephone poles. I learned the medallion number of the pole closest to my house. I learned that it was inspected in 1998 and again in 2010 by the same company. Is the next inspection coming due in 2022, then?

Trimming Videos in QuickTime

Thanks to the power of Zoom screenshare and recording, I prerecorded the screencast for my upcoming webinar (I'll be doing it live, but I will be posting a recording and tutorial after).

It went well, but I had one total brain freeze moment and another when my dog started barking at a neighbor. To make a better video, I trimmed both those out.

I don't have any video editing software, but luckily I have access to QuickTime on a Mac. After some quick searching, I determined that I could cut up and extract pieces of an mp4 in QuickTime. At each cut-off point, I press Cmd+Y to make a cut in the video. I then selected the two pieces I wanted to remove (one at a time) and pressed Delete. I tested the playthrough, then exported to .MOV. Luckily MOV can upload to YouTube, so I'm set!

Here's the directions I used: https://support.apple.com/en-us/HT201066

Nesting If Statements in OpenRefine

GREL (apparently it's GENERAL Refine Expression Language now… another TIL) doesn't let you set up weird, nested AND statements for conditionals (unless it does, lmk!), but it does let you do some kind of fun IF statement nesting.

Your standard IF statement has three parts:

if (test to evaluate, what to do if true, what to do if false)


if (cells["publication date"].value < 2000, "this book was published before 2000", "this book was published in or after 2000")

would test the field “publication date” and return a true statement about when the book was published.

What if we also had another field called “circ count” (we are avoiding cell cross for now but that's really where this would be coming from–another sheet) and wanted to test whether it had circulated more than 20 times?

if (cells["circ count"].value < 20, "this book has circulated less than 20 times", "this book has circulated 20 or more times")

now what if we want to nest them? Suppose we want to identify all books from before 2000 which have circulated fewer than 20 times. If both are true, we'll insert the word “weed.” Otherwise we'll say “keep.””

if (cells["publication date"].value < 2000,
  if (cells["circ count"].value < 20, "weed", "keep"),

I put another “keep” in for all books not published before 2000. The first line is the first test. The second line is what to do if that's true. And the third line is what to do if that's false.

Don't worry, I'll be publishing a MUCH clearer version of this as a tutorial, these are just my notes!

Ruth Kitchin Tillman
Cataloging Systems and Linked Data Strategist

Card-carrying quilter. Mennonite. Writer. Worker.