Skip to content

Working with Metadata

Peter Leonard edited this page Jul 23, 2021 · 15 revisions

The first thing you need to know about metadata (data about data) in Pixplot is: it's optional. You can create a basic visualization of your pictures with nothing more than a folder full of images called, let's say, "flowers":

pixplot --images "flowers/*.jpg"

Nearly everything about Pixplot will work with just this one command-line argument: zooming and scrolling, seeing one image close-up, and changing layouts. So why would you want to add metadata to the mix? Let's examine a few use cases.

Creating a basic metadata document

First, let's set up the absolute minimum of what we need to use metadata: a CSV (comma-separated values) text file with one column, one header, and three data rows:

filename
flower1.jpg
flower2.jpg
flower3.jpg

We'll call this file flower-metadata.csv and save it in the same place where our flowers folder is.

We can re-run Pixplot and tell it to use this metadata, even though it doesn't do much yet:

pixplot --images "flowers/*.jpg" --metadata "flower-metadata.csv"

There's not much point in looking at the result -- but you will get some warning messages if you have more lines in your spreadsheet than you have images, or vice versa. These warnings won't stop your visualization from being built, but they are good to watch for as you debut your metadata file.

Adding links to other websites

Let's say you've downloaded your images from a museum website, and you'd like to let uses see their original context. You can do this by adding in a `