From 23323acc5a8761278c3b9d6e9d7d0a5441890a56 Mon Sep 17 00:00:00 2001 From: jnaiman Date: Wed, 1 Nov 2023 12:10:43 -0500 Subject: [PATCH] Auto-commit: Wed Nov 1 12:10:43 CDT 2023 --- week11/prep_notebook_week11.ipynb | 459 +++++++++++++++++++++--------- 1 file changed, 317 insertions(+), 142 deletions(-) diff --git a/week11/prep_notebook_week11.ipynb b/week11/prep_notebook_week11.ipynb index ae3088b..bc791a1 100644 --- a/week11/prep_notebook_week11.ipynb +++ b/week11/prep_notebook_week11.ipynb @@ -916,19 +916,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -1001,7 +1012,7 @@ "source": [ "#error again, ignorning\n", "#chart.properties(width='container').save(myJekyllDir+\"assets/json/dashboard_mobility.json\")\n", - "chart.save(myJekyllDir+\"assets/json/dashboard_mobility.json\")" + "chart.save(myJekyllDir+\"dashboard_mobility.json\")" ] }, { @@ -1058,19 +1069,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -1172,19 +1194,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -1263,19 +1296,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -1354,19 +1398,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -1445,19 +1500,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -1536,19 +1602,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -1625,7 +1702,7 @@ "metadata": {}, "outputs": [], "source": [ - "scatter6.save(myJekyllDir+\"assets/json/population_scatter.json\")" + "scatter6.save(myJekyllDir+\"population_scatter.json\")" ] }, { @@ -1648,19 +1725,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -1729,7 +1817,7 @@ "metadata": {}, "outputs": [], "source": [ - "scatter7.properties(width='container').save(myJekyllDir+\"assets/json/population_scatter.json\")" + "scatter7.properties(width='container').save(myJekyllDir+\"population_scatter.json\")" ] }, { @@ -1789,19 +1877,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -1901,19 +2000,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -2001,19 +2111,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -2087,19 +2208,30 @@ "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ @@ -2191,7 +2323,7 @@ "metadata": {}, "outputs": [], "source": [ - "chart.save(myJekyllDir+\"assets/json/altair_mobility_dashboard.json\")" + "chart.save(myJekyllDir+\"altair_mobility_dashboard.json\")" ] }, { @@ -2218,7 +2350,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 34, "id": "f2fa542f", "metadata": {}, "outputs": [], @@ -2229,7 +2361,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 35, "id": "5b8c3fbf", "metadata": {}, "outputs": [], @@ -2239,7 +2371,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 36, "id": "7bc7b069", "metadata": {}, "outputs": [ @@ -2445,7 +2577,7 @@ "[5 rows x 43 columns]" ] }, - "execution_count": 38, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } @@ -2456,27 +2588,46 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 37, "id": "effe9932", "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/jnaiman/opt/anaconda3/envs/DataVizPL/lib/python3.8/site-packages/altair/utils/deprecation.py:65: AltairDeprecationWarning: 'add_selection' is deprecated. Use 'add_params' instead.\n", + " warnings.warn(message, AltairDeprecationWarning, stacklevel=1)\n" + ] + }, { "data": { "text/html": [ "\n", - "
\n", + "\n", + "
\n", "" ], "text/plain": [ "alt.HConcatChart(...)" ] }, - "execution_count": 39, + "execution_count": 37, "metadata": {}, "output_type": "execute_result" } @@ -2563,12 +2714,12 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 38, "id": "f177492d", "metadata": {}, "outputs": [], "source": [ - "chart.save(myJekyllDir+\"assets/json/altair_mobility_data_dashboard.json\")" + "chart.save(myJekyllDir+\"altair_mobility_data_dashboard.json\")" ] }, { @@ -2581,7 +2732,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 40, "id": "db88e5af", "metadata": {}, "outputs": [], @@ -2591,44 +2742,44 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 41, "id": "d4cfdaee", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "890" + "953" ] }, - "execution_count": 42, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "os.stat(myJekyllDir+\"assets/json/altair_mobility_dashboard.json\").st_size # size in bytes - so ~1kb" + "os.stat(myJekyllDir+\"altair_mobility_dashboard.json\").st_size # size in bytes - so ~1kb" ] }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 42, "id": "c68d8f0b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "699535" + "699598" ] }, - "execution_count": 43, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "os.stat(myJekyllDir+\"assets/json/altair_mobility_data_dashboard.json\").st_size # so ~7Mb" + "os.stat(myJekyllDir+\"altair_mobility_data_dashboard.json\").st_size # so ~7Mb" ] }, { @@ -2641,7 +2792,7 @@ }, { "cell_type": "markdown", - "id": "92498c0e", + "id": "c70d0814", "metadata": {}, "source": [ "## 6. Quick drop-down interactivity (if time)" @@ -2650,7 +2801,31 @@ { "cell_type": "code", "execution_count": null, - "id": "d239a4fe", + "id": "d4889248", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0984d666", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "39e48b29", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a3ffe75d", "metadata": {}, "outputs": [], "source": [] @@ -2658,7 +2833,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ad746877", + "id": "d43ee2bc", "metadata": {}, "outputs": [], "source": [] @@ -2666,7 +2841,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ba586126", + "id": "523693da", "metadata": {}, "outputs": [], "source": []