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 Detail By Location
Kelvin edited this page Oct 30, 2020
·
5 revisions
adaptation.get_detail_by_location(
search_items,
location_type,
csv=False,
output_dir='/output'
)This method first runs the AdaptationSummary product for the given IDs to get all relevant adaptation ids in the given location IDs, then runs the AdaptationDetail product on the extracted adaptation details.
This method returns an array of array of AdaptationSummary and AdaptationDetail products for the given IDs. Optionally creates a csv file.
-
search_items:
list/file of AdaptationIds, adaptations to retrieve adaptation detail information 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_detail_by_location on a list with 2 FSIDs
python -m firststreet -p adaptation.get_detail_by_location -i 190836953;193139123 -l property
# Call adaptation.get_detail_by_location on a file of SearchItems
python -m firststreet -p adaptation.get_detail_by_location -f sample.txt -l property# Contents of sample.py
# Create a `FirstStreet` object.
import firststreet
fs = firststreet.FirstStreet("api-key")
# Call adaptation.get_detail_by_location on a list with 2 property FSIDs
adaptation_detail = fs.adaptation.get_detail_by_location ([190836953, 193139123], location_type="property", csv=True)
# Call adaptation.get_detail_by_location on a file of SearchItems
adaptation_detail = fs.adaptation.get_detail_by_location ("sample.txt", csv=True)List with 2 items:
-
List of
AdaptationSummaryproducts (See the Adaptation Summary page for more information) -
List of
AdaptationDetailproducts (See the Adaptation Detail page for more information)
-
Installation
-
Usage
-
Products
-
Update