diff --git a/requirements.txt b/requirements.txt index 2eec4aa..bc40ae5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,3 @@ altair copia vl-convert-python seaborn -ptitprince \ No newline at end of file diff --git a/speculative_reading/PartialBorrowers.ipynb b/speculative_reading/PartialBorrowers.ipynb index 886aa44..3d5cbce 100644 --- a/speculative_reading/PartialBorrowers.ipynb +++ b/speculative_reading/PartialBorrowers.ipynb @@ -2422,7 +2422,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 73, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -2434,31 +2434,7 @@ "outputs": [], "source": [ "# custom altair raincloud plot\n", - "from utils.charts import raincloud_plot\n", - "\n", - "\n", - "# # raincloud plot adapted from Zoe's code\n", - "\n", - "# import seaborn as sns\n", - "# sns.set()\n", - "# import matplotlib.pyplot as plt\n", - "# import matplotlib.collections as clt\n", - "# import ptitprince as pt\n", - "\n", - "# def raincloud_borrow_plot(df, img_filename, duration_for='all members'):\n", - "# dx=\"borrow_duration_days\"\n", - "# pal = sns.color_palette('colorblind')\n", - "# sns.set(style=\"darkgrid\")\n", - "# f, ax = plt.subplots(figsize=(10, 2))\n", - "# ax = pt.half_violinplot(x=dx, data=df, palette=pal, bw=.2, cut=0., scale = \"area\", width=.6, inner = None) \n", - "# ax=sns.stripplot(x=dx,data=df, palette=pal, edgecolor=\"white\", size = 3, jitter = 1, zorder = 0) \n", - "\n", - "# ax.set_title('Distribution of borrow duration for %s' % duration_for)\n", - "# ax.set_xlabel('borrow duration in days')\n", - "# plt.show()\n", - "# ax.figure.savefig(img_filename)\n", - "\n", - "# raincloud_borrow_plot(all_borrows, 'all_borrow_duration_raincloud_plot.png')\n" + "from utils.charts import raincloud_plot" ] }, {