Skip to content

Commit

Permalink
Add flood risk tests (#1848)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbowen-usds committed Sep 14, 2022
1 parent fc957aa commit eea77c2
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 0 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
GEOID,count_properties,mid_depth_100_year00,mid_depth_100_year30
6027000800,942,214,215
6069000802,1131,283,292
6061021322,1483,100,108
15001021010,1888,179,186
15001021101,3463,130,137
15007040603,1557,152,181
15007040700,1533,177,191
15009030100,1658,232,242
15009030201,6144,431,447
15001021402,4118,321,329
15001021800,2813,350,356
15009030402,3374,852,888
15009030800,4847,1003,1019
15003010201,2335,220,227
15007040604,5364,630,641
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
GEOID10_TRACT,Count of properties eligible for flood risk calculation within tract (floor of 250),Count of properties at risk of flood today,Count of properties at risk of flood in 30 years,Share of properties at risk of flood today,Share of properties at risk of flood in 30 years
06027000800,942,214,215,0.2271762208,0.2282377919
06069000802,1131,283,292,0.2502210433,0.2581786030
06061021322,1483,100,108,0.0674308833,0.0728253540
15001021010,1888,179,186,0.0948093220,0.0985169492
15001021101,3463,130,137,0.0375397055,0.0395610742
15007040603,1557,152,181,0.0976236352,0.1162491972
15007040700,1533,177,191,0.1154598826,0.1245923027
15009030100,1658,232,242,0.1399276236,0.1459589867
15009030201,6144,431,447,0.0701497396,0.0727539062
15001021402,4118,321,329,0.0779504614,0.0798931520
15001021800,2813,350,356,0.1244223249,0.1265552791
15009030402,3374,852,888,0.2525192650,0.2631890931
15009030800,4847,1003,1019,0.2069321230,0.2102331339
15003010201,2335,220,227,0.0942184154,0.0972162741
15007040604,5364,630,641,0.1174496644,0.1195003729
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
GEOID,count_properties,Count of properties at risk of flood today,Count of properties at risk of flood in 30 years,GEOID10_TRACT,Count of properties eligible for flood risk calculation within tract (floor of 250),Share of properties at risk of flood today,Share of properties at risk of flood in 30 years
06027000800,942,214,215,06027000800,942,0.2271762208,0.2282377919
06069000802,1131,283,292,06069000802,1131,0.2502210433,0.2581786030
06061021322,1483,100,108,06061021322,1483,0.0674308833,0.0728253540
15001021010,1888,179,186,15001021010,1888,0.0948093220,0.0985169492
15001021101,3463,130,137,15001021101,3463,0.0375397055,0.0395610742
15007040603,1557,152,181,15007040603,1557,0.0976236352,0.1162491972
15007040700,1533,177,191,15007040700,1533,0.1154598826,0.1245923027
15009030100,1658,232,242,15009030100,1658,0.1399276236,0.1459589867
15009030201,6144,431,447,15009030201,6144,0.0701497396,0.0727539062
15001021402,4118,321,329,15001021402,4118,0.0779504614,0.0798931520
15001021800,2813,350,356,15001021800,2813,0.1244223249,0.1265552791
15009030402,3374,852,888,15009030402,3374,0.2525192650,0.2631890931
15009030800,4847,1003,1019,15009030800,4847,0.2069321230,0.2102331339
15003010201,2335,220,227,15003010201,2335,0.0942184154,0.0972162741
15007040604,5364,630,641,15007040604,5364,0.1174496644,0.1195003729
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_flood_risk.etl import FloodRiskETL


class TestFloodRiskETL(TestETL):
_ETL_CLASS = FloodRiskETL

_SAMPLE_DATA_PATH = pathlib.Path(__file__).parents[0] / "data"
_SAMPLE_DATA_FILE_NAME = "fsf_flood/flood-tract2010.csv"
_SAMPLE_DATA_ZIP_FILE_NAME = "fsf_flood.zip"
_EXTRACT_TMP_FOLDER_NAME = "FloodRiskETL"

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)

0 comments on commit eea77c2

Please sign in to comment.