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
Location Detail
Kelvin edited this page Oct 26, 2020
·
25 revisions
location.get_detail(
search_items,
location_type,
csv=False`,
output_dir='cwd',
extra_param=None`
)Returns an array of Location Detail product for the given ID and location_type. Optionally creates a csv file. Arguments provided to extra_param will be appended to the end of the endpoint call.
(More information on the Location product can be found on the Location Detail Page on the First Street Foundation API Data Dictionary)
-
search_items:
list/file of SearchItems, parcels to retrieve location details 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). -
extra_param:
string, extra parameters to be sent with the request.
python -m firststreet -p location.get_detail# Contents of sample.py
# Create a `FirstStreet` object.
import firststreet
fs = firststreet.FirstStreet("api-key")
# Call location.get_detail on a list with 3 property FSIDs
location_detail = fs.location.get_detail([511447411, 511447412, 511447413], "property")
# Call location.get_detail on a list with 1 state FSID
location_detail = fs.location.get_detail([19], "state")
# Call location.get_detail on a file of SearchItems
location_detail = fs.location.get_detail("sample.txt", "property", csv=True)-
Installation
-
Usage
-
Products
-
Update