This repository was archived by the owner on Jan 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Probability Depth
Kelvin edited this page Oct 29, 2020
·
18 revisions
probability.get_depth(
search_items,
csv=False,
output_dir='/output'
)Returns an array of ProbabilityDepth product for the given property IDs. Only property IDs are accepted. Optionally creates a csv file.
(More information on the Probability Depth product can be found on the Probability Depth Page on the First Street Foundation API Data Dictionary)
-
search_items:
list/file of SearchItems, property parcels to retrieve probability depth for. -
csv:
bool, whether to create a CSV for the retrieved data. -
output_dir:
string, location to output the created CSV (ifcsvis True).
# Call probability.get_depth on a list with 2 FSIDs
python -m firststreet -p probability.get_depth -i 190836953;193139123
# Call probability.get_depth on a file of SearchItems
python -m firststreet -p probability.get_depth -f sample.txt# Contents of sample.py
# Create a `FirstStreet` object.
import firststreet
fs = firststreet.FirstStreet("api-key")
# Call probability.get_depth on a list with 2 property FSIDs
probability_depth = fs.probability.get_depth([190836953, 193139123])
# Call probability.get_depth on a file of SearchItems
probability_depth = fs.probability.get_depth("sample.txt", csv=True)| Key | Type | Description | Example |
|---|---|---|---|
| fsid | int | First Street ID (FSID) is a unique identifier assigned to each location. | 392804911 |
| valid_id | bool | Whether the input FSID returned valid data from the server. | True |
| depth | Array of Dict | The flood depth (in centimeters) for flooding to the building footprint broken down by return period and year of annual risk. The low, mid, high depth is returned as an array of dict within the associated return period and year. Available return periods include 500, 250, 100, 50, 20, 10, 5, and 2 years, returned as an array of dict and are broken down by the following years within the array of dict model - 2020, 2025, 2030, 2035, 2040, 2045, and 2050. | See below |
| Key | Type | Description | Example |
|---|---|---|---|
| year | int | The year (2020, 2025, 2030, 2035, 2040, 2045, or 2050) the depth was calculated for. | 2020 |
| data | Array of Dict | A collection of Probability Depth Data | See below |
| Key | Type | Description | Example |
|---|---|---|---|
| returnPeriod | int | The return period (500, 250, 100, 50, 20, 10, 5, or 2 years) that the depth was calculated for. | 500 |
| data | Dict | Depth Return Period Data | See below |
| Key | Type | Description | Example |
|---|---|---|---|
| low | int | The depth in centimeters for the specified return period based on the low scenario of the RCP 4.5 emissions curve. | 8 |
| mid | int | The depth in centimeters for the specified return period based on the mid scenario of the RCP 4.5 emissions curve. | 11 |
| high | int | The depth in centimeters for the specified return period based on the high scenario of the RCP 4.5 emissions curve. | 14 |
-
Installation
-
Usage
-
Products
-
Update