-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28b4d73
commit fc957aa
Showing
6 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
16 changes: 16 additions & 0 deletions
16
data/data-pipeline/data_pipeline/tests/sources/fsf_wildfire_risk/data/extract.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
GEOID,count_properties,burnprob_year00_flag,burnprob_year30_flag | ||
6027000800,942,31,634 | ||
6069000802,1131,0,264 | ||
6061021322,1483,13,478 | ||
15001021010,1888,62,550 | ||
15001021101,3463,18,192 | ||
15007040603,1557,0,509 | ||
15007040700,1535,0,43 | ||
15009030100,1660,177,968 | ||
15009030201,6144,173,2856 | ||
15001021402,4118,20,329 | ||
15001021800,2814,111,770 | ||
15009030402,3375,7,437 | ||
15009030800,4847,3268,3529 | ||
15003010201,2335,1949,2005 | ||
15007040604,5365,3984,4439 |
Binary file added
BIN
+579 Bytes
data/data-pipeline/data_pipeline/tests/sources/fsf_wildfire_risk/data/fsf_fire.zip
Binary file not shown.
16 changes: 16 additions & 0 deletions
16
data/data-pipeline/data_pipeline/tests/sources/fsf_wildfire_risk/data/output.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
GEOID10_TRACT,Count of properties eligible for wildfire risk calculation within tract (floor of 250),Count of properties at risk of wildfire today,Count of properties at risk of wildfire in 30 years,Share of properties at risk of fire today,Share of properties at risk of fire in 30 years | ||
06027000800,942,31,634,0.0329087049,0.6730360934 | ||
06069000802,1131,0,264,0.0000000000,0.2334217507 | ||
06061021322,1483,13,478,0.0087660148,0.3223196224 | ||
15001021010,1888,62,550,0.0328389831,0.2913135593 | ||
15001021101,3463,18,192,0.0051978054,0.0554432573 | ||
15007040603,1557,0,509,0.0000000000,0.3269107258 | ||
15007040700,1535,0,43,0.0000000000,0.0280130293 | ||
15009030100,1660,177,968,0.1066265060,0.5831325301 | ||
15009030201,6144,173,2856,0.0281575521,0.4648437500 | ||
15001021402,4118,20,329,0.0048567266,0.0798931520 | ||
15001021800,2814,111,770,0.0394456290,0.2736318408 | ||
15009030402,3375,7,437,0.0020740741,0.1294814815 | ||
15009030800,4847,3268,3529,0.6742314834,0.7280792243 | ||
15003010201,2335,1949,2005,0.8346895075,0.8586723769 | ||
15007040604,5365,3984,4439,0.7425908667,0.8273998136 |
16 changes: 16 additions & 0 deletions
16
data/data-pipeline/data_pipeline/tests/sources/fsf_wildfire_risk/data/transform.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
GEOID,count_properties,Count of properties at risk of wildfire today,Count of properties at risk of wildfire in 30 years,GEOID10_TRACT,Count of properties eligible for wildfire risk calculation within tract (floor of 250),Share of properties at risk of fire today,Share of properties at risk of fire in 30 years | ||
06027000800,942,31,634,06027000800,942,0.0329087049,0.6730360934 | ||
06069000802,1131,0,264,06069000802,1131,0.0000000000,0.2334217507 | ||
06061021322,1483,13,478,06061021322,1483,0.0087660148,0.3223196224 | ||
15001021010,1888,62,550,15001021010,1888,0.0328389831,0.2913135593 | ||
15001021101,3463,18,192,15001021101,3463,0.0051978054,0.0554432573 | ||
15007040603,1557,0,509,15007040603,1557,0.0000000000,0.3269107258 | ||
15007040700,1535,0,43,15007040700,1535,0.0000000000,0.0280130293 | ||
15009030100,1660,177,968,15009030100,1660,0.1066265060,0.5831325301 | ||
15009030201,6144,173,2856,15009030201,6144,0.0281575521,0.4648437500 | ||
15001021402,4118,20,329,15001021402,4118,0.0048567266,0.0798931520 | ||
15001021800,2814,111,770,15001021800,2814,0.0394456290,0.2736318408 | ||
15009030402,3375,7,437,15009030402,3375,0.0020740741,0.1294814815 | ||
15009030800,4847,3268,3529,15009030800,4847,0.6742314834,0.7280792243 | ||
15003010201,2335,1949,2005,15003010201,2335,0.8346895075,0.8586723769 | ||
15007040604,5365,3984,4439,15007040604,5365,0.7425908667,0.8273998136 |
19 changes: 19 additions & 0 deletions
19
data/data-pipeline/data_pipeline/tests/sources/fsf_wildfire_risk/test_etl.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import pathlib | ||
from data_pipeline.tests.sources.example.test_etl import TestETL | ||
from data_pipeline.etl.sources.fsf_wildfire_risk.etl import WildfireRiskETL | ||
|
||
|
||
class TestWildfireRiskETL(TestETL): | ||
_ETL_CLASS = WildfireRiskETL | ||
|
||
_SAMPLE_DATA_PATH = pathlib.Path(__file__).parents[0] / "data" | ||
_SAMPLE_DATA_FILE_NAME = "fsf_fire/fire-tract2010.csv" | ||
_SAMPLE_DATA_ZIP_FILE_NAME = "fsf_fire.zip" | ||
_EXTRACT_TMP_FOLDER_NAME = "WildfireRiskETL" | ||
|
||
def setup_method(self, _method, filename=__file__): | ||
"""Invoke `setup_method` from Parent, but using the current file name. | ||
This code can be copied identically between all child classes. | ||
""" | ||
super().setup_method(_method=_method, filename=filename) |