You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 18, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+21-20Lines changed: 21 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,14 @@ Current release: 0.1
10
10
11
11
**Notice:** This API wrapper is subject to change.
12
12
13
+
<aname="toc"></a>
13
14
# Table of contents
14
15
-**[Installation](#installation)**
15
16
*[Running the Project - Method 1: Through the Command Line](#method1)
16
17
+[Command Line Argument Details](#commandline)
17
18
*[Running the Project - Method 2: Through the Client](#method2)
18
19
-[Client Initialization Details](#client-init)
19
-
-[Arguments](#client-#arguments)
20
+
-[Arguments](#client-arguments)
20
21
-**[Products](#products)**
21
22
-[Location](#location)
22
23
-[Probability](#probability)
@@ -32,7 +33,7 @@ Current release: 0.1
32
33
-**[License](#license)**
33
34
34
35
<aname="installation"></a>
35
-
# Installation
36
+
# [Installation](#toc)
36
37
**NOTE**: This project requires [Python](https://www.python.org/downloads/) 3.6+ to run.
37
38
1. Go to the Python page (https://www.python.org/downloads/) and download then install Python version 3. **Make sure that the checkbox is checked for Python to be added to the PATH**
38
39
@@ -107,7 +108,7 @@ Current release: 0.1
107
108
├── my_script.py
108
109
109
110
<a name="method1"></a>
110
-
## Running the Project - Method 1: Through the Command Line
111
+
## [Running the Project - Method 1: Through the Command Line](#toc)
111
112
**[Reminder] Keep your API key safe, and do not share it with others!**
112
113
113
114
1. [Required] Set an Environmental Variable with the `variable_name` as `FSF_API_KEY` and the `variable_value` with the `API_KEY`.
@@ -127,7 +128,7 @@ Current release: 0.1
127
128

128
129
129
130
<a name="commandline"></a>
130
-
### Command Line Argument Details:
131
+
### [Command Line Argument Details:](#toc)
131
132
132
133
- `-p/--product PRODUCT`: [REQUIRED] The product to call from the API
133
134
@@ -176,7 +177,7 @@ Current release: 0.1
176
177

177
178
178
179
<a name="method2"></a>
179
-
## Running the Project - Method 2: Through the Client
180
+
## [Running the Project - Method 2: Through the Client](#toc)
180
181
**[Reminder] Keep your API key safe, and do not share it with others!**
181
182
182
183
1. Create a new Python script (by using notepad or any other text editor) and initialize a First Street Foundation API Client.
* api_key `string`: The assigned API key to access the API.
198
199
* version `string= v1`: The version of the API to access. Defaults to the current version.
199
200
* log `bool= True`: Setting for whether to log info or not. Defaults to True.
@@ -216,9 +217,9 @@ Current release: 0.1
216
217

217
218
218
219
<a name="products"></a>
219
-
# Products
220
+
#[Products](#toc)
220
221
<a name="location"></a>
221
-
#### Location
222
+
#### [Location](#toc)
222
223
223
224
The Location API provides `Detail` and `Summary` data for the given FSIDs.
224
225
@@ -230,7 +231,7 @@ location.<method>
230
231
*`get_summary`(fsids `list`, location_type `string`, csv `bool`, [core_limit `int=100`]) - Returns an array of `Location Summary` product for the given IDs, location_type, and optionally creates a csv file
231
232
232
233
<a name="probability"></a>
233
-
#### Probability
234
+
#### [Probability](#toc)
234
235
235
236
The Probability API provides `Depth`, `Chance`, `Cumulative`, `Count` data for the given FSIDs.
236
237
@@ -245,7 +246,7 @@ probability.<method>
245
246
*`get_count`(fsids `list`, location_type `string`, csv `bool`, [core_limit `int=100`]) - Returns an array of `Probability Count` product for the given IDs, location_type, and optionally creates a csv file
246
247
247
248
<a name="historic"></a>
248
-
#### Historic
249
+
#### [Historic](#toc)
249
250
250
251
The Historic API provides `Summary` and `Event` data for the given FSIDs.
251
252
@@ -257,7 +258,7 @@ historic.<method>
257
258
*`get_summary`(fsids `list`, location_type `string`, csv `bool`, [core_limit `int=100`]) - Returns an array of `Historic Summary` product for the given IDs, location_type, and optionally creates a csv file
258
259
259
260
<a name="adaptation"></a>
260
-
#### Adaptation
261
+
#### [Adaptation](#toc)
261
262
262
263
The Adaptation API provides `Summary` and `Project` data for the given FSIDs.
263
264
@@ -269,7 +270,7 @@ adaptation.<method>
269
270
*`get_summary`(fsids `list`, location_type `string`, csv `bool`, [core_limit `int=100`]) - Returns an array of `Adaptation Summary` product for the given IDs, location_type, and optionally creates a csv file
270
271
271
272
<a name="fema"></a>
272
-
#### Fema
273
+
#### [Fema](#toc)
273
274
274
275
The Fema API provides `NFIP` data for the given FSIDs.
275
276
@@ -280,7 +281,7 @@ fema.<method>
280
281
*`get_nfip`(fsids `list`, location_type `string`, csv `bool`, [core_limit `int=100`]) - Returns an array of `Fema NFIP` product for the given IDs, location_type, and optionally creates a csv file
281
282
282
283
<a name="environmental"></a>
283
-
#### Environmental
284
+
#### [Environmental](#toc)
284
285
285
286
The Environmental API provides `Precipitation` data for the given FSIDs.
286
287
@@ -291,7 +292,7 @@ environmental.<method>
291
292
*`get_precipitation`(fsids `list`, csv `bool`, [core_limit `int=100`]) - Returns an array of `Environmental Precipitation` product for the given county IDs, and optionally creates a csv file
292
293
293
294
<a name="examples"></a>
294
-
# Examples
295
+
#[Examples](#toc)
295
296
**[Reminder] Keep your API key safe, and do not share it with others!**
296
297
1. Single FSID Extraction Through the Client:
297
298
```python
@@ -394,19 +395,19 @@ environmental.<method>
394
395
```
395
396
396
397
<a name="csv-output"></a>
397
-
# CSV File Output:
398
+
#[CSV File Output:](#toc)
398
399
Any product above can be additionally exported to a CSV file forfurther usage if the csv boolean is set during the product call, or any call using the command line. The extracted can be foundin the `data_csv` directory of the project folder (if at least one CSV has been extracted).
399
400
400
401
<a name="csv-name"></a>
401
-
#### CSV File Name:
402
+
#### [CSV File Name:](#toc)
402
403
The file name will be in the format of `YYYY_MM_DD_HH_mm_SS_product_subtype_lookup.csv`.
The contents of the CSV file will follow similar formats as the `First Street Foundation API - V1.0 Overview and Dictionary`, but all lists will be expanded to a flat file. For any values that are null or not available, `<NA>` will be used.
0 commit comments