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
Adaptation Summary
Kelvin edited this page Oct 30, 2020
·
12 revisions
adaptation.get_summary(
search_items,
location_type,
csv=False,
output_dir='/output'
)Delivers the adaptation IDs for all projects that serve the location.
Returns an array of AdaptationSummary product for the given IDs and location_type. Optionally creates a csv file
(More information on the Adaption Summary product can be found on the Adaptation Summary Page on the First Street Foundation API Data Dictionary)
-
search_items:
list/file of SearchItems, parcels to retrieve location summary for. -
location_type:
string, one of{property, neighborhood, city, zcta, tract, county, cd, state}, for the search item type. -
csv:
bool, whether to create a CSV for the retrieved data. -
output_dir:
string, location to output the created CSV (ifcsvis True).
# Call adaptation.get_summary on a list with 3 property FSIDs
python -m firststreet -p adaptation.get_summary -i 511447411;511447412;511447413 -l property
# Call adaptation.get_summary on a list with 1 state FSID
python -m firststreet -p adaptation.get_summary -i 19 -l state
# Call adaptation.get_summary on a file of SearchItems
python -m firststreet -p adaptation.get_summary -f sample.txt -l property# Contents of sample.py
# Create a `FirstStreet` object.
import firststreet
fs = firststreet.FirstStreet("api-key")
# Call adaptation.get_summary on a list with 3 property FSIDs
location_summary = fs.adaptation.get_summary([511447411, 511447412, 511447413], "property")
# Call adaptation.get_summary on a list with 1 state FSID
location_summary = fs.adaptation.get_summary([19], "state")
# Call adaptation.get_summary on a file of SearchItems
location_summary = fs.adaptation.get_summary("sample.txt", "property", csv=True)| Key | Type | Description | Example |
|---|---|---|---|
| fsid | int | First Street ID (FSID) is a unique identifier assigned to each location. | 392804911 |
| adaptation | Array[int] | Any Adaptation ID(s) (unique First Street ID assigned to all adaptation projects) for project(s) where the area served for the project overlaps any area of the location. | [12345, 23456, 34567, 45678] |
-
Installation
-
Usage
-
Products
-
Update