diff --git a/content/Amnesty-dashboard.ipynb b/content/Amnesty-dashboard.ipynb index feb0c12..d784cc7 100644 --- a/content/Amnesty-dashboard.ipynb +++ b/content/Amnesty-dashboard.ipynb @@ -2,88 +2,10 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "70810d90-fb63-4ff1-a623-8a36acec4aab", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/var/folders/sw/4wgd3t055gxbcfg0yp7297480000gn/T/ipykernel_29493/729717769.py:1: DeprecationWarning: \n", - "Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),\n", - "(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)\n", - "but was not found to be installed on your system.\n", - "If this would cause problems for you,\n", - "please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466\n", - " \n", - " import pandas as pd\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: ipywidgets in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (8.1.1)\n", - "Requirement already satisfied: comm>=0.1.3 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipywidgets) (0.2.1)\n", - "Requirement already satisfied: ipython>=6.1.0 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipywidgets) (8.20.0)\n", - "Requirement already satisfied: traitlets>=4.3.1 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipywidgets) (5.14.1)\n", - "Requirement already satisfied: widgetsnbextension~=4.0.9 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipywidgets) (4.0.9)\n", - "Requirement already satisfied: jupyterlab-widgets~=3.0.9 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipywidgets) (3.0.9)\n", - "Requirement already satisfied: decorator in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (5.1.1)\n", - "Requirement already satisfied: jedi>=0.16 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (0.19.1)\n", - "Requirement already satisfied: matplotlib-inline in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (0.1.6)\n", - "Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.41 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (3.0.43)\n", - "Requirement already satisfied: pygments>=2.4.0 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (2.17.2)\n", - "Requirement already satisfied: stack-data in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (0.6.3)\n", - "Requirement already satisfied: exceptiongroup in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (1.2.0)\n", - "Requirement already satisfied: pexpect>4.3 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (4.9.0)\n", - "Requirement already satisfied: parso<0.9.0,>=0.8.3 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from jedi>=0.16->ipython>=6.1.0->ipywidgets) (0.8.3)\n", - "Requirement already satisfied: ptyprocess>=0.5 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from pexpect>4.3->ipython>=6.1.0->ipywidgets) (0.7.0)\n", - "Requirement already satisfied: wcwidth in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from prompt-toolkit<3.1.0,>=3.0.41->ipython>=6.1.0->ipywidgets) (0.2.13)\n", - "Requirement already satisfied: executing>=1.2.0 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (2.0.1)\n", - "Requirement already satisfied: asttokens>=2.1.0 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (2.4.1)\n", - "Requirement already satisfied: pure-eval in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (0.2.2)\n", - "Requirement already satisfied: six>=1.12.0 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from asttokens>=2.1.0->stack-data->ipython>=6.1.0->ipywidgets) (1.16.0)\n", - "Requirement already satisfied: colorcet in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (3.0.1)\n", - "Requirement already satisfied: pyct>=0.4.4 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from colorcet) (0.5.0)\n", - "Requirement already satisfied: param>=1.7.0 in /Users/fbarnea/.virtualenvs/amnesty_UNHRC/lib/python3.10/site-packages (from pyct>=0.4.4->colorcet) (2.0.2)\n", - "usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]\n", - " [--paths] [--json] [--debug]\n", - " [subcommand]\n", - "\n", - "Jupyter: Interactive Computing\n", - "\n", - "positional arguments:\n", - " subcommand the subcommand to launch\n", - "\n", - "options:\n", - " -h, --help show this help message and exit\n", - " --version show the versions of core jupyter packages and exit\n", - " --config-dir show Jupyter config dir\n", - " --data-dir show Jupyter data dir\n", - " --runtime-dir show Jupyter runtime dir\n", - " --paths show all Jupyter paths. Add --json for machine-readable\n", - " format.\n", - " --json output paths as machine-readable json\n", - " --debug output debug information about paths\n", - "\n", - "Available subcommands: dejavu events execute kernel kernelspec lab\n", - "labextension labhub lite migrate nbconvert notebook piplite run server\n", - "troubleshoot trust\n", - "\n", - "Jupyter command `jupyter-nbextension` not found.\n" - ] - }, - { - "data": { - "application/javascript": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n function drop(id) {\n const view = Bokeh.index.get_by_id(id)\n if (view != null) {\n view.model.document.clear()\n Bokeh.index.delete(view)\n }\n }\n\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n\n // Clean up Bokeh references\n if (id != null) {\n drop(id)\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim()\n drop(id)\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"
\\n\"+\n \"