incomevis.utils

incomevis.utils.getColor

getColor(type)

Gather color gradient based on the given benchmark (nation). More detailed documentation is coming soon. :param type: Type of collor pallette. Currently support 'classic' or one of the

incomeType ('HHINCOME', 'RHHINCOME', 'ERHHINCOME', and 'RPPERHHINCOME')

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

  • 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'.

Returns

  • class ‘list’ – if the input type is ‘classic’

  • pandas.DataFrame object – if the input type is one of the household income type.

incomevis.utils.getDecile

getDecile(type)

Return a list of decile in either string or numeric form from 5p to 95p. We also include the 50p for convinient. :param type: Type of decile. Currently supported 'string' (e.g. '5p') or

'numeric' (e.g. 0.5).

Returns

A list of decile.

Return type

class ‘list’

incomevis.utils.getPercentile

getPercentile(type)

Return percentile in either string or numeric form. :param type: Type of decile. Currently supported 'string' (e.g. '5p') or

'numeric' (e.g. 0.5)

Return type

class ‘list’

incomevis.utils.getStateName

getStateName(type)

Return state in either string or numeric form :param type: Type of decile. Currently supported 'string' (e.g. 'Alabama') or

'numeric' (e.g. 1)

Return type

class ‘list’

incomevis.utils.path

get_root_dir()

Get root directory