Getting started:

Building up your toolkit

Learning how to choose the right tool for the job can help your project along

In this section, we will cover two example approaches

  • Using a piece of software for to make a simple API call
  • Using a script to make a more complex API call

Tools mentioned in this section

  • Open Refine
  • Jupyter Notebooks, accessed through UBC Syzygy
  • Python

Open Refine

  • Open source data manipulation tool.
  • Similar to Excel but more powerful.

Jupyter Notebooks, accessed through UBC Syzygy

  • Jupyter Notebooks are hosted computational environments.
  • UBC Syzygy is a set of computational tools hosted at UBC and accessible through a browser, including Jupyter.
  • Minimal environment setup required, Jupyter handles that for you.

Python

  • A common and multi-purpose programming language.
  • Relatively beginner friendly and well documented.
  • There are many tutorials for accessing APIs using Python libraries and frameworks.

Going back to the restaurant metaphor:

The waiter (the API) functions as an intermediary between customers like you (the user) and the kitchen (web server).

Andrew Park, What are APIs and how do they work?

The component parts of this are:

  1. The API phrase
  2. Permissions - an API Key, OAuth credentials
  3. A way to make a call
  4. A way to get an output

Demo:

Making a basic API call with Open Refine.

Activity:

Get a list of the times in the Charles Darwin collection from the UBC Open Collections API.

https://oc2-index.library.ubc.ca/collections/darwin/items

Demo:

Making a more customizeable API call with Python.