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 May 20, 2021
·
11 revisions
historic.get_event(
search_items,
csv=False,
output_dir='/output'
)Provides information on the historic event including name, type or cause, date, count of properties in modeled area, count of properties affected, and event geometry.
This method 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 Historic Event 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).
python -m firststreet -p historic.get_event -s 10;12python -m firststreet -p historic.get_event -s sample_event_ids.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 event 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_event_ids.txt", csv=True)| Key | Type | Description | Example |
|---|---|---|---|
| eventId | str | 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 | 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