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 Count Summary
Kelvin edited this page Oct 28, 2020
·
13 revisions
probability.get_count_summary(
search_items,
csv=False,
output_dir='/output'
)Returns an array of ProbabilityCountSummary product for the given property IDs. Only property IDs are accepted. Optionally creates a csv file.
-
search_items:
list/file of SearchItems, property parcels to retrieve probability count-summary 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_count_summary on a list with 2 FSIDs
python -m firststreet -p probability.get_count_summary -i 190836953;392804911
# Call probability.get_count_summary on a file of SearchItems
python -m firststreet -p probability.get_count_summary -f sample.txt# Contents of sample.py
# Create a `FirstStreet` object.
import firststreet
fs = firststreet.FirstStreet("api-key")
# Call probability.get_count_summary on a list with 2 property FSIDs
probability_count_summary = fs.probability.get_count_summary([190836953, 193139123])
# Call probability.get_count_summary on a file of SearchItems
probability_count_summary = fs.probability.get_count_summary("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 |
| neighborhood | array of dict | The count of flooding to a building footprint within the neighborhood broken down by the year of annual risk. The low, mid, high count is returned as a dict within the associated year. Available years within the array of dict are 2020 and 2050. | See Location Dictionary Below |
| city | array of dict | The count of flooding to a building footprint within the city broken down by the year of annual risk. The low, mid, high count is returned as a dict within the associated year. Available years within the array of dict are 2020 and 2050. | See Location Dictionary Below |
| zcta | array of dict | The count of flooding to a building footprint within the zcta broken down by the year of annual risk. The low, mid, high count is returned as a dict within the associated year. Available years within the array of dict are 2020 and 2050. | See Location Dictionary Below |
| tract | array of dict | The count of flooding to a building footprint within the tract broken down by the year of annual risk. The low, mid, high count is returned as a dict within the associated year. Available years within the array of dict are 2020 and 2050. | See Location Dictionary Below |
| county | array of dict | The count of flooding to a building footprint within the county broken down by the year of annual risk. The low, mid, high count is returned as a dict within the associated year. Available years within the array of dict are 2020 and 2050. | See Location Dictionary Below |
| cd | array of dict | The count of flooding to a building footprint within the cd broken down by the year of annual risk. The low, mid, high count is returned as a dict within the associated year. Available years within the array of dict are 2020 and 2050. | See Location Dictionary Below |
| state | array of dict | The count of flooding to a building footprint within the state broken down by the year of annual risk. The low, mid, high count is returned as a dict within the associated year. Available years within the array of dict are 2020 and 2050. | See Location Dictionary Below |
| Key | Type | Description | Example |
|---|---|---|---|
| fsid | int | First Street ID (FSID) is a unique identifier assigned to each location. | 392804911 |
| name | string | The name of the location | 'North Newport News' |
| count | array of dict | A collection of Count Data | See Below |
| Key | Type | Description | Example |
|---|---|---|---|
| year | int | The year (2020 or 2050) the probability was calculated for. | 2020 |
| data | Array of Dict | A collection of Probability Count Data | See below |
| Key | Type | Description | Example |
|---|---|---|---|
| low | int | The total count of properties that exist in that return period and depth bin, based on the low scenario of the RCP 4.5 emissions curve. | 125 |
| mid | int | The total count of properties that exist in that return period and depth bin, based on the mid scenario of the RCP 4.5 emissions curve. | 150 |
| high | int | The total count of properties that exist in that return period and depth bin, based on the high scenario of the RCP 4.5 emissions curve. | 175 |
-
Installation
-
Usage
-
Products
-
Update