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
Historic Event
Kelvin edited this page Oct 28, 2020
·
11 revisions
historic.get_event(
search_items,
csv=False,
output_dir='/output'
)Returns an array of HistoricEvent product for the given event IDs. Only event IDs are accepted. Optionally creates a csv file.
(More information on the Location product can be found on the Historic Event Page on the First Street Foundation API Data Dictionary)
-
search_items:
list/file of EventIds, events to retrieve historic event information for. -
csv:
bool, whether to create a CSV for the retrieved data. -
output_dir:
string, location to output the created CSV (ifcsvis True).
# Call historic.get_event on a list with 2 FSIDs
python -m firststreet -p historic.get_event -i 10;12
# Call historic.get_event on a file of SearchItems
python -m firststreet -p historic.get_event -f sample.txt# Contents of sample.py
# Create a `FirstStreet` object.
import firststreet
fs = firststreet.FirstStreet("api-key")
# Call historic.get_event on a list with 2 property FSIDs
historic_event = fs.historic.get_event([10, 12], csv=True)
# Call historic.get_event on a file of SearchItems
historic_event = fs.historic.get_event("sample.txt", csv=True)| Key | Type | Description | Example |
|---|---|---|---|
| eventId | int | A unique First Street identifier assigned to each modeled historic event. | 325 |
| valid_id | bool | Whether the input FSID returned valid data from the server. | True |
| name | string | The name of the modeled historic event if it exists. Note: Several were strong pluvial events. | pluvial |
| month | int | The month of the event. | 5 |
| year | int | The year of the event. | 2004 |
| returnPeriod | int | The estimated recurrence interval of the event, or the inverse of the annual likelihood. For example a 1 in 500 annual likelihood event. | 100 |
| type | string | Categorization of event type (hurricane, fluvial, nor'easter, or tropical storm). | hurricane |
| properties | dict | Historic Event Properties object | See below |
| geometry | Geometry | A collection of nodes a [Geometry] that represents geographical information for area that was included within the historic model simulation. | See [Geometry] |
Flood depth is calculated at the lowest elevation of the building footprint (largest if more than 1 exists, or property centroid where footprint does not exist).
| Key | Type | Description | Example |
|---|---|---|---|
| total | int | The total count of parcels that are within the mapped area of the historic event's geometry. | 10 |
| affected | int | The total count of parcels that had any flooding (>0) to the building footprint that are within the mapped area of the historic event's geometry. | 5 |
-
Installation
-
Usage
-
Products
-
Update