{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Find results by country in DigitalNZ\n", "\n", "Many items in DigtalNZ include location information. This can include a country, but as far as I can see there's no direct way to search for results relating to a particular country using the API.\n", "\n", "You can, however, search for geocoded locations using bounding boxes. This notebook shows how you can use this to search for countries. It makes use of the handy [country-bounding-boxes](https://github.com/graydon/country-bounding-boxes) Python package." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
If you haven't used one of these notebooks before, they're basically web pages in which you can write, edit, and run live code. They're meant to encourage experimentation, so don't feel nervous. Just try running a few cells and see what happens!.
\n", "\n", "\n", " Some tips:\n", "
Here are {} of {:,} results:
\n", " | country | \n", "alpha_code | \n", "numeric_code | \n", "results | \n", "
---|---|---|---|---|
159 | \n", "New Zealand | \n", "NZ | \n", "554 | \n", "723861 | \n", "
8 | \n", "Antarctica | \n", "AQ | \n", "10 | \n", "18450 | \n", "
158 | \n", "New Caledonia | \n", "NC | \n", "540 | \n", "1460 | \n", "
13 | \n", "Australia | \n", "AU | \n", "36 | \n", "452 | \n", "
75 | \n", "France | \n", "FR | \n", "250 | \n", "438 | \n", "
236 | \n", "United States of America | \n", "US | \n", "840 | \n", "364 | \n", "
39 | \n", "Canada | \n", "CA | \n", "124 | \n", "265 | \n", "
21 | \n", "Belgium | \n", "BE | \n", "56 | \n", "254 | \n", "
73 | \n", "Fiji | \n", "FJ | \n", "242 | \n", "226 | \n", "
204 | \n", "Solomon Islands | \n", "SB | \n", "90 | \n", "218 | \n", "