7.1.3. infrarisk.src.socioeconomic package

7.1.3.1. infrarisk.src.socioeconomic.se_analysis module

class infrarisk.src.socioeconomic.se_analysis.SocioEconomicTable(name, year, tract, state, county, dir)

Bases: object

A class for downloading and analyzing socioeconomic data for a given county in the United States. The module is used to quantify the sector-wise economic impacts from infrastructure disruptions.

calculate_economic_costs()

Calculate the zipcode-level economic costs of water and power outages for each industrial sector in the county.

combine_infrastructure_se_data(integrated_network, resilience_metrics)

Combine the SE data with the infrastructure data.

Parameters:
create_setable()

Create a socioeconomic table for the county zipcodes by combining American Business Survey data with County shapefile.

download_abs_data(force_download=False)

Download Annual Business Survey data from census.gov and save to the local drive.

Parameters:

force_download (bool) – If True, download the ABS data even if it already exists on the local drive.

download_acs5_data(force_download=False)

Download 5-year American Community Survey data from census.gov and save to the local drive.

Parameters:

force_download (bool) – If True, download the ACS5 data even if it already exists on the local drive.

download_cbp_data(force_download=False)

Download County Business Patterns data from census.gov and save to the local drive.

Parameters:

force_download (bool) – If True, download the CBP data even if it already exists on the local drive.

download_ecnbasic_data(force_download=False)

Download Economic Census Basic data from census.gov and save to the local drive.

Parameters:

force_download (bool) – If True, download the ECNBasic data even if it already exists on the local drive.

download_se_data(force_download=False)

Download all SE data (County maps, CBP, ECN and ABS datasets) from census.gov and save to the local drive.

Parameters:

force_download (bool) – If True, download the SE data even if it already exists on the local drive.

download_zipcode_map(force_download=False)

Download zipcode shapefile from census.gov and save to the local drive.

Parameters:

force_download (bool) – If True, download the zipcode-level county shapefile even if it already exists on the local drive.

load_se_data()
plot_economic_costs(var, alpha)

Plot the economic costs of an industry in the county.

Parameters:
  • var (str) – The name of the industry to plot.

  • alpha (float) – The transparency of the plot.

plot_industry_output(var, alpha)

Plot the annual receipts of an industry in the county.

Parameters:
  • var (str) – The name of the industry to plot.

  • alpha (float) – The transparency of the plot.

plot_interactive(type='annual receipts')

Plot the economic costs of water and power outages for each industrial sector in the county.

Parameters:

type (string) – The type of plot to generate. Options are “annual receipts” and “economic costs”.