{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# NSW State Archives Index Explorer\n", "\n", "NSW State Archives provides a lot of rich descriptive data in its [online indexes](https://www.records.nsw.gov.au/archives/collections-and-research/guides-and-indexes/indexes-a-z). But there's so much data it can be hard to understand what's actually in each index. This notebook tries to help by generating an overview of an index, summarising the contents of each field.\n", "\n", "When you select an index from the dropdown list, the Index Explorer loads a CSV file containing [data harvested from the index](harvest-indexes.ipynb). It then looks at each column in the dataset, tries to identify the type of data inside, and attempts to tell you something useful about it.\n", "\n", "Given all the possible variations in recording and formatting data, there will be oddities and errors. But hopefully this will provide you with a useful starting point for further exploration.\n", "\n", "The Index Explorer is a slightly-modified version of the [GLAM CSV Explorer](https://glam-workbench.github.io/csv-explorer/)." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "%%capture\n", "import os\n", "import statistics\n", "import warnings\n", "from urllib.error import HTTPError\n", "from urllib.parse import urljoin\n", "\n", "import altair as alt\n", "import ipywidgets as widgets\n", "import pandas as pd\n", "from IPython.display import HTML, display\n", "from pandas.errors import ParserError\n", "from slugify import slugify\n", "from wordcloud import WordCloud\n", "\n", "# alt.renderers.enable('notebook')\n", "# alt.data_transformers.enable('json', urlpath='files')\n", "alt.data_transformers.enable(\"data_server\")\n", "# alt.data_transformers.enable('data_server_proxied', urlpath='.')\n", "\n", "warnings.filterwarnings(\"ignore\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "%%capture\n", "# Load environment variables if available\n", "%load_ext dotenv\n", "%dotenv" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "%%javascript\n", "// This is necessary to stop the output area folding up\n", "IPython.OutputArea.prototype._should_scroll = function(lines) {return false}" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# This is where the results go...\n", "results = widgets.Output()\n", "status = widgets.Output()\n", "pd.set_option(\"display.max_columns\", 10)\n", "\n", "\n", "def read_csv(url, header=0, encoding=0):\n", " \"\"\"\n", " Loop through some encoding/parsing options to see if we can get the CSV to open properly.\n", " \"\"\"\n", " encodings = [\"ISO-8859-1\", \"latin-1\"]\n", " headers = [None]\n", " try:\n", " if encoding > 0 and header > 0:\n", " df = pd.read_csv(\n", " url,\n", " sep=None,\n", " engine=\"python\",\n", " na_values=[\"-\", \" \"],\n", " encoding=encodings[encoding - 1],\n", " header=headers[header - 1],\n", " )\n", " elif encoding > 0:\n", " df = pd.read_csv(\n", " url,\n", " sep=None,\n", " engine=\"python\",\n", " na_values=[\"-\", \" \"],\n", " encoding=encodings[encoding - 1],\n", " )\n", " elif header > 0:\n", " df = pd.read_csv(\n", " url,\n", " sep=None,\n", " engine=\"python\",\n", " na_values=[\"-\", \" \"],\n", " header=headers[header - 1],\n", " )\n", " else:\n", " df = pd.read_csv(url, sep=None, engine=\"python\", na_values=[\"-\", \" \"])\n", " except UnicodeDecodeError:\n", " if encoding == len(encodings):\n", " raise\n", " else:\n", " return read_csv(url=url, header=header, encoding=encoding + 1)\n", " except ParserError:\n", " if header == len(headers):\n", " raise\n", " else:\n", " return read_csv(url=url, header=header + 1, encoding=encoding)\n", " else:\n", " return df\n", "\n", "\n", "def analyse_csv(b):\n", " \"\"\"\n", " Try to open the CSV file, and start the analysis.\n", " \"\"\"\n", " results.clear_output()\n", " status.clear_output()\n", " error = \"\"\n", " with results:\n", " index = select_csv.value\n", " title = index[\"title\"]\n", " filename = f\"{index['slug']}.csv\"\n", " url = urljoin(\n", " \"https://media.githubusercontent.com/media/wragge/srnsw-indexes/master/data/\",\n", " filename,\n", " )\n", " # url = f\"indexes/{filename}\"\n", " html = f\"

{title}

\"\n", " # html += f'

Source

{url} ({row[\"file_size\"]})

'\n", " display(HTML(html))\n", " # display(status)\n", " status.append_stdout(\"Downloading data...\")\n", " try:\n", " df = read_csv(url)\n", " except UnicodeDecodeError:\n", " error = \"Unicode error: unable to read the CSV!\"\n", " except ParserError:\n", " error = \"Parser error: unable to read the CSV!\"\n", " except HTTPError:\n", " error = \"File not found!\"\n", " except:\n", " error = \"Unable to read the CSV!\"\n", " status.clear_output()\n", " if error:\n", " display(HTML(f'

{error}

'))\n", " else:\n", " rows, cols = df.shape\n", " size = \"

Size

\".format(cols)\n", " cols = \"

Columns

    \"\n", " for col in df.columns:\n", " cols += '
  1. {}
  2. '.format(\n", " slugify(col), col\n", " )\n", " cols += \"
\"\n", " display(HTML(size))\n", " display(HTML(cols))\n", " display(HTML(\"

Sample

\"))\n", " display(df.head())\n", " analyse_columns(df)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "date_cutoff = 0.8\n", "cutoff = 0.8\n", "unique_cutoff = 0.1\n", "category_count = 30\n", "\n", "\n", "def display_dates(df, col):\n", " # Better to group years first, so that the altair data isn't huge\n", " # Get counts by year\n", " counts = df[col].groupby([df[col].dt.year]).agg(\"count\").to_frame()\n", " # Get the full range of years\n", " years = pd.Index(\n", " [y for y in range(int(counts.index[0]), int(counts.index[-1]) + 1)]\n", " )\n", " # Set missing years to zero\n", " counts = counts.reindex(years, fill_value=0)\n", " counts = counts.reset_index()\n", " counts.columns = [col, \"count\"]\n", " chart = (\n", " alt.Chart(counts)\n", " .mark_area()\n", " .encode(\n", " x=alt.X(f\"{col}:Q\", axis=alt.Axis(format=\"c\", title=\"Year\", tickMinStep=1)),\n", " y=\"count:Q\",\n", " tooltip=[\n", " alt.Tooltip(\"{}:O\".format(col), title=\"Year\"),\n", " alt.Tooltip(\"count:Q\", title=\"Count\", format=\",\"),\n", " ],\n", " color=alt.value(\"#5254a3\"),\n", " )\n", " .properties(width=800)\n", " )\n", " display(chart)\n", "\n", "\n", "def display_categories(df, col):\n", " counts = df[col].value_counts()\n", " if counts.size > category_count:\n", " counts = counts[:category_count].to_frame()\n", " else:\n", " counts = counts.to_frame()\n", " counts = counts.reset_index()\n", " counts.columns = [col, \"count\"]\n", " chart = (\n", " alt.Chart(counts)\n", " .mark_bar()\n", " .encode(\n", " x=\"count:Q\",\n", " y=alt.Y(\n", " \"{}:N\".format(col),\n", " sort=alt.EncodingSortField(\n", " field=\"count\", op=\"count\", order=\"ascending\"\n", " ),\n", " ),\n", " tooltip=[\n", " alt.Tooltip(\"{}:N\".format(col), title=\"Category\"),\n", " alt.Tooltip(\"count:Q\", title=\"Count\", format=\",\"),\n", " ],\n", " color=alt.value(\"#8ca252\"),\n", " )\n", " )\n", " display(chart)\n", "\n", "\n", "def display_wordcloud(df, col, collocates=True):\n", " # Make a word cloud!\n", " # The word cloud software splits the string into individual words and calculates their frquency\n", " words = df[col].str.cat(sep=\" \")\n", " wordcloud = WordCloud(width=800, height=300, collocations=collocates).generate(\n", " words\n", " )\n", " display(wordcloud.to_image())\n", "\n", "\n", "def display_numbers(df, col, unique_count):\n", " # display(df[col])\n", " if unique_count <= 20:\n", " # df[col].replace('0', np.NaN)\n", " counts = df[col].value_counts().to_frame()\n", " counts = counts.reset_index()\n", " counts.columns = [col, \"count\"]\n", " # display(counts)\n", " chart = (\n", " alt.Chart(counts)\n", " .mark_bar()\n", " .encode(\n", " alt.X(\"{}:Q\".format(col)),\n", " y=\"count\",\n", " tooltip=[\n", " alt.Tooltip(\"{}:Q\".format(col)),\n", " alt.Tooltip(\"count:Q\", title=\"Count\", format=\",\"),\n", " ],\n", " color=alt.value(\"#ad494a\"),\n", " )\n", " )\n", " else:\n", " chart = (\n", " alt.Chart(df)\n", " .mark_bar()\n", " .encode(\n", " alt.X(\"{}:Q\".format(col), bin=alt.Bin(maxbins=10, nice=True)),\n", " y=\"count()\",\n", " tooltip=[\n", " alt.Tooltip(\n", " \"{}:Q\".format(col),\n", " bin=alt.Bin(maxbins=10, nice=True),\n", " title=\"Range\",\n", " ),\n", " alt.Tooltip(\"count():Q\", title=\"Count\", format=\",\"),\n", " ],\n", " color=alt.value(\"#ad494a\"),\n", " )\n", " )\n", " display(chart)\n", "\n", "\n", "def text_field(df, col, value_count, word_counts, details):\n", " html = \"This looks like a text field.\"\n", " display(HTML(html))\n", " median_word_count = statistics.median(word_counts)\n", " collocates = True if median_word_count > 1 else False\n", " details[\"Total number of words\"] = word_counts.sum()\n", " details[\"Highest number of words\"] = word_counts.max()\n", " details[\"Median number of words\"] = median_word_count\n", " details[\"Number of empty records\"] = df[col].shape[0] - value_count\n", " display_details(details)\n", " display_wordcloud(df, col, collocates)\n", " # display(wordcloud.to_image())\n", " # image_file = 'images/{}_cloud_{}.png'.format(slugify(col), int(time.time()))\n", " # try:\n", " # image.save(image_file)\n", " # except FileNotFoundError:\n", " # os.makedirs('images')\n", " # display(HTML(''.format(image_file)))\n", "\n", "\n", "def textplus_field(\n", " df,\n", " col,\n", " value_count,\n", " unique_count,\n", " unique_ratio,\n", " word_counts,\n", " has_year,\n", " details,\n", " html,\n", "):\n", " median_word_count = statistics.median(word_counts)\n", " collocates = True if median_word_count > 1 else False\n", " mixed = False\n", " details[\"Total number of words\"] = word_counts.sum()\n", " details[\"Highest number of words\"] = word_counts.max()\n", " details[\"Median number of words\"] = median_word_count\n", " details[\"Number of empty records\"] = df[col].shape[0] - value_count\n", " display_details(details)\n", " has_mixed = df[col].str.contains(r\"(?=\\S*[a-zA-Z\\/])(?=\\S*[0-9])\", regex=True)\n", " if has_mixed.sum() / value_count > cutoff and median_word_count <= 2:\n", " mixed = True\n", " html = \"

This columns contains a small number of words that combine letters and numbers. They're probably collection identifiers. Here's some examples:

\"\n", " display(HTML(html))\n", " elif unique_count <= category_count:\n", " display(\n", " HTML(\n", " f\"

This look like it contains categories. Let's look at the {category_count} most common.

\"\n", " )\n", " )\n", " display_categories(df, col)\n", " else:\n", " try:\n", " display(HTML(\"

This look like it contains text.

\"))\n", " display_wordcloud(df, col, collocates)\n", " except ValueError:\n", " pass\n", " if unique_ratio < unique_cutoff:\n", " display(\n", " HTML(\n", " f\"

Less than {unique_cutoff:.2%} of the values are unique, let's look at the {category_count} most common.

\"\n", " )\n", " )\n", " display_categories(df, col)\n", " has_number = df[col].str.contains(r\"\\b\\d+\\b\", regex=True)\n", " # Check for dates\n", " if has_year.sum() / value_count > cutoff and mixed is False:\n", " html = \"

Most of the values in this column include a number that looks like a year. It might be useful to convert them to dates.

\"\n", " df[\"{}_years_extracted\".format(col)] = df[col].str.extract(\n", " r\"\\b(1[7-9]{1}\\d{2}|20[0-1]{1}\\d{1})\\b\"\n", " )\n", " if df[\"{}_years_extracted\".format(col)].nunique(dropna=True) > 1:\n", " df[\"{}_date_converted\".format(col)] = pd.to_datetime(\n", " df[\"{}_years_extracted\".format(col)], format=\"%Y\", utc=True\n", " )\n", " html += \"

{:,} of {:,} values in this column were successfully parsed as dates.

\".format(\n", " df[\"{}_date_converted\".format(col)].dropna().size, value_count\n", " )\n", " details = {}\n", " details[\"Earliest date\"] = (\n", " df[\"{}_date_converted\".format(col)].min().strftime(\"%Y-%m-%d\")\n", " )\n", " details[\"Latest date\"] = (\n", " df[\"{}_date_converted\".format(col)].max().strftime(\"%Y-%m-%d\")\n", " )\n", " display(HTML(html))\n", " display_details(details)\n", " display_dates(df, \"{}_date_converted\".format(col))\n", " # Check for numbers\n", " elif has_number.sum() / value_count > cutoff and mixed is False:\n", " html = \"

Most of the values in this column include a number. It might be useful to extract the values.

\"\n", " df[\"{}_numbers_extracted\".format(col)] = df[col].str.extract(r\"\\b(\\d+)\\b\")\n", " if df[\"{}_numbers_extracted\".format(col)].nunique(dropna=True) > 2:\n", " df[\"{}_numbers_extracted\".format(col)] = pd.to_numeric(\n", " df[\"{}_numbers_extracted\".format(col)],\n", " errors=\"coerce\",\n", " downcast=\"integer\",\n", " )\n", " details = {}\n", " details[\"Highest value\"] = df[\"{}_numbers_extracted\".format(col)].max()\n", " details[\"Lowest value\"] = (\n", " df[\"{}_numbers_extracted\".format(col)].dropna().min()\n", " )\n", " display(HTML(html))\n", " display_details(details)\n", " display_numbers(df, \"{}_numbers_extracted\".format(col), unique_count)\n", "\n", "\n", "def date_field(df, col, value_count, year_count, details, html):\n", " default_dates = pd.to_datetime(\n", " df[col], infer_datetime_format=True, errors=\"coerce\", utc=True\n", " )\n", " default_dates_count = default_dates.dropna().size\n", " dayfirst_dates = pd.to_datetime(\n", " df[col],\n", " infer_datetime_format=True,\n", " errors=\"coerce\",\n", " dayfirst=True,\n", " yearfirst=True,\n", " utc=True,\n", " )\n", " dayfirst_dates_count = dayfirst_dates.dropna().size\n", " if (default_dates_count / value_count > date_cutoff) and (\n", " default_dates_count >= dayfirst_dates_count\n", " ):\n", " df[\"{}_date_converted\".format(col)] = default_dates\n", " elif (dayfirst_dates_count / value_count > date_cutoff) and (\n", " dayfirst_dates_count >= default_dates_count\n", " ):\n", " df[\"{}_date_converted\".format(col)] = dayfirst_dates\n", " else:\n", " # It's not a known date format, so let's just get the years\n", " df[\"{}_years_extracted\".format(col)] = df[col].str.extract(\n", " r\"\\b(1[7-9]{1}\\d{2}|20[0-1]{1}\\d{1})\\b\"\n", " )\n", " df[\"{}_date_converted\".format(col)] = pd.to_datetime(\n", " df[\"{}_years_extracted\".format(col)], format=\"%Y\", utc=True\n", " )\n", " html += \"

This looks like it contains dates.

\"\n", " html += \"

{:,} of {:,} values in this column were successfully parsed as dates.

\".format(\n", " df[\"{}_date_converted\".format(col)].dropna().size, value_count\n", " )\n", " details[\"Earliest date\"] = (\n", " df[\"{}_date_converted\".format(col)].min().strftime(\"%Y-%m-%d\")\n", " )\n", " details[\"Latest date\"] = (\n", " df[\"{}_date_converted\".format(col)].max().strftime(\"%Y-%m-%d\")\n", " )\n", " display(HTML(html))\n", " display_details(details)\n", " display_dates(df, \"{}_date_converted\".format(col))\n", "\n", "\n", "def url_field(df, col, details, html):\n", " display_details(details)\n", " html += (\n", " \"

It looks like this column contains urls. Here are some examples:

\"\n", " display(HTML(html))\n", "\n", "\n", "def unique_field(df, col, details, html):\n", " display_details(details)\n", " html += \"

This column only contains one value:

\"\n", " html += \"
{}
\".format(\n", " df[col].loc[df[col].first_valid_index()]\n", " )\n", " display(HTML(html))\n", "\n", "\n", "def number_field(df, col, value_count, unique_count, unique_ratio, details, html):\n", " has_year = df.loc[(df[col] >= 1700) & (df[col] <= 2019)]\n", " if (has_year.size / value_count) > date_cutoff:\n", " df[\"{}_date_converted\".format(col)] = pd.to_datetime(\n", " df[col], format=\"%Y\", utc=True, errors=\"coerce\"\n", " )\n", " html += \"

This looks like it contains dates.

\"\n", " html += \"

{:,} of {:,} values in this column were successfully parsed as dates.

\".format(\n", " df[\"{}_date_converted\".format(col)].dropna().size, value_count\n", " )\n", " details[\"Earliest date\"] = (\n", " df[\"{}_date_converted\".format(col)].dropna().min().strftime(\"%Y-%m-%d\")\n", " )\n", " details[\"Latest date\"] = (\n", " df[\"{}_date_converted\".format(col)].dropna().max().strftime(\"%Y-%m-%d\")\n", " )\n", " display(HTML(html))\n", " display_details(details)\n", " display_dates(df, \"{}_date_converted\".format(col))\n", " else:\n", " details[\"Highest value\"] = df[col].max()\n", " details[\"Lowest value\"] = df[col].dropna().min()\n", " display_details(details)\n", " if unique_ratio > cutoff:\n", " html = \"{:.2%} of the values in this column are unique, so it's probably some sort of identifier.\".format(\n", " unique_ratio\n", " )\n", " display(HTML(html))\n", " if unique_count <= 20:\n", " display_categories(df, col)\n", " else:\n", " display_numbers(df, col, unique_count)\n", " # Check for geocoordinates?\n", "\n", "\n", "def display_details(details):\n", " details_df = pd.DataFrame.from_dict(details, orient=\"index\", columns=[\" \"])\n", " details_df.rename_axis(\"Summary\", axis=\"columns\", inplace=True)\n", " details_df = details_df.style.set_table_styles(\n", " [dict(selector=\"th\", props=[(\"text-align\", \"left\")])]\n", " )\n", " display(details_df)\n", "\n", "\n", "def analyse_columns(df):\n", " enriched_df = df.copy()\n", " # out = widgets.Output()\n", " for index, col in enumerate(enriched_df.columns):\n", " display(\n", " HTML(\n", " '

{}. {}

'.format(\n", " slugify(col), index + 1, col\n", " )\n", " )\n", " )\n", " details = {}\n", " html = \"\"\n", " # Are there any values in this column\n", " value_count = enriched_df[col].dropna().size\n", " details[\"Number of (non empty) values\"] = \"{:,} ({:.2%} of rows)\".format(\n", " value_count, (value_count / enriched_df[col].size)\n", " )\n", " if value_count:\n", " # How many unique values are there in this column?\n", " unique_count = enriched_df[col].nunique(dropna=True)\n", " # What proportion of the values are unique?\n", " unique_ratio = unique_count / value_count\n", " details[\n", " \"Number of unique values\"\n", " ] = \"{:,} ({:.2%} of non-empty values)\".format(unique_count, unique_ratio)\n", " if unique_ratio == 1:\n", " html += (\n", " \"

All the values in this column are unique, perhaps it\"\n", " \"s some form of identifier.

\"\n", " )\n", " if unique_count == 1:\n", " unique_field(enriched_df, col, details, html)\n", " # Check it's a string field\n", " elif enriched_df[col].dtype == \"object\":\n", " word_counts = enriched_df[col].dropna().str.split().str.len().fillna(0)\n", " # median_word_count = statistics.median(word_counts)\n", " # Check for the presence of years\n", " # year_count = enriched_df[col].str.count(r'\\b1[7-9]{1}\\d{2}\\b|\\b20[0-1]{1}\\d{1}\\b').sum()\n", " if enriched_df[col].str.startswith(\"http\", na=False).sum() > 1:\n", " url_field(enriched_df, col, details, html)\n", " # elif median_word_count <= 4:\n", " # How many have words that combine letters and numbers?\n", " else:\n", " # How many start with words (and no numbers in the first two words)?\n", " starts_with_words = enriched_df[col].str.contains(\n", " r\"^[a-zA-Z]+$|^(?:\\b[a-zA-Z]{2,}\\b\\W*){2}\", regex=True\n", " )\n", " # How many have patterns that look like years?\n", " has_year = enriched_df[col].str.contains(\n", " r\"\\b1[7-9]{1}\\d{2}|20[0-1]{1}\\d{1}\\b\", regex=True\n", " )\n", " # If most don't start with words...\n", " # This filters out titles or names that might include dates.\n", " if (\n", " value_count - starts_with_words.sum()\n", " ) / value_count > date_cutoff:\n", " # If most contain years...\n", " if (has_year.sum() / value_count) > date_cutoff:\n", " date_field(\n", " enriched_df,\n", " col,\n", " value_count,\n", " has_year.sum(),\n", " details,\n", " html,\n", " )\n", " else:\n", " textplus_field(\n", " enriched_df,\n", " col,\n", " value_count,\n", " unique_count,\n", " unique_ratio,\n", " word_counts,\n", " has_year,\n", " details,\n", " html,\n", " )\n", " else:\n", " textplus_field(\n", " enriched_df,\n", " col,\n", " value_count,\n", " unique_count,\n", " unique_ratio,\n", " word_counts,\n", " has_year,\n", " details,\n", " html,\n", " )\n", " elif enriched_df[col].dtype in [\"int64\", \"float64\"]:\n", " number_field(\n", " enriched_df,\n", " col,\n", " value_count,\n", " unique_count,\n", " unique_ratio,\n", " details,\n", " html,\n", " )\n", " else:\n", " html = \"This column is empty.\"\n", " display(HTML(html))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "csvs = pd.read_csv(\n", " \"https://media.githubusercontent.com/media/wragge/srnsw-indexes/master/indexes.csv\"\n", ")\n", "# csvs = pd.read_csv(\"indexes.csv\")\n", "csvs.sort_values(by=[\"title\"], inplace=True)\n", "options = []\n", "for row in csvs.itertuples():\n", " slug = row.url.strip(\"/\").split(\"/\")[-1]\n", " options.append((row.title, {\"title\": row.title, \"slug\": slug}))\n", "\n", "\n", "def clear_all(b):\n", " select_csv.value = options[0][1]\n", " results.clear_output()\n", "\n", "\n", "select_csv = widgets.Dropdown(\n", " options=options, description=\"\", disabled=False, layout=widgets.Layout(width=\"80%\")\n", ")\n", "\n", "clear_button = widgets.Button(\n", " description=\"Clear\",\n", " disabled=False,\n", " button_style=\"\", # 'success', 'info', 'warning', 'danger' or ''\n", " tooltip=\"Clear current data\",\n", " icon=\"\",\n", ")\n", "\n", "analyse_button = widgets.Button(\n", " description=\"Analyse CSV\",\n", " disabled=False,\n", " button_style=\"primary\", # 'success', 'info', 'warning', 'danger' or ''\n", " tooltip=\"Analyse CSV\",\n", " icon=\"\",\n", ")\n", "\n", "clear_button.on_click(clear_all)\n", "analyse_button.on_click(analyse_csv)\n", "select_note = widgets.HTML(\"Select an index:\")\n", "select_tab = widgets.VBox([select_note, select_csv])\n", "# tab = widgets.Tab(children=[select_tab])\n", "# tab.set_title(0, 'Select CSV')\n", "display(\n", " widgets.VBox([select_tab, widgets.HBox([analyse_button, clear_button]), results])\n", ")" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "# IGNORE -- THIS CELL IS FOR AUTOMATED TESTING ONLY\n", "if os.getenv(\"GW_STATUS\") == \"dev\":\n", " select_csv.value = options[2][1]\n", " analyse_button.click()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "----\n", "\n", "Created by [Tim Sherratt](https://timsherratt.org/) for the [GLAM Workbench](https://glam-workbench.net/).\n", "\n", "Work on this notebook was supported by the Humanities, Arts and Social Sciences (HASS) Data Enhanced Virtual Lab." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.2" }, "voila": { "template": "material" } }, "nbformat": 4, "nbformat_minor": 4 }