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

Property NFIP

Kelvin edited this page May 20, 2021 · 3 revisions

Property NFIP Method

nfip.get_property_nfip(
    search_items, 
    csv=False, 
    output_dir='/output'
)

NOTE: Only properties can be submitted to the Property NFIP Method

The National Flood Insurance Program (NFIP) premiums are the cost of flood insurance for coverage of the building and the contents in the building based on the current NFIP insurance rate tables. There are two hypothetical insurance premiums for coverage of the structure and contents at $250k/$125k and $125k/$50k.

This method returns an array of NFIPPremium products for the given location items. Optionally creates a csv file

(More information on the Property NFIP product can be found on the Property NFIP Page on the First Street Foundation API Data Dictionary)

Arguments:

  • search_items: list/file of SearchItems, parcels to retrieve property NFIP premiums for. Must be a property parcel.
  • csv: bool, whether to create a CSV for the retrieved data.
  • output_dir: string, location to output the created CSV (if csv is True).

Example (Command Line):

Call economic.get_property_nfip on a list of FSIDs

python -m firststreet -p economic.get_property_nfip -s 511447411;80000002

Call economic.get_property_nfip on a lat/lng or address

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

Call economic.get_property_nfip on a file of SearchItems

python -m firststreet -p economic.get_property_nfip -s sample_property.txt

Example (Python File):

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

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

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

# Call economic.get_property_nfip on a file of SearchItems
nfip = fs.economic.get_property_nfip(search_items="sample_property.txt", csv=True)

Property NFIP Objects

NFIPPremium Object

Key Type Description Example
fsid int The requested property's FSID 392804911
data Array[dict] PropertyNFIP Dictionary See below

PropertyNFIP Dictionary

Key Type Description Example
estimate int Estimated premium for a policy in US dollars. 500
building int The dollar amount of building coverage for estimate in US dollars. 125000
contents int The dollar amount of contents coverage for estimate in US dollars. 50000
Clone this wiki locally