From 2cb544bc8dda1a6feac79e3235097d268ae35b1a Mon Sep 17 00:00:00 2001 From: Cullen Watson Date: Mon, 9 Oct 2023 11:28:56 -0500 Subject: [PATCH] [chore] display clickable URLs in jupyter --- examples/HomeHarvest_Demo.ipynb | 34 +++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/examples/HomeHarvest_Demo.ipynb b/examples/HomeHarvest_Demo.ipynb index 43a28be..9e6aa49 100644 --- a/examples/HomeHarvest_Demo.ipynb +++ b/examples/HomeHarvest_Demo.ipynb @@ -4,7 +4,9 @@ "cell_type": "code", "execution_count": null, "id": "cb48903e-5021-49fe-9688-45cd0bc05d0f", - "metadata": {}, + "metadata": { + "is_executing": true + }, "outputs": [], "source": [ "from homeharvest import scrape_property\n", @@ -84,10 +86,34 @@ "outputs": [], "source": [ "# check sold properties\n", - "scrape_property(\n", + "properties = scrape_property(\n", " location=\"90210\",\n", - " listing_type=\"sold\"\n", - ")" + " listing_type=\"sold\",\n", + " past_days=10\n", + ")\n", + "display(properties)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "628c1ce2", + "metadata": { + "collapsed": false, + "is_executing": true, + "jupyter": { + "outputs_hidden": false + } + }, + "outputs": [], + "source": [ + "# display clickable URLs\n", + "from IPython.display import display, HTML\n", + "properties['property_url'] = '' + properties['property_url'] + ''\n", + "\n", + "html = properties.to_html(escape=False)\n", + "truncate_width = f'{html}'\n", + "display(HTML(truncate_width))" ] } ],