incomevis.processing

incomevis.processing.incomevis

class incomevis

Bases: object

Primary object for data processing.

adjustIncome()

Deflating househould income (HHINCOME) with consumer price index (CPI), househouse effective size (HHSIZE), and regional parity price (RPP). The result are real household income (RHHINCOME, deflated with only CPI), equivalent real household income (ERHHINCOME, deflated with CPI and HHSIZE), and regional-equivalent-real household income (RPPERHHINCOME, deflated with all three deflators). This method does not take parameter.

Parameters

None – This method does not take parameter.

Returns

Dataframe of deflated data

Return type

pandas DataFrame object

getData()

Return the inspected dataset in a Pandas dataframe. This method does not take parameter.

Parameters

None – This method does not take parameter.

Returns

Dataframe of full data

Return type

pandas DataFrame object

getIncomevis(incomeType='RPPERHHINCOME', k='decile', year_start=1977, year_end=2020, group='all', benchmark=False, provide_colorFrame=False, colorFrame=[], returnColor=False, provide_orderFrame=False, orderFrame=pandas.DataFrame, returnOrder=False, age_resampling=False, age_resampling_freq=100)

Get deflated household income for each year.

Parameters
  • incomeType (str) – Type of household income. Currently supported 'HHINCOME', 'RHHINCOME', 'ERHHINCOME', and 'RPPERHHINCOME'. Default: 'RPPERHHINCOME', i.e. fully deflated.

  • k (str) – Method of partitioning income, which is either 'decile' or 'percentile'. Default: 'decile'.

  • year_start (int) – Starting year of data that will be printed out. Default: 1977, i.e. the earliest year household income was meaningfully documented by IPUMS.

  • year_end (int) – Ending year of data that will be printed out. Default: 2020.

  • group (str) – Allowing to export (sub)population of data. Currently supported 'all', 'male', 'female', 'black', 'non-black', 'hispan', 'non-hispan', 'high-educ', 'low-educ'. Default: 'all'.

  • benchmark (bool) – Whether the exporting data is the benchmark data. If benchmark = True, the default benchmark data is the national income (with respect to the selected income type) at 'year_end'. Default: False.

Returns

This function has no return.

Return type

None

getPop()

Return population for all state and all year in a Pandas dataframe. This method does not take parameter.

Parameters

None – This method does not take parameter.

Returns

Dataframe of population

Return type

pandas DataFrame object