From c2165d2ba8dbab563f70cb65615442d3a5509e1c Mon Sep 17 00:00:00 2001 From: Cullen Watson Date: Sun, 3 Nov 2024 15:25:33 -0600 Subject: [PATCH] remove other examples --- examples/HomeHarvest_Demo.ipynb | 141 -------------------------------- examples/HomeHarvest_Demo.py | 20 ----- 2 files changed, 161 deletions(-) delete mode 100644 examples/HomeHarvest_Demo.ipynb delete mode 100644 examples/HomeHarvest_Demo.py diff --git a/examples/HomeHarvest_Demo.ipynb b/examples/HomeHarvest_Demo.ipynb deleted file mode 100644 index 9e6aa49..0000000 --- a/examples/HomeHarvest_Demo.ipynb +++ /dev/null @@ -1,141 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "cb48903e-5021-49fe-9688-45cd0bc05d0f", - "metadata": { - "is_executing": true - }, - "outputs": [], - "source": [ - "from homeharvest import scrape_property\n", - "import pandas as pd" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "156488ce-0d5f-43c5-87f4-c33e9c427860", - "metadata": {}, - "outputs": [], - "source": [ - "pd.set_option('display.max_columns', None) # Show all columns\n", - "pd.set_option('display.max_rows', None) # Show all rows\n", - "pd.set_option('display.width', None) # Auto-adjust display width to fit console\n", - "pd.set_option('display.max_colwidth', 50) # Limit max column width to 50 characters" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "1c8b9744-8606-4e9b-8add-b90371a249a7", - "metadata": {}, - "outputs": [], - "source": [ - "# check for sale properties\n", - "scrape_property(\n", - " location=\"dallas\",\n", - " listing_type=\"for_sale\"\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "aaf86093", - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } - }, - "outputs": [], - "source": [ - "# search a specific address\n", - "scrape_property(\n", - " location=\"2530 Al Lipscomb Way\",\n", - " listing_type=\"for_sale\"\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ab7b4c21-da1d-4713-9df4-d7425d8ce21e", - "metadata": {}, - "outputs": [], - "source": [ - "# check rentals\n", - "scrape_property(\n", - " location=\"chicago, illinois\",\n", - " listing_type=\"for_rent\"\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "af280cd3", - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } - }, - "outputs": [], - "source": [ - "# check sold properties\n", - "properties = scrape_property(\n", - " location=\"90210\",\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))" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.11" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/examples/HomeHarvest_Demo.py b/examples/HomeHarvest_Demo.py deleted file mode 100644 index 46d31b1..0000000 --- a/examples/HomeHarvest_Demo.py +++ /dev/null @@ -1,20 +0,0 @@ -from homeharvest import scrape_property -from datetime import datetime - -# Generate filename based on current timestamp -current_timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") -filename = f"HomeHarvest_{current_timestamp}.csv" - -properties = scrape_property( - location="San Diego, CA", - listing_type="sold", # or (for_sale, for_rent) - past_days=30, # sold in last 30 days - listed in last x days if (for_sale, for_rent) - # pending_or_contingent=True # use on for_sale listings to find pending / contingent listings - # mls_only=True, # only fetch MLS listings - # proxy="http://user:pass@host:port" # use a proxy to change your IP address -) -print(f"Number of properties: {len(properties)}") - -# Export to csv -properties.to_csv(filename, index=False) -print(properties.head())