diff --git a/example/Citibike.ipynb b/example/Citibike.ipynb
index 0b89235..8ac9f74 100644
--- a/example/Citibike.ipynb
+++ b/example/Citibike.ipynb
@@ -38,15 +38,71 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 1,
"id": "d72cca6a-6276-4672-9508-c7537d709fa0",
"metadata": {
"tags": []
},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Requirement already satisfied: boto3 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (1.34.74)\n",
+ "Requirement already satisfied: matplotlib in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (3.8.3)\n",
+ "Requirement already satisfied: geopy in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (2.4.1)\n",
+ "Requirement already satisfied: scipy in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (1.12.0)\n",
+ "Requirement already satisfied: twosigma.memento in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (0.28.1)\n",
+ "Requirement already satisfied: ipywidgets in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (8.1.2)\n",
+ "Requirement already satisfied: s3transfer<0.11.0,>=0.10.0 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from boto3) (0.10.1)\n",
+ "Requirement already satisfied: botocore<1.35.0,>=1.34.74 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from boto3) (1.34.74)\n",
+ "Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from boto3) (1.0.1)\n",
+ "Requirement already satisfied: numpy<2,>=1.21 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from matplotlib) (1.26.4)\n",
+ "Requirement already satisfied: kiwisolver>=1.3.1 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from matplotlib) (1.4.5)\n",
+ "Requirement already satisfied: fonttools>=4.22.0 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from matplotlib) (4.50.0)\n",
+ "Requirement already satisfied: python-dateutil>=2.7 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from matplotlib) (2.9.0.post0)\n",
+ "Requirement already satisfied: packaging>=20.0 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from matplotlib) (24.0)\n",
+ "Requirement already satisfied: pillow>=8 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from matplotlib) (10.2.0)\n",
+ "Requirement already satisfied: contourpy>=1.0.1 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from matplotlib) (1.2.0)\n",
+ "Requirement already satisfied: pyparsing>=2.3.1 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from matplotlib) (3.1.2)\n",
+ "Requirement already satisfied: cycler>=0.10 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from matplotlib) (0.12.1)\n",
+ "Requirement already satisfied: geographiclib<3,>=1.52 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from geopy) (2.0)\n",
+ "Requirement already satisfied: pyyaml>=3.13 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from twosigma.memento) (6.0.1)\n",
+ "Requirement already satisfied: pandas>=1.0.5 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from twosigma.memento) (2.2.1)\n",
+ "Requirement already satisfied: graphviz>=0.13 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from twosigma.memento) (0.20.3)\n",
+ "Requirement already satisfied: pytz>=2020.1 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from twosigma.memento) (2024.1)\n",
+ "Requirement already satisfied: tqdm>=4.31.1 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from twosigma.memento) (4.66.2)\n",
+ "Requirement already satisfied: jinja2>=3.1.3 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from twosigma.memento) (3.1.3)\n",
+ "Requirement already satisfied: widgetsnbextension~=4.0.10 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipywidgets) (4.0.10)\n",
+ "Requirement already satisfied: ipython>=6.1.0 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipywidgets) (8.23.0)\n",
+ "Requirement already satisfied: comm>=0.1.3 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipywidgets) (0.2.2)\n",
+ "Requirement already satisfied: jupyterlab-widgets~=3.0.10 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipywidgets) (3.0.10)\n",
+ "Requirement already satisfied: traitlets>=4.3.1 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipywidgets) (5.14.2)\n",
+ "Requirement already satisfied: urllib3!=2.2.0,<3,>=1.25.4 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from botocore<1.35.0,>=1.34.74->boto3) (2.2.1)\n",
+ "Requirement already satisfied: pexpect>4.3 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (4.9.0)\n",
+ "Requirement already satisfied: matplotlib-inline in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (0.1.6)\n",
+ "Requirement already satisfied: typing-extensions in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (4.10.0)\n",
+ "Requirement already satisfied: pygments>=2.4.0 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (2.17.2)\n",
+ "Requirement already satisfied: decorator in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (5.1.1)\n",
+ "Requirement already satisfied: jedi>=0.16 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (0.19.1)\n",
+ "Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.41 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (3.0.43)\n",
+ "Requirement already satisfied: exceptiongroup in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (1.2.0)\n",
+ "Requirement already satisfied: stack-data in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (0.6.3)\n",
+ "Requirement already satisfied: MarkupSafe>=2.0 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from jinja2>=3.1.3->twosigma.memento) (2.1.5)\n",
+ "Requirement already satisfied: tzdata>=2022.7 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from pandas>=1.0.5->twosigma.memento) (2024.1)\n",
+ "Requirement already satisfied: six>=1.5 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)\n",
+ "Requirement already satisfied: parso<0.9.0,>=0.8.3 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/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 /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from pexpect>4.3->ipython>=6.1.0->ipywidgets) (0.7.0)\n",
+ "Requirement already satisfied: wcwidth in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/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: asttokens>=2.1.0 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (2.4.1)\n",
+ "Requirement already satisfied: executing>=1.2.0 in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (2.0.1)\n",
+ "Requirement already satisfied: pure-eval in /mnt/c/Users/markr/data/projects/twosigma/memento/venv/lib/python3.10/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (0.2.2)\n"
+ ]
+ }
+ ],
"source": [
"# sudo apt-get install graphviz\n",
- "!pip install boto3 matplotlib geopy scipy twosigma.memento"
+ "!pip install boto3 matplotlib geopy scipy twosigma.memento ipywidgets"
]
},
{
@@ -60,6 +116,8 @@
"source": [
"from twosigma.memento import memento_function\n",
"import boto3\n",
+ "import botocore\n",
+ "import botocore.client\n",
"from io import BytesIO, StringIO\n",
"import zipfile\n",
"import pandas as pd\n",
@@ -93,7 +151,7 @@
"@memento_function\n",
"def ingest_citibike(year: int):\n",
" bucket = \"tripdata\"\n",
- " s3_client = boto3.client(\"s3\")\n",
+ " s3_client = boto3.client(\"s3\", config=botocore.client.Config(signature_version=botocore.UNSIGNED))\n",
" zip_filename = f\"{year}-citibike-tripdata.zip\"\n",
" response = s3_client.get_object(Bucket=bucket, Key=zip_filename)\n",
" object_data = response['Body'].read()\n",
@@ -266,98 +324,98 @@
"\n",
"\n",
"e1cd35ee\n",
- "\n",
- "citibike_activity_by_zip\n",
+ "\n",
+ "citibike_activity_by_zip\n",
"\n",
"\n",
"\n",
"7f68612d\n",
- "\n",
- "end_usage\n",
+ "\n",
+ "end_usage\n",
"\n",
"\n",
"\n",
"e1cd35ee->7f68612d\n",
- "\n",
- "\n",
+ "\n",
+ "\n",
"\n",
"\n",
"\n",
"ccc846ef\n",
- "\n",
- "start_usage\n",
+ "\n",
+ "start_usage\n",
"\n",
"\n",
"\n",
"e1cd35ee->ccc846ef\n",
- "\n",
- "\n",
+ "\n",
+ "\n",
"\n",
- "\n",
+ "\n",
"\n",
- "93592f4d\n",
- "\n",
- "zip_by_lat_long\n",
+ "2c30b248\n",
+ "\n",
+ "normalize_citibike_tripdata\n",
"\n",
- "\n",
+ "\n",
"\n",
- "7f68612d->93592f4d\n",
- "\n",
- "\n",
+ "7f68612d->2c30b248\n",
+ "\n",
+ "\n",
"\n",
- "\n",
+ "\n",
"\n",
- "2c30b248\n",
- "\n",
- "normalize_citibike_tripdata\n",
+ "93592f4d\n",
+ "\n",
+ "zip_by_lat_long\n",
"\n",
- "\n",
+ "\n",
"\n",
- "7f68612d->2c30b248\n",
- "\n",
- "\n",
+ "7f68612d->93592f4d\n",
+ "\n",
+ "\n",
"\n",
- "\n",
+ "\n",
"\n",
- "ccc846ef->93592f4d\n",
- "\n",
- "\n",
+ "ccc846ef->2c30b248\n",
+ "\n",
+ "\n",
"\n",
- "\n",
+ "\n",
"\n",
- "ccc846ef->2c30b248\n",
- "\n",
- "\n",
+ "ccc846ef->93592f4d\n",
+ "\n",
+ "\n",
"\n",
"\n",
"\n",
"1ed63db4\n",
- "\n",
- "citibike_tripdata_csv\n",
+ "\n",
+ "citibike_tripdata_csv\n",
"\n",
"\n",
"\n",
"2c30b248->1ed63db4\n",
- "\n",
- "\n",
+ "\n",
+ "\n",
"\n",
"\n",
"\n",
"2d9f38ea\n",
- "\n",
- "ingest_citibike\n",
+ "\n",
+ "ingest_citibike\n",
"\n",
"\n",
"\n",
"1ed63db4->2d9f38ea\n",
- "\n",
- "\n",
+ "\n",
+ "\n",
"\n",
"\n",
"\n"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 10,
@@ -487,7 +545,7 @@
"\n"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 14,
@@ -543,11 +601,11 @@
"\n",
"\n",
- "