diff --git a/Shapefiles/45019/2021/tl_2021_45019_faces.cpg b/Shapefiles/45019/2021/tl_2021_45019_faces.cpg deleted file mode 100644 index 3ad133c0..00000000 --- a/Shapefiles/45019/2021/tl_2021_45019_faces.cpg +++ /dev/null @@ -1 +0,0 @@ -UTF-8 \ No newline at end of file diff --git a/Shapefiles/45019/2021/tl_2021_45019_faces.dbf b/Shapefiles/45019/2021/tl_2021_45019_faces.dbf deleted file mode 100644 index ea0a2ac5..00000000 Binary files a/Shapefiles/45019/2021/tl_2021_45019_faces.dbf and /dev/null differ diff --git a/Shapefiles/45019/2021/tl_2021_45019_faces.prj b/Shapefiles/45019/2021/tl_2021_45019_faces.prj deleted file mode 100644 index 747df588..00000000 --- a/Shapefiles/45019/2021/tl_2021_45019_faces.prj +++ /dev/null @@ -1 +0,0 @@ -GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/Shapefiles/45019/2021/tl_2021_45019_faces.shp b/Shapefiles/45019/2021/tl_2021_45019_faces.shp deleted file mode 100644 index e1be8045..00000000 Binary files a/Shapefiles/45019/2021/tl_2021_45019_faces.shp and /dev/null differ diff --git a/Shapefiles/45019/2021/tl_2021_45019_faces.shp.ea.iso.xml b/Shapefiles/45019/2021/tl_2021_45019_faces.shp.ea.iso.xml deleted file mode 100644 index f46eaf03..00000000 --- a/Shapefiles/45019/2021/tl_2021_45019_faces.shp.ea.iso.xml +++ /dev/null @@ -1,1567 +0,0 @@ - - - - - - - - - - 2021 - - - 20210523 - - - eng - - - UTF-8 - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Spatial Data Collection and Products Branch - - - - - - - 301-763-1128 - - - 301-763-4710 - - - - - - - 4600 Silver Hill Road, Stop 7400 - - - Washington - - - DC - - - 20233-7400 - - - United States - - - geo.geography@census.gov - - - - - - - custodian - - - - - - - - FACES.shp - - - Topological Faces (Polygons With all Geocodes) County-based shapefile - - - - false - - - - - - TFID - - - Permanent face ID - - - - - - - 1 - - - 999999999 - - - - - - - - - - - - STATEFP20 - - - 2020 Census state Federal Information Processing Series (FIPS) codes - - - - - - - - National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) – States/State Equivalents - - - - - - - - - - - COUNTYFP20 - - - 2020 Census county Federal Information Processing Series (FIPS) code - - - - - - - - National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents - - - - - - - - - - - TRACTCE20 - - - 2020 Census census tract code - - - - - - - 990000 to 990099 - - - Census tract number - - - - - - - - 990000 to 990099 - - - Water tract (2010 and continuing) - - - - - - - - 990100 to 998999 - - - Census tract number - - - - - - - - - - BLKGRPCE20 - - - - 2020 Census block group number. A block group number of 0 represents a water block group. - - - - - - - - 0 - - - 9 - - - - - - - - - - - - BLOCKCE20 - - - 2020 Census tabulation block number - - - - - - - 0001 - - - 9999 - - - - - - - - - - - - SUFFIX1CE - - - Current census block suffix 1 - - - - - - - A - - - Z - - - - - - - - - - - - ZCTA5CE20 - - - 2020 Census 5-digit ZIP Code Tabulation Area code - - - - - - - 00601 - - - 99929 - - - - - - - - - - - - UACE10 - - - 2010 Census urban area code - - - - - - - 00001 - - - 98999 - - - - - - - - - - - - PUMACE10 - - - 2010 Census public use microdata area code - - - - - - - 00100 - - - 99995 - - - - - - - - - - - - STATEFP - - - Current state Federal Information Processing Series (FIPS) code - - - - - - - - National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing - Series (FIPS) - States/State Equivalents - - - - - - - - - - - COUNTYFP - - - Current county Federal Information Processing Series (FIPS) code - - - - - - - - National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing - Series (FIPS) - Counties/County Equivalents - - - - - - - - - - - TRACTCE - - - Current census tract code - - - - - - - 000100 to 989999 - - - Census tract number - - - - - - - - 990000 to 990099 - - - Water tract - - - - - - - - 990100 to 998999 - - - Census tract number - - - - - - - - - - BLKGRPCE - - - - Current block group number. A block group number of 0 represents a water block group. - - - - - - - - 0 - - - 9 - - - - - - - - - - - - COUSUBFP - - - Current county subdivision Federal Information Processing Series (FIPS) code - - - - - - - - - Federal Information Processing Series Census Codes for Named Populated Places, - Primary County Divisions, and other Locational Entities of the United States, - Puerto Rico, and the Island Areas (Formerly FIPS 55-3) - - - - - - - - - - - SUBMCDFP - - - Current subminor civil division Federal Information Processing Series (FIPS) code - - - - - - - - 00001 - - - 89999 - - - - - - - - - - - - ESTATEFP - - - Current estate Federal Information Processing Series (FIPS) code - - - - - - - 00001 - - - 89999 - - - - - - - - - - - - CONCTYFP - - - Current consolidated city Federal Information Processing Series (FIPS) code - - - - - - - - - Federal Information Processing Series Census Codes for Named Populated Places, - Primary County Divisions, and other Locational Entities of the United States, - Puerto Rico, and the Island Areas (Formerly FIPS 55-3) - - - - - - - - - - - PLACEFP - - - Current place Federal Information Processing Series (FIPS) code - - - - - - - - Federal Information Processing Series Census Codes for Named Populated Places, - Primary County Divisions, and other Locational Entities of the United States, - Puerto Rico, and the Island Areas (Formerly FIPS 55-3) - - - - - - - - - - - AIANNHFP - - - Current American Indian/Alaska Native/Native Hawaiian area FIPS code - - - - - - - - - Federal Information Processing Series Census Codes for Named Populated Places, - Primary County Divisions, and other Locational Entities of the United States, - Puerto Rico, and the Island Areas (Formerly FIPS 55-3) - - - - - - - - - - - AIANNHCE - - - Current American Indian/Alaska Native/Native Hawaiian area census code - - - - - - - - 0001 to 4799 - - - Federally recognized legal American Indian area - - - - - - - - - 4800 to 4989 - - - American Indian Joint-Use Area - - - - - - - - 5000 to 5499 - - - Hawaiian Home Land - - - - - - - - 5500 to 5899 - - - Oklahoma Tribal Statistical Area - - - - - - - - 5900 to 5999 - - - Joint-Use Oklahoma Tribal Statistical Area - - - - - - - - - 6000 to 7999 - - - Alaska Native Village Statistical Area - - - - - - - - - 8000 to 8999 - - - Tribal Designated Statistical Area - - - - - - - - 9000 to 9499 - - - State recognized legal American Indian area - - - - - - - - - 9500 to 9998 - - - State Designated Tribal Statistical Area - - - - - - - - - - - COMPTYP - - - - Current American Indian/Alaska Native/Native Hawaiian area reservation/statistical - area or off-reservation trust land Hawaiian home land indicator - - - - - - - - R - - - Reservation or statistical area - - - - - - - - T - - - Off-reservation trust land - - - - - - - - - - TRSUBFP - - - Current American Indian tribal subdivision FIPS code - - - - - - - - Federal Information Processing Series Census Codes for Named Populated Places, - Primary County Divisions, and other Locational Entities of the United States, - Puerto Rico, and the Island Areas (Formerly FIPS 55-3) - - - - - - - - - - - TRSUBCE - - - - Current American Indian tribal subdivision code. A code of 999 represents the balance - of AIAN with at least one tribal subdivision that is not in a tribal subdivision. - - - - - - - - 001 - - - 999 - - - - - - - - - - - - ANRCFP - - - - Current Alaska Native Regional Corporation Federal Information Processing Series (FIPS) - code - - - - - - - - - Federal Information Processing Series Census Codes for Named Populated Places, - Primary County Divisions, and other Locational Entities of the United States, - Puerto Rico, and the Island Areas (Formerly FIPS 55-3) - - - - - - - - - - - TTRACTCE - - - Current tribal census tract code - - - - - - - T00000 - - - T98999 - - - - - - - - - - - - TBLKGPCE - - - Current tribal block group letter - - - - - - - J - - - Tribal block group letter - - - - - - - - K - - - Tirbal block group letter - - - - - - - - A to H - - - Tribal block group letter - - - - - - - - - - ELSDLEA - - - Current elementary school district local education agency code - - - - - - - 00001 - - - 99996 - - - - - - - - - - - - - local school district - - - - - - - - - - - - - - SCSDLEA - - - Current secondary school district local education agency code - - - - - - - 00001 - - - 99996 - - - - - - - - - - - - - local school district - - - - - - - - - - - - - - UNSDLEA - - - - Current unified school district local education agency code. A code of 99997 represents - a school district that has not been defined. - - - - - - - - 00001 - - - 99997 - - - - - - - - - - - - - local school district - - - - - - - - - - - - - - CD116FP - - - 116th congressional district code - - - - - - - 00 - - - At Large Representation - - - - - - - - 98 - - - Non-Voting Delegate - - - - - - - - 01 to 53 - - - Congressional District (in states with more than one district) - - - - - - - - - ZZ - - - Congressional District Not Defined - - - - - - - - - - SLDUST - - - Current state legislative district (upper chamber) code - - - - - - - - - Any ASCII alphabetic or numeric character combination plus hyphens from one to three - characters. A code of ZZZ refers to a State legislative district (upper chamber) - not defined. - - - - - - - - - - SLDLST - - - Current state legislative district (lower chamber) code - - - - - - - - - Any ASCII alphabetic or numeric character combination plus hyphens from one to three - characters. A code of ZZZ refers to a State legislative district (upper chamber) - not defined. - - - - - - - - - - CSAFP - - - Current combined statistical area code - - - - - - - 100 - - - 599 - - - - - - - - - - - - CBSAFP - - - Current metropolitan statistical area/micropolitan statistical area code - - - - - - - - 10000 - - - 49999 - - - - - - - - - - - - METDIVFP - - - Current metropolitan division code - - - - - - - 10004 - - - 49994 - - - - - - - - - - - - CNECTAFP - - - Current combined New England city and town area code - - - - - - - 700 - - - 799 - - - - - - - - - - - - NECTAFP - - - Current New England city and town area code - - - - - - - 70000 - - - 79999 - - - - - - - - - - - - NCTADVFP - - - Current New England city and town area division code - - - - - - - 70004 - - - 79994 - - - - - - - - - - - - LWFLAG - - - land/water flag - - - - - - - G - - - Glacier - - - - - - - - I - - - Intermittent Water - - - - - - - - L - - - Land - - - - - - - - P - - - Perennial Water - - - - - - - - S - - - Marsh/Swamp - - - - - - - - - - OFFSET - - - Geographic corridor/offset flag - - - - - - - N - - - Not in a Geographic Corridor/Offset - - - - - - - - Y - - - This polygon is in a Geographic Corridor/Offset. - - - - - - - - - - - ATOTAL - - - Total Area - - - - - - - 0 - - - 9999999 - - - - - - - - - - - - INTPTLAT - - - Latitude of the internal point - - - - - - - -90.000000 - - - 90.000000 - - - - - - - - - - - - INTPTLON - - - Longitude of the internal point - - - - - - - -180.000000 - - - 180.000000 - - - - - - - - - - - \ No newline at end of file diff --git a/Shapefiles/45019/2021/tl_2021_45019_faces.shp.iso.xml b/Shapefiles/45019/2021/tl_2021_45019_faces.shp.iso.xml deleted file mode 100644 index 6fc3b46d..00000000 --- a/Shapefiles/45019/2021/tl_2021_45019_faces.shp.iso.xml +++ /dev/null @@ -1,640 +0,0 @@ - - - - .shp.iso.xml - - - eng - - - UTF-8 - - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Spatial Data Collection and Products Branch - - - - - - - 301-763-1128 - - - 301-763-4710 - - - - - - - 4600 Silver Hill Road, Stop 7400 - - - Washington - - - DC - - - 20233-7400 - - - United States - - - geo.geography@census.gov - - - - - - - custodian - - - - - - 20210523 - - - ISO 19115 Geographic Information - Metadata - - - 2009-02-15 - - - http://www2.census.gov/geo/tiger/TIGER2021/FACES/tl_2021_45019_faces.zip - - - - - - - complex - - - 23290 - - - - - - - - - - - Federal Information Processing Series (FIPS), Geographic Names Information System (GNIS), and feature names. - - - http://www.census.gov/geo/reference/geocodes.html - - - - - - - - - - - TIGER/Line Shapefile, 2021, county, Charleston County, SC, Topological Faces (Polygons With All Geocodes) County-based Shapefile - - - - 2021 - - - publication - - - - - - 2021 - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Spatial Data Collection and Products Branch - - - - - - - 301-763-1128 - - - 301-763-4710 - - - - - - - 4600 Silver Hill Road, Stop 7400 - - - Washington - - - DC - - - 20233-7400 - - - United States - - - geo.geography@census.gov - - - - - - - custodian - - - - - - - - - - - The TIGER/Line shapefiles and related database files (.dbf) are an extract of selected geographic and cartographic information from the U.S. Census Bureau's Master Address File / Topologically Integrated Geographic Encoding and Referencing (MAF/TIGER) Database (MTDB). The MTDB represents a seamless national file with no overlaps or gaps between parts, however, each TIGER/Line shapefile is designed to stand alone as an independent data set, or they can be combined to cover the entire nation. - -Face refers to the areal (polygon) topological primitives that make up MTDB. A face is bounded by one or more edges; its boundary includes only the edges that separate it from other faces, not any interior edges contained within the area of the face. The Topological Faces Shapefile contains the attributes of each topological primitive face. Each face has a unique topological face identifier (TFID) value. Each face in the shapefile includes the key geographic area codes for all geographic areas for which the Census Bureau tabulates data for both the 2020 Census and the annual estimates and surveys. The geometries of each of these geographic areas can then be built by dissolving the face geometries on the appropriate key geographic area codes in the Topological Faces Shapefile. - - - In order for others to use the information in the Census MAF/TIGER database in a geographic information system (GIS) or for othergeographic applications, the Census Bureau releases to the public extracts of the database in the form of TIGER/Line Shapefiles. - - - - - - - - - - - - County or equivalent entity - - - Table - - - Topological Faces - - - State FIPS Code - - - County FIPS Code - - - Census Tract Number - - - Block Group - - - Number - - - Tabulation Block Number - - - County Subdivision FIPS Code - - - SubMinor Civil Division FIPS Code in Puerto Rico - - - FIPS Place Code For All Places - - - Consolidated City FIPS Code - - - Urban Area Code - - - 115th congressional district Code - - - 5 digit ZIP Code Tabulation Area Code - - - State Legislative District Upper Chamber Code - - - State Legislative District Lower Chamber Code - - - Legislative Session Year - - - Urban Growth Area Code - - - American Indian/Alaska Native/Native Hawaiian Areas Census Code - - - Rreservation or Off-reservation Trust Land Indicator - - - Alaska Native Regional Corporation FIPS code - - - Tribal Subdivision Code - - - Metropolitan Statistical Area/Consolidated Metropolitan Statistical Area FIPS Code - - - Primary Metropolitan Statistical Area FIPS Code - - - New England County Metropolitan Area FIPS Code - - - Elementary School District Local Education Agency Code - - - Secondary School District Local Education Agency Code - - - Unified School District Local Education Agency Code - - - Public Use Microdata Area CodeLand/water Flag - - - - - - - - None - - - - - - - - - - United States - - - U.S. - - - County or Equivalent Entity - - - Charleston - - - 45019 - - - - - - - - ANSI INCITS 38:2009 (Formerly FIPS 5-2), - ANSI INCITS 31:2009 (Formerly FIPS 6-4),ANSI INCITS 454:2009 - (Formerly FIPS 8-6), ANSI INCITS 455:2009(Formerly FIPS 9-1), ANSI INCITS 446:2008 (Geographic Names Information System - (GNIS)) - - - - - - - - - - - - - - - - The TIGER/Line Shapefile products are not copyrighted however TIGER/Line and Census TIGER are registered trademarks of the U.S. Census Bureau. These products are free to use in a product or publication, however acknowledgement must be given to the U.S. Census Bureau as the source. -These products are free to use in a product or publication, however acknowledgement must be given to the U.S. Census Bureau as the source. -The boundaries in the TIGER/Line Shapefiles are for statistical data collection and tabulation purposes only, their depiction and designation for statistical purposes does not constitute a determination of jurisdictional authority or rights of ownership or entitlement and they are not legal land descriptions. Coordinates in the TIGER/Line shapefiles have six implied decimal places, but the positional accuracy of these coordinates is not as great as the six decimal places suggest. - - - - - - - - eng - - - UTF-8 - - - boundaries - - - The TIGER/Line shapefiles contain geographic data only and do not include display mapping software or statistical data. For information on how to use the TIGER/Line shapefile data with specific software package users shall contact the company that produced the software. - - - - - - - -80.45363 - - - -79.26183 - - - 32.482565 - - - 33.215136 - - - - - - - - - - - - - - - - true - - - - - - - - - - - - TGRSHP (compressed) - - - - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, - Geography Division, Spatial Data Collection and Products Branch - - - - - - - - 301-763-1128 - - - 301-763-4710 - - - - - - - 4600 Silver Hill Road, Stop 7400 - - - Washington - - - DC - - - 20233-7400 - - - United States - - - geo.geography@census.gov - - - - - - - custodian - - - - - - - - The online copy of the TIGER/Line Shapefiles may be accessed without charge. - - - To obtain more information about ordering TIGER/Line Shapefiles visit https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html - - - - - - - - - - - http://www2.census.gov/geo/tiger/TIGER2021/FACES/tl_2021_45019_faces.zip - - - http - - - download!!! - - - - - - - - - - - - - - - - - - - - - Non_Quantitative_Attribute_Accuracy_Report: National Standard Codes, Federal Information Processing (FIPS) and the Geographic Names Information System (GNIS) TIGER/Line Shapefile Test - - - Non_Quantitative_Attribute_Accuracy_Report: Tested against National Standard Codes, Federal Information Processing (FIPS) and the Geographic Names Information System (GNIS) - - - - - - Non_Quantitative_Attribute_Accuracy_Report: 100% accurate for the codes and base names. - - - - - - - - - - Logical Consistency: TIGER/Line Shapefile topological consistency test - - - The Census Bureau performed automated tests to ensure logical consistency and limits of shapefiles. Segments making up the outer and inner boundaries of a polygon tie end-to-end to completely enclose the area. All polygons are tested for closure. - -The Census Bureau uses its internally developed geographic update system to enhance and modify spatial and attribute data in the Census MAF/TIGER database. Standard geographic codes, such as FIPS codes for states, counties, municipalities, county subdivisions, places, American Indian/Alaska Native/Native Hawaiian areas, and congressional districts are used when encoding spatial entities. The Census Bureau performed spatial data tests for logical consistency of the codes during the compilation of the original Census MAF/TIGER database files. Most of the codes for geographic entities except states, counties, urban areas, Core Based Statistical Areas (CBSAs), American Indian Areas (AIAs), and congressional districts were provided to the Census Bureau by the USGS, the agency responsible for maintaining the Geographic Names Information System (GNIS). Feature attribute information has been examined but has not been fully tested for consistency. - - - - - - For the TIGER/Line Shapefiles, the Point and Vector Object Count for the G-polygon SDTS Point and Vector Object Type reflects the number of records in the shapefile attribute table. For multi-polygon features, only one attribute record exists for each multi-polygon rather than one attribute record per individual G-polygon component of the multi-polygon feature. TIGER/Line Shapefile multi-polygons are an exception to the G-polygon object type classification. Therefore, when multi-polygons exist in a shapefile, the object count will be less than the actual number of G-polygons. - - - - - - - - - - - - TIGER/Line Shapefiles are extracted from the Census MAF/TIGER database by nation, state, county, and entity. Census MAF/TIGER data for all of the aforementioned geographic entities are then distributed among the shapefiles each containing attributes for line, polygon, or landmark geographic data. 2021 - - - - - - - All line segments - - - - - Census MAF/TIGER database - - - MAF/TIGER - - - - - Unpublished material - - - publication date - - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, - Geography Division - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This was transformed from the Census Geospatial Product Metadata Content Standard. - - - - \ No newline at end of file diff --git a/Shapefiles/45019/2021/tl_2021_45019_faces.shx b/Shapefiles/45019/2021/tl_2021_45019_faces.shx deleted file mode 100644 index 77978e47..00000000 Binary files a/Shapefiles/45019/2021/tl_2021_45019_faces.shx and /dev/null differ diff --git a/hydromt_fiat/data/vulnerability_linking/JRC_damage_functions_linking.csv b/hydromt_fiat/data/vulnerability_linking/JRC_damage_functions_linking.csv index 6f711297..76b2fe31 100644 --- a/hydromt_fiat/data/vulnerability_linking/JRC_damage_functions_linking.csv +++ b/hydromt_fiat/data/vulnerability_linking/JRC_damage_functions_linking.csv @@ -2,3 +2,9 @@ FIAT Damage Function Name,Exposure Link,Damage Type,type residential,residential,total,residential commercial,commercial,total,commercial industrial,industrial,total,industrial +residential,residential,structure,residential +commercial,commercial,structure,commercial +industrial,industrial,structure,industrial +residential,residential,content,residential +commercial,commercial,content,commercial +industrial,industrial,content,industrial diff --git a/hydromt_fiat/workflows/exposure_vector.py b/hydromt_fiat/workflows/exposure_vector.py index 080acdba..4d65edda 100644 --- a/hydromt_fiat/workflows/exposure_vector.py +++ b/hydromt_fiat/workflows/exposure_vector.py @@ -550,11 +550,37 @@ def setup_ground_floor_height( def setup_max_potential_damage( self, max_potential_damage: Union[int, float, str, Path, List[str], List[Path], pd.DataFrame]=None, + damage_types: Union[List[str], str, None] = None, + country: Union[str, None] = None, target_attribute: Union[str, List[str], None] = None, attr_name: Union[str, List[str], None] = None, method: Union[str, List[str], None] = "nearest", max_dist: float = 10, ) -> None: + """Setup the max potential damage column of the exposure data in various ways. + + Parameters + ---------- + max_potential_damage : Union[int, float, str, Path, List[str], List[Path], pd.DataFrame], optional + _description_, by default None + damage_types : Union[List[str], str, None], optional + _description_, by default None + country : Union[str, None], optional + _description_, by default None + target_attribute : Union[str, List[str], None], optional + _description_, by default None + attr_name : Union[str, List[str], None], optional + _description_, by default None + method : Union[str, List[str], None], optional + _description_, by default "nearest" + max_dist : float, optional + _description_, by default 10 + """ + if damage_types is None: + damage_types = ["total"] + + if isinstance(damage_types, str): + damage_types = [damage_types] if isinstance(max_potential_damage, pd.DataFrame ): @@ -563,25 +589,62 @@ def setup_max_potential_damage( ) elif isinstance(max_potential_damage, int) or isinstance( max_potential_damage, float - ): - # modify the column manually - #self.exposure_db[target_attribute] = max_potential_damage - NotImplemented + ): + # Set the column(s) to a single value + for damage_type in damage_types: + self.exposure_db[f"Max Potential Damage: {damage_type}"] = max_potential_damage + + elif isinstance(max_potential_damage, list): + # Multiple files are used to assign the ground floor height to the assets + NotImplemented + elif max_potential_damage in ["jrc_damage_values", "hazus_max_potential_damages"]: + if max_potential_damage == "jrc_damage_values": + damage_source = self.data_catalog.get_dataframe(max_potential_damage) + if country is None: + country = "World" + self.logger.warning( + f"No country specified, using the '{country}' JRC damage values." + ) + + damage_values = preprocess_jrc_damage_values(damage_source, country) + elif max_potential_damage == "hazus_max_potential_damages": + damage_source = self.data_catalog.get_dataframe(max_potential_damage) + damage_values = preprocess_hazus_damage_values(damage_source) + + # Calculate the area of each object + gdf = self.get_full_gdf(self.exposure_db)[["Primary Object Type", "geometry"]] + gdf = get_area(gdf) + + # Set the damage values to the exposure data + for damage_type in damage_types: + # Calculate the maximum potential damage for each object and per damage type + try: + self.exposure_db[ + f"Max Potential Damage: {damage_type.capitalize()}" + ] = [ + damage_values[building_type][damage_type.lower()] * square_meters + for building_type, square_meters in zip( + gdf["Primary Object Type"], gdf["area"] + ) + ] + except KeyError as e: + self.logger.warning( + f"Not found in the {max_potential_damage} damage " + f"value data: {e}" + ) elif isinstance(max_potential_damage, str) or isinstance( max_potential_damage, Path ): - # A single file is used to assign the ground floor height to the assets + # When the max_potential_damage is a string but not jrc_damage_values + # or hazus_max_potential_damages. Here, a single file is used to + # assign the ground floor height to the assets gfh = self.data_catalog.get_geodataframe(max_potential_damage) gdf = self.get_full_gdf(self.exposure_db) gdf = join_spatial_data(gdf, gfh, attr_name, method, max_dist, self.logger) self.exposure_db = self._set_values_from_other_column( gdf, target_attribute, attr_name ) - elif isinstance(max_potential_damage, list): - # Multiple files are used to assign the ground floor height to the assets - NotImplemented - def setup_ground_elevation( self, @@ -861,7 +924,7 @@ def setup_new_composite_areas( percent_growth = float(percent_growth) / 100 geom_file = Path(geom_file) - assert geom_file.is_file() f"File {str(geom_file)} is missing, cannot set up a new composite area." + assert geom_file.is_file(), f"File {str(geom_file)} is missing, cannot set up a new composite area." # Calculate the total damages for the new object, for the indicated damage types new_object_damages = self.calculate_damages_new_exposure_object( diff --git a/tests/data/correct/test_hazus_vulnerability_curves.csv b/tests/data/correct/test_hazus_vulnerability_curves.csv index 6dcbb006..b7baee0f 100644 --- a/tests/data/correct/test_hazus_vulnerability_curves.csv +++ b/tests/data/correct/test_hazus_vulnerability_curves.csv @@ -1,37 +1,37 @@ #UNIT=feet -#METHOD,max,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean -water depth [feet],AGR1,COM1,COM10,COM2,COM3,COM4,COM5,COM6,COM7,COM8,COM9,EDU1,EDU2,GOV1,GOV2,IND1,IND2,IND3,IND4,IND5,IND6,REL1,RES1-1SNB,RES1-1SWB,RES1-2SNB,RES1-2SWB,RES1-3SNB,RES1-3SWB,RES2,RES3A,RES3B,RES3C,RES3D,RES3E,RES3F,RES4,RES5,RES6 --9.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 --8.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 --7.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.008,0.0,0.01,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 --6.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.021,0.0,0.023,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 --5.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0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,0.217,0.217,0.161,0.15,0.38 -2.0,0.43,0.42,0.17,0.27,0.289,0.3,0.74,0.27,0.51,0.55,0.06,0.304,0.38,0.59,0.2,0.24,0.31,0.41,0.26,0.41,0.35,0.484,0.179,0.218,0.122,0.157,0.15,0.22,0.49,0.304,0.304,0.304,0.304,0.304,0.304,0.263,0.25,0.6 -3.0,0.58,0.56,0.2,0.36,0.409,0.4,0.83,0.37,0.6,0.64,0.08,0.39,0.53,0.74,0.38,0.34,0.423,0.51,0.31,0.51,0.47,0.6,0.22,0.247,0.155,0.177,0.19,0.25,0.64,0.39,0.39,0.39,0.39,0.39,0.39,0.341,0.4,0.73 -4.0,0.65,0.68,0.23,0.49,0.577,0.575,1.0,0.534,0.63,0.73,0.09,0.45,0.64,0.83,0.55,0.41,0.523,0.62,0.37,0.62,0.56,0.693,0.257,0.274,0.185,0.198,0.23,0.29,0.7,0.45,0.45,0.45,0.45,0.45,0.45,0.397,0.5,0.81 -5.0,0.66,0.78,0.25,0.57,0.633,0.7,1.0,0.7,0.67,0.77,0.1,0.479,0.68,0.9,0.7,0.47,0.607,0.67,0.4,0.67,0.59,0.764,0.288,0.3,0.213,0.22,0.26,0.31,0.76,0.479,0.479,0.479,0.479,0.479,0.479,0.487,0.58,0.88 -6.0,0.66,0.83,0.29,0.63,0.707,0.8,1.0,0.791,0.71,0.8,0.12,0.519,0.7,1.0,0.81,0.52,0.72,0.71,0.44,0.71,0.66,0.814,0.315,0.324,0.239,0.243,0.29,0.34,0.78,0.519,0.519,0.519,0.519,0.519,0.519,0.524,0.65,0.94 -7.0,0.67,0.85,0.35,0.69,0.793,0.838,1.0,0.856,0.72,0.82,0.17,0.557,0.72,1.0,0.89,0.57,0.821,0.73,0.48,0.73,0.69,0.884,0.338,0.345,0.263,0.267,0.32,0.36,0.79,0.557,0.557,0.557,0.557,0.557,0.557,0.584,0.78,1.0 -8.0,0.7,0.87,0.42,0.72,0.843,1.0,1.0,0.925,0.74,0.83,0.22,0.593,0.75,1.0,0.98,0.6,0.907,0.76,0.53,0.76,0.71,0.943,0.357,0.363,0.284,0.291,0.35,0.39,0.81,0.593,0.593,0.593,0.593,0.593,0.593,0.613,0.9,1.0 -9.0,0.75,0.88,0.51,0.76,0.871,1.0,1.0,0.956,0.77,0.85,0.3,0.606,0.79,1.0,1.0,0.63,0.943,0.78,0.56,0.78,0.72,0.971,0.372,0.377,0.303,0.317,0.41,0.44,0.83,0.606,0.606,0.606,0.606,0.606,0.606,0.631,0.9,1.0 -10.0,0.76,0.89,0.63,0.8,0.871,1.0,1.0,0.963,0.81,0.87,0.41,0.634,0.83,1.0,1.0,0.64,0.95,0.79,0.57,0.79,0.78,0.971,0.384,0.386,0.32,0.344,0.43,0.46,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -11.0,0.76,0.9,0.77,0.82,0.871,1.0,1.0,0.963,0.86,0.89,0.57,0.634,0.88,1.0,1.0,0.66,0.95,0.82,0.6,0.82,0.79,0.971,0.392,0.391,0.334,0.372,0.45,0.47,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -12.0,0.76,0.91,0.93,0.84,0.871,1.0,1.0,0.963,0.92,0.9,0.66,0.634,0.94,1.0,1.0,0.68,0.95,0.83,0.62,0.83,0.8,0.971,0.397,0.391,0.347,0.4,0.48,0.5,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -13.0,0.77,0.92,1.0,0.86,0.871,1.0,1.0,0.963,0.94,0.91,0.73,0.634,1.0,1.0,1.0,0.69,0.95,0.84,0.63,0.84,0.8,0.971,0.4,0.391,0.356,0.43,0.5,0.52,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -14.0,0.77,0.92,1.0,0.87,0.871,1.0,1.0,0.963,0.97,0.92,0.79,0.634,1.0,1.0,1.0,0.72,0.95,0.86,0.63,0.86,0.81,0.971,0.4,0.391,0.364,0.461,0.52,0.53,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -15.0,0.77,0.92,1.0,0.87,0.871,1.0,1.0,0.963,0.99,0.93,0.84,0.634,1.0,1.0,1.0,0.73,0.95,0.87,0.63,0.87,0.81,0.971,0.4,0.391,0.369,0.493,0.54,0.55,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -16.0,0.78,0.93,1.0,0.88,0.871,1.0,1.0,0.963,1.0,0.94,0.9,0.634,1.0,1.0,1.0,0.73,0.95,0.87,0.64,0.87,0.81,0.971,0.4,0.391,0.372,0.526,0.56,0.57,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -17.0,0.78,0.93,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.95,0.97,0.634,1.0,1.0,1.0,0.73,0.95,0.88,0.65,0.88,0.82,0.971,0.4,0.391,0.372,0.526,0.58,0.58,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -18.0,0.78,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,0.98,0.634,1.0,1.0,1.0,0.74,0.95,0.88,0.65,0.88,0.82,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -19.0,0.79,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.74,0.95,0.88,0.65,0.88,0.82,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -20.0,0.79,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.74,0.95,0.88,0.65,0.88,0.83,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -21.0,0.79,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.74,0.95,0.88,0.65,0.88,0.83,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -22.0,0.79,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.75,0.95,0.88,0.65,0.88,0.83,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -23.0,0.8,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.75,0.95,0.88,0.65,0.88,0.83,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 -24.0,0.8,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.75,0.95,0.88,0.65,0.88,0.83,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +#METHOD,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean +water depth [feet],AGR1_structure,COM1_structure,COM10_structure,COM2_structure,COM3_structure,COM4_structure,COM5_structure,COM6_structure,COM7_structure,COM8_structure,COM9_structure,EDU1_structure,EDU2_structure,GOV1_structure,GOV2_structure,IND1_structure,IND2_structure,IND3_structure,IND4_structure,IND5_structure,IND6_structure,REL1_structure,RES1-1SNB_structure,RES1-1SWB_structure,RES1-2SNB_structure,RES1-2SWB_structure,RES1-3SNB_structure,RES1-3SWB_structure,RES2_structure,RES3A_structure,RES3B_structure,RES3C_structure,RES3D_structure,RES3E_structure,RES3F_structure,RES4_structure,RES5_structure,RES6_structure,AGR1_content,COM1_content,COM10_content,COM2_content,COM3_content,COM4_content,COM5_content,COM6_content,COM7_content,COM8_content,COM9_content,EDU1_content,EDU2_content,GOV1_content,GOV2_content,IND1_content,IND2_content,IND3_content,IND4_content,IND5_content,IND6_content,REL1_content,RES1-1SNB_content,RES1-1SWB_content,RES1-2SNB_content,RES1-2SWB_content,RES1-3SNB_content,RES1-3SWB_content,RES2_content,RES3A_content,RES3B_content,RES3C_content,RES3D_content,RES3E_content,RES3F_content,RES4_content,RES5_content,RES6_content +-9.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +-8.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.017,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +-7.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,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0.0,0.0,0.024,0.132,0.01,0.101,0.0,0.08,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +0.0,0.0,0.01,0.0,0.0,0.0,0.0,0.0,0.0,0.02,0.01,0.0,0.0,0.0,0.0,0.0,0.01,0.0,0.0,0.0,0.0,0.0,0.0,0.134,0.255,0.093,0.179,0.04,0.06,0.08,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.06,0.02,0.0,0.03,0.004,0.0,0.0,0.0,0.0,0.13,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.02,0.15,0.02,0.0,0.0,0.081,0.16,0.05,0.119,0.06,0.14,0.03,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +1.0,0.06,0.09,0.03,0.05,0.113,0.128,0.11,0.141,0.11,0.09,0.02,0.136,0.05,0.05,0.07,0.1,0.115,0.13,0.1,0.13,0.22,0.15,0.233,0.32,0.152,0.223,0.08,0.09,0.44,0.12,0.12,0.12,0.12,0.12,0.12,0.113,0.11,0.07,0.2,0.26,0.11,0.16,0.164,0.2,0.5,0.146,0.28,0.45,0.04,0.217,0.27,0.3,0.08,0.15,0.193,0.2,0.2,0.2,0.2,0.293,0.133,0.189,0.087,0.138,0.11,0.18,0.27,0.217,0.217,0.217,0.217,0.217,0.217,0.161,0.15,0.38 +2.0,0.11,0.14,0.05,0.08,0.175,0.184,0.11,0.242,0.12,0.11,0.04,0.24,0.07,0.08,0.1,0.12,0.179,0.14,0.14,0.14,0.31,0.25,0.321,0.387,0.209,0.27,0.12,0.15,0.63,0.2,0.2,0.2,0.2,0.2,0.2,0.175,0.17,0.1,0.43,0.42,0.17,0.27,0.289,0.3,0.74,0.27,0.51,0.55,0.06,0.304,0.38,0.59,0.2,0.24,0.31,0.41,0.26,0.41,0.35,0.484,0.179,0.218,0.122,0.157,0.15,0.22,0.49,0.304,0.304,0.304,0.304,0.304,0.304,0.263,0.25,0.6 +3.0,0.15,0.16,0.06,0.11,0.225,0.256,0.12,0.311,0.13,0.12,0.05,0.32,0.09,0.13,0.11,0.15,0.244,0.19,0.18,0.19,0.37,0.325,0.401,0.455,0.263,0.319,0.17,0.2,0.73,0.267,0.267,0.267,0.267,0.267,0.267,0.225,0.22,0.14,0.58,0.56,0.2,0.36,0.409,0.4,0.83,0.37,0.6,0.64,0.08,0.39,0.53,0.74,0.38,0.34,0.423,0.51,0.31,0.51,0.47,0.6,0.22,0.247,0.155,0.177,0.19,0.25,0.64,0.39,0.39,0.39,0.39,0.39,0.39,0.341,0.4,0.73 +4.0,0.19,0.18,0.07,0.13,0.25,0.256,0.13,0.422,0.14,0.14,0.05,0.35,0.09,0.14,0.12,0.19,0.265,0.22,0.22,0.22,0.43,0.4,0.471,0.522,0.314,0.369,0.19,0.26,0.78,0.283,0.283,0.283,0.283,0.283,0.283,0.25,0.26,0.15,0.65,0.68,0.23,0.49,0.577,0.575,1.0,0.534,0.63,0.73,0.09,0.45,0.64,0.83,0.55,0.41,0.523,0.62,0.37,0.62,0.56,0.693,0.257,0.274,0.185,0.198,0.23,0.29,0.7,0.45,0.45,0.45,0.45,0.45,0.45,0.397,0.5,0.81 +5.0,0.25,0.2,0.08,0.16,0.288,0.306,0.15,0.52,0.16,0.16,0.05,0.4,0.1,0.14,0.15,0.22,0.324,0.25,0.26,0.25,0.47,0.475,0.532,0.586,0.362,0.419,0.22,0.31,0.8,0.333,0.333,0.333,0.333,0.333,0.333,0.313,0.3,0.15,0.66,0.78,0.25,0.57,0.633,0.7,1.0,0.7,0.67,0.77,0.1,0.479,0.68,0.9,0.7,0.47,0.607,0.67,0.4,0.67,0.59,0.764,0.288,0.3,0.213,0.22,0.26,0.31,0.76,0.479,0.479,0.479,0.479,0.479,0.479,0.487,0.58,0.88 +6.0,0.3,0.23,0.1,0.19,0.363,0.367,0.17,0.633,0.17,0.18,0.06,0.42,0.11,0.15,0.17,0.26,0.388,0.28,0.34,0.28,0.5,0.55,0.586,0.645,0.407,0.469,0.24,0.33,0.81,0.367,0.367,0.367,0.367,0.367,0.367,0.35,0.35,0.16,0.66,0.83,0.29,0.63,0.707,0.8,1.0,0.791,0.71,0.8,0.12,0.519,0.7,1.0,0.81,0.52,0.72,0.71,0.44,0.71,0.66,0.814,0.315,0.324,0.239,0.243,0.29,0.34,0.78,0.519,0.519,0.519,0.519,0.519,0.519,0.524,0.65,0.94 +7.0,0.35,0.26,0.13,0.22,0.413,0.453,0.19,0.714,0.18,0.2,0.08,0.432,0.13,0.17,0.2,0.3,0.409,0.3,0.41,0.3,0.54,0.615,0.632,0.698,0.449,0.518,0.25,0.36,0.82,0.387,0.387,0.387,0.387,0.387,0.387,0.385,0.416,0.18,0.67,0.85,0.35,0.69,0.793,0.838,1.0,0.856,0.72,0.82,0.17,0.557,0.72,1.0,0.89,0.57,0.821,0.73,0.48,0.73,0.69,0.884,0.338,0.345,0.263,0.267,0.32,0.36,0.79,0.557,0.557,0.557,0.557,0.557,0.557,0.584,0.78,1.0 +8.0,0.41,0.3,0.17,0.25,0.485,0.568,0.22,0.77,0.2,0.22,0.1,0.52,0.15,0.19,0.23,0.35,0.518,0.33,0.42,0.33,0.57,0.675,0.672,0.742,0.488,0.564,0.3,0.39,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.438,0.488,0.2,0.7,0.87,0.42,0.72,0.843,1.0,1.0,0.925,0.74,0.83,0.22,0.593,0.75,1.0,0.98,0.6,0.907,0.76,0.53,0.76,0.71,0.943,0.357,0.363,0.284,0.291,0.35,0.39,0.81,0.593,0.593,0.593,0.593,0.593,0.593,0.613,0.9,1.0 +9.0,0.46,0.34,0.21,0.29,0.5,0.624,0.24,0.843,0.22,0.26,0.12,0.52,0.17,0.22,0.27,0.39,0.562,0.34,0.42,0.34,0.61,0.7,0.705,0.777,0.524,0.608,0.35,0.42,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.463,0.488,0.23,0.75,0.88,0.51,0.76,0.871,1.0,1.0,0.956,0.77,0.85,0.3,0.606,0.79,1.0,1.0,0.63,0.943,0.78,0.56,0.78,0.72,0.971,0.372,0.377,0.303,0.317,0.41,0.44,0.83,0.606,0.606,0.606,0.606,0.606,0.606,0.631,0.9,1.0 +10.0,0.51,0.38,0.25,0.32,0.525,0.624,0.28,0.843,0.24,0.29,0.15,0.52,0.2,0.26,0.31,0.42,0.562,0.36,0.45,0.36,0.63,0.7,0.732,0.801,0.557,0.648,0.38,0.45,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.26,0.76,0.89,0.63,0.8,0.871,1.0,1.0,0.963,0.81,0.87,0.41,0.634,0.83,1.0,1.0,0.64,0.95,0.79,0.57,0.79,0.78,0.971,0.384,0.386,0.32,0.344,0.43,0.46,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +11.0,0.57,0.42,0.3,0.37,0.525,0.624,0.31,0.843,0.27,0.33,0.2,0.52,0.24,0.31,0.35,0.48,0.562,0.39,0.47,0.39,0.64,0.7,0.754,0.811,0.587,0.684,0.4,0.46,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.3,0.76,0.9,0.77,0.82,0.871,1.0,1.0,0.963,0.86,0.89,0.57,0.634,0.88,1.0,1.0,0.66,0.95,0.82,0.6,0.82,0.79,0.971,0.392,0.391,0.334,0.372,0.45,0.47,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +12.0,0.63,0.47,0.35,0.41,0.525,0.624,0.34,0.843,0.3,0.37,0.24,0.52,0.28,0.37,0.4,0.5,0.562,0.4,0.49,0.4,0.65,0.7,0.772,0.811,0.614,0.714,0.42,0.47,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.34,0.76,0.91,0.93,0.84,0.871,1.0,1.0,0.963,0.92,0.9,0.66,0.634,0.94,1.0,1.0,0.68,0.95,0.83,0.62,0.83,0.8,0.971,0.397,0.391,0.347,0.4,0.48,0.5,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +13.0,0.7,0.51,0.41,0.45,0.525,0.624,0.37,0.843,0.34,0.41,0.29,0.52,0.33,0.44,0.44,0.51,0.562,0.42,0.5,0.42,0.67,0.7,0.785,0.811,0.638,0.737,0.44,0.48,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.38,0.77,0.92,1.0,0.86,0.871,1.0,1.0,0.963,0.94,0.91,0.73,0.634,1.0,1.0,1.0,0.69,0.95,0.84,0.63,0.84,0.8,0.971,0.4,0.391,0.356,0.43,0.5,0.52,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +14.0,0.75,0.55,0.47,0.49,0.525,0.624,0.4,0.843,0.37,0.45,0.35,0.52,0.39,0.51,0.48,0.53,0.562,0.42,0.5,0.42,0.68,0.7,0.795,0.811,0.659,0.754,0.46,0.49,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.42,0.77,0.92,1.0,0.87,0.871,1.0,1.0,0.963,0.97,0.92,0.79,0.634,1.0,1.0,1.0,0.72,0.95,0.86,0.63,0.86,0.81,0.971,0.4,0.391,0.364,0.461,0.52,0.53,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +15.0,0.79,0.58,0.52,0.52,0.525,0.624,0.44,0.843,0.41,0.5,0.42,0.52,0.45,0.59,0.52,0.54,0.562,0.43,0.5,0.43,0.69,0.7,0.802,0.811,0.677,0.764,0.48,0.5,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.47,0.77,0.92,1.0,0.87,0.871,1.0,1.0,0.963,0.99,0.93,0.84,0.634,1.0,1.0,1.0,0.73,0.95,0.87,0.63,0.87,0.81,0.971,0.4,0.391,0.369,0.493,0.54,0.55,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +16.0,0.82,0.61,0.58,0.55,0.525,0.624,0.48,0.843,0.44,0.53,0.49,0.52,0.52,0.65,0.56,0.55,0.562,0.43,0.5,0.43,0.7,0.7,0.807,0.811,0.692,0.764,0.5,0.51,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.52,0.78,0.93,1.0,0.88,0.871,1.0,1.0,0.963,1.0,0.94,0.9,0.634,1.0,1.0,1.0,0.73,0.95,0.87,0.64,0.87,0.81,0.971,0.4,0.391,0.372,0.526,0.56,0.57,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +17.0,0.84,0.64,0.65,0.58,0.525,0.624,0.51,0.843,0.48,0.57,0.56,0.52,0.59,0.7,0.6,0.55,0.562,0.44,0.5,0.44,0.71,0.7,0.807,0.811,0.692,0.764,0.52,0.52,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.57,0.78,0.93,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.95,0.97,0.634,1.0,1.0,1.0,0.73,0.95,0.88,0.65,0.88,0.82,0.971,0.4,0.391,0.372,0.526,0.58,0.58,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +18.0,0.87,0.67,0.71,0.61,0.525,0.624,0.55,0.843,0.51,0.6,0.62,0.52,0.64,0.74,0.64,0.56,0.562,0.44,0.5,0.44,0.72,0.7,0.807,0.811,0.692,0.764,0.54,0.53,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.62,0.78,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,0.98,0.634,1.0,1.0,1.0,0.74,0.95,0.88,0.65,0.88,0.82,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +19.0,0.89,0.69,0.76,0.63,0.525,0.624,0.59,0.843,0.54,0.63,0.68,0.52,0.69,0.79,0.68,0.56,0.562,0.44,0.5,0.44,0.73,0.7,0.807,0.811,0.692,0.764,0.56,0.54,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.67,0.79,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.74,0.95,0.88,0.65,0.88,0.82,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +20.0,0.9,0.71,0.81,0.66,0.525,0.624,0.63,0.843,0.56,0.66,0.74,0.52,0.74,0.83,0.72,0.57,0.562,0.44,0.5,0.44,0.74,0.7,0.807,0.811,0.692,0.764,0.58,0.55,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.72,0.79,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.74,0.95,0.88,0.65,0.88,0.83,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +21.0,0.92,0.74,0.86,0.68,0.525,0.624,0.67,0.843,0.59,0.69,0.8,0.52,0.79,0.87,0.76,0.57,0.562,0.44,0.5,0.44,0.75,0.7,0.807,0.811,0.692,0.764,0.6,0.56,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.77,0.79,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.74,0.95,0.88,0.65,0.88,0.83,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +22.0,0.93,0.76,0.91,0.7,0.525,0.624,0.71,0.843,0.61,0.73,0.86,0.52,0.84,0.91,0.8,0.57,0.562,0.45,0.5,0.45,0.76,0.7,0.807,0.811,0.692,0.764,0.62,0.57,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.82,0.79,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.75,0.95,0.88,0.65,0.88,0.83,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +23.0,0.95,0.78,0.96,0.71,0.525,0.624,0.75,0.843,0.64,0.76,0.92,0.52,0.89,0.95,0.84,0.58,0.562,0.45,0.5,0.45,0.76,0.7,0.807,0.811,0.692,0.764,0.64,0.58,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.87,0.8,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.75,0.95,0.88,0.65,0.88,0.83,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 +24.0,0.96,0.8,1.0,0.73,0.525,0.624,0.79,0.843,0.66,0.78,0.98,0.52,0.94,0.98,0.88,0.58,0.562,0.45,0.5,0.45,0.77,0.7,0.807,0.811,0.692,0.764,0.66,0.59,0.82,0.467,0.467,0.467,0.467,0.467,0.467,0.475,0.508,0.92,0.8,0.94,1.0,0.89,0.871,1.0,1.0,0.963,1.0,0.96,1.0,0.634,1.0,1.0,1.0,0.75,0.95,0.88,0.65,0.88,0.83,0.971,0.4,0.391,0.372,0.526,0.6,0.6,0.83,0.634,0.634,0.634,0.634,0.634,0.634,0.649,0.92,1.0 diff --git a/tests/test_integration.py b/tests/test_integration.py index 569f290a..6df264a6 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -95,7 +95,7 @@ "asset_locations": "NSI", "occupancy_type": "NSI", "max_potential_damage": "NSI", - "ground_floor_height": 1, + "ground_floor_height": "NSI", "unit": "ft", }, "setup_hazard": { diff --git a/tests/test_vulnerability_exposure.py b/tests/test_vulnerability_exposure.py index de0731b7..558acc98 100644 --- a/tests/test_vulnerability_exposure.py +++ b/tests/test_vulnerability_exposure.py @@ -92,12 +92,9 @@ "census_key": "495a349ce22bdb1294b378fb199e4f27e57471a9", "codebook_fn": "social_vulnerability", "state_abbreviation": "SC", - "blockgroup_fn": str( - DATADIR - / "social_vulnerability" - / "test_blockgroup_shp" - / "tl_2022_45_bg.shp" - ), + "blockgroup_fn": "blockgroup_shp_data", + "year_data": 2021, + "county": "019" }, }, "region": _region, diff --git a/tests/test_vulnerability_exposure_global_default.py b/tests/test_vulnerability_exposure_global_default.py index e8a203fa..832d4942 100644 --- a/tests/test_vulnerability_exposure_global_default.py +++ b/tests/test_vulnerability_exposure_global_default.py @@ -60,6 +60,7 @@ "occupancy_type": "OSM", "max_potential_damage": "jrc_damage_values", "ground_floor_height": 0, + "damage_types": ["structure", "content"], "unit": "m", "country": "United Kingdom", },