Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Automated Valuation Model

Kelvin edited this page May 20, 2021 · 7 revisions

Automated Valuation Model Method

avm.get_avm(
    search_items, 
    csv=False, 
    output_dir='/output',
    extra_param=None
)

NOTE: Only properties can be submitted to the Automated Valuation Model method

The Automated Valuation Models (AVM) API provides the modeled real estate market value for the property as well as the providerId for the provider of the AVM model.

This method returns an array of AVMProperty products for the given IDs. Optionally creates a csv file

(More information on the Automated Valuation Model product can be found on the Automated Valuation Model Page on the First Street Foundation API Data Dictionary)

Arguments:

  • search_items: list/file of SearchItems, parcels to retrieve automated valuation model for.
  • csv: bool, whether to create a CSV for the retrieved data.
  • output_dir: string, location to output the created CSV (if csv is True).
  • extra_param: dict, only accepts a dict with a providerid key and an integer value. Ex: {"providerid": 3}

Example (Command Line):

Call avm.get_avmon a list of FSIDs

python -m firststreet -p avm.get_avm -s 511447411;80000002

Call location.get_summary on a lat/lng or address

python -m firststreet -p avm.get_avm -s 37.16314,-76.55782;38.50303,-106.72863
python -m firststreet -p avm.get_avm -s "247 Water Street, New York, New York";"135 East 46th Street New York, New York"

Call avm.get_avm on a file of SearchItems

python -m firststreet -p avm.get_avm -s sample_property.txt

Example (Python File):

# Contents of sample.py
# Create a `FirstStreet` object.  
import firststreet
fs = firststreet.FirstStreet("api-key")

# Call avm.get_avm on a list of FSIDs
avm = fs.avm.get_avm(search_items=[511447411, 80000002], csv=True)

# Call avm.get_avm on a lat/lng or address
avm = fs.avm.get_avm(search_items=[(37.16314,-76.55782)], csv=True)
avm = fs.avm.get_avm(search_items=["247 Water Street, New York, New York"], csv=True)

# Call avm.get_avm on a file of SearchItems
avm = fs.avm.get_avm(search_items="sample_property.txt", csv=True)

Automated Valuation Model Objects

AVM Property Object

Key Type Description Example
fsid int First Street ID (FSID) is a unique identifier assigned to each location. 390635012
avm dict Provides the Automated Valuation Model (AVM) or the modeled real estate market value in US dollars for the property. See below
providerID int The ID for the provider associated with the AVM. Default is 2 (First Street Foundation) 2

AVM Dictionary

NOTE: AVM will only return a mid value at the moment.

Key Type Description Example
low int First Street AVM lower bound. 140000
mid int First Street automated valuation model. 160000
high int First Street AVM upper bound. 180000

Clone this wiki locally