Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poverty_threshold #1066

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions statvar_imports/us_census/poverty_threshold/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Table of Contents

1. [About the Dataset](#about-the-dataset)
2. [Type of place](#about-the-import)
3. [Verticals: Economy]
4. [years]
5. [how to run]

## About the Dataset
Poverty Threshold by United States Census Bureau it describes the weighted average thresholds in Current Population Survey Annual Social and Economic Supplement (CPS ASEC).

### How to download data
Mannual download
Gone through open data portal, selected the variables and downloaded manually

### type of place:
country level

### Verticals: Economy
### years: 2010-2023

### how to run:

Open a terminal or command prompt.
To process your data, type the following command and replace the bracketed parts with your actual file paths:
python3 stat_var_processor.py --input_data='<input csv>' --pv_map="<pv_map*.csv>" --config="<metadata.csv>"

python3 stat_var_processor.py --existing_statvar_mcf=stat_vars.mcf --input_data=statvar_imports/us_census/poverty_threshold/sample_input/<input_file>.csv --pv_map=statvar_imports/us_census/poverty_threshold/pv_map/_pvmap.csv --config=statvar_imports/us_census/poverty_threshold/pv_map/.csv --output_path=statvar_imports/us_census/poverty_threshold/test_data/sample_output/

The script generates output in three formats: CSV, TMCF, and MCF.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
parameter,value
url,https://www.census.gov/data/tables/time-series/demo/income-poverty/historical-poverty-thresholds.html
description,Poverty threshold for US
#place_type,Country
#places_within,country/USA
start_date,
end_date,2010
release_frequency,
process,
comments,
output_columns,"observationAbout,observationDate,value,variableMeasured,unit,measurementMethod"
header_rows,2
drop_statvars_without_svobs,0
word_delimiter,""""""
pv_map,https://docs.google.com/spreadsheets/d/1orm6fHDDF8mvAoM2kgiQb1zqfPNNAe10_4Hbovos7lo/edit#gid=2080700151
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
key,prop,value,p1,v1,p2,v2,p3,v3,p4,v4,p5,v5,p6,v6,p7,v7,p8,v8
Place,observationAbout,country/USA,populationType,Household,unit,USDollar,measurementQualifier,Annual,measuredProperty,incomePovertyThreshold,measurementMethod ,USC_CPS_ASEC_Survey,Var1,,#End,#value,,
One person (unrelated individual):*.,householdSize,[1 Person],Var1, 1 Person Household,,,,,,,,,,,,,,
Under 65 years......*.,householdSize,[1 Person],householderAge,[- 65 Years],Var1,1 Person Household with Householder Aged 65 or Less,,,,,,,,,,,,
65 years and over......*.,householdSize,[1 Person],householderAge,[65 - Years],Var1,1 Person Household with Householder Aged 65 or More,,,,,,,,,,,,
Two people:,householdSize,[2 Person],Var1, 2 Person Household,,,,,,,,,,,,,,
Householder under 65 years*.,householdSize,[2 Person],householderAge,[- 65 Years],Var1,2 Person Household with Householder Aged 65 or Less,,,,,,,,,,,,
Householder 65 years and over......*.,householdSize,[2 Person],householderAge,[65 - Years],Var1,2 Person Household with Householder Aged 65 or More,,,,,,,,,,,,
Three people*.,householdSize,[3 Person],Var1, 3 Person Household,,,,,,,,,,,,,,
Four people*.,householdSize,[4 Person],Var1, 4 Person Household,,,,,,,,,,,,,,
Five people*.,householdSize,[5 Person],Var1, 5 Person Household,,,,,,,,,,,,,,
Six people*.,householdSize,[6 Person],Var1, 6 Person Household,,,,,,,,,,,,,,
Seven people*.,householdSize,[7 Person],Var1, 7 Person Household,,,,,,,,,,,,,,
Eight people*.,householdSize,[8 Person],Var1, 8 Person Household,,,,,,,,,,,,,,
Nine people or more*.,householdSize,[9 - Person],Var1, 9 Or More Person Household,,,,,,,,,,,,,,
One,householderRelatedChildrenUnder18Years,[1 Child],value,{Number},name,"""Household Income Poverty Threshold {Var1} with 1 Related Child Under 18 Years"" ",,,,,,,,,,,,
Two,householderRelatedChildrenUnder18Years,[2 Child],value,{Number},name,"""Household Income Poverty Threshold {Var1} with 2 Related Children Under 18 Years"" ",,,,,,,,,,,,
Three,householderRelatedChildrenUnder18Years,[3 Child],value,{Number},name,"""Household Income Poverty Threshold {Var1} with 3 Related Children Under 18 Years"" ",,,,,,,,,,,,
Four,householderRelatedChildrenUnder18Years,[4 Child],value,{Number},name,"""Household Income Poverty Threshold {Var1} with 4 Related Children Under 18 Years"" ",,,,,,,,,,,,
Five,householderRelatedChildrenUnder18Years,[5 Child],value,{Number},name,"""Household Income Poverty Threshold {Var1} with 5 Related Children Under 18 Years"" ",,,,,,,,,,,,
Six,householderRelatedChildrenUnder18Years,[6 Child],value,{Number},name,"""Household Income Poverty Threshold {Var1} with 6 Related Children Under 18 Years"" ",,,,,,,,,,,,
Seven,householderRelatedChildrenUnder18Years,[7 Child],value,{Number},name,"""Household Income Poverty Threshold {Var1} with 7 Related Children Under 18 Years"" ",,,,,,,,,,,,
Eight or more,householderRelatedChildrenUnder18Years,[8 - Child],value,{Number},name,"""Household Income Poverty Threshold {Var1} with 8 or more Related Children Under 18 Years""",,,,,,,,,,,,
None,value,{Number},name,"""Household Income Poverty Threshold {Var1} with No Related Child Under 18 Years"" ",,,,,,,,,,,,,,
year,observationDate,{Number},,,,,,,,,,,,,,,,
Weighted average thresholds,measurementMethod ,USC_CPS_ASECSurveyWeightedAverage,value,{Number},name,"""Household Income Poverty Threshold {Var1} Weighted average thresholds""",,,,,,,,,,,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
,,,,Related children under 18 years,Related children under 18 years,Related children under 18 years,Related children under 18 years,Related children under 18 years,Related children under 18 years,Related children under 18 years,Related children under 18 years,Related children under 18 years
Place,year,Size of family unit,Weighted average thresholds, None,One,Two,Three,Four,Five,Six,Seven,Eight or more
country/USA,2010,One person (unrelated individual):,"11,139",,,,,,,,,
country/USA,2010,Under 65 years......*.,"11,344","11,344",,,,,,,,
country/USA,2010,65 years and over......*.,"10,458","10,458",,,,,,,,
country/USA,2010,Two people:,"14,218",,,,,,,,,
country/USA,2010,Householder under 65 years*.,"14,676","14,602","15,030",,,,,,,
country/USA,2010,Householder 65 years and over......*.,"13,194","13,180","14,973",,,,,,,
country/USA,2010,Three people*.,"17,374","17,057","17,552","17,568",,,,,,
country/USA,2010,Four people*.,"22,314","22,491","22,859","22,113","22,190",,,,,
country/USA,2010,Five people*.,"26,439","27,123","27,518","26,675","26,023","25,625",,,,
country/USA,2010,Six people*.,"29,897","31,197","31,320","30,675","30,056","29,137","28,591",,,
country/USA,2010,Seven people*.,"34,009","35,896","36,120","35,347","34,809","33,805","32,635","31,351",,
country/USA,2010,Eight people*.,"37,934","40,146","40,501","39,772","39,133","38,227","37,076","35,879","35,575",
country/USA,2010,Nine people or more*.,"45,220","48,293","48,527","47,882","47,340","46,451","45,227","44,120","43,845","42,156"
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
observationAbout,observationDate,value,variableMeasured,unit,measurementMethod
country/USA,2010,11139,dcid:Annual_IncomePovertyThreshold_Household,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,11344,dcid:Annual_IncomePovertyThreshold_Household_HouseholderAge65OrLessYears_With1Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,11344,dcid:Annual_IncomePovertyThreshold_Household_HouseholderAge65OrLessYears_With1Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,10458,dcid:Annual_IncomePovertyThreshold_Household_HouseholderAge65OrMoreYears_With1Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,10458,dcid:Annual_IncomePovertyThreshold_Household_HouseholderAge65OrMoreYears_With1Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,14218,dcid:Annual_IncomePovertyThreshold_Household_With2Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,14676,dcid:Annual_IncomePovertyThreshold_Household_HouseholderAge65OrLessYears_With2Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,14602,dcid:Annual_IncomePovertyThreshold_Household_HouseholderAge65OrLessYears_With2Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,15030,dcid:Annual_IncomePovertyThreshold_Household_HouseholderAge65OrLessYears_Householder1RelatedChildren_With2Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,13194,dcid:Annual_IncomePovertyThreshold_Household_HouseholderAge65OrMoreYears_With2Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,13180,dcid:Annual_IncomePovertyThreshold_Household_HouseholderAge65OrMoreYears_With2Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,14973,dcid:Annual_IncomePovertyThreshold_Household_HouseholderAge65OrMoreYears_Householder1RelatedChildren_With2Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,17374,dcid:Annual_IncomePovertyThreshold_Household_With3Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,17057,dcid:Annual_IncomePovertyThreshold_Household_With3Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,17552,dcid:Annual_IncomePovertyThreshold_Household_Householder1RelatedChildren_With3Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,17568,dcid:Annual_IncomePovertyThreshold_Household_Householder2RelatedChildren_With3Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,22314,dcid:Annual_IncomePovertyThreshold_Household_With4Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,22491,dcid:Annual_IncomePovertyThreshold_Household_With4Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,22859,dcid:Annual_IncomePovertyThreshold_Household_Householder1RelatedChildren_With4Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,22113,dcid:Annual_IncomePovertyThreshold_Household_Householder2RelatedChildren_With4Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,22190,dcid:Annual_IncomePovertyThreshold_Household_Householder3RelatedChildren_With4Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,26439,dcid:Annual_IncomePovertyThreshold_Household_With5Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,27123,dcid:Annual_IncomePovertyThreshold_Household_With5Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,27518,dcid:Annual_IncomePovertyThreshold_Household_Householder1RelatedChildren_With5Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,26675,dcid:Annual_IncomePovertyThreshold_Household_Householder2RelatedChildren_With5Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,26023,dcid:Annual_IncomePovertyThreshold_Household_Householder3RelatedChildren_With5Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,25625,dcid:Annual_IncomePovertyThreshold_Household_Householder4RelatedChildren_With5Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,29897,dcid:Annual_IncomePovertyThreshold_Household_With6Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,31197,dcid:Annual_IncomePovertyThreshold_Household_With6Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,31320,dcid:Annual_IncomePovertyThreshold_Household_Householder1RelatedChildren_With6Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,30675,dcid:Annual_IncomePovertyThreshold_Household_Householder2RelatedChildren_With6Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,30056,dcid:Annual_IncomePovertyThreshold_Household_Householder3RelatedChildren_With6Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,29137,dcid:Annual_IncomePovertyThreshold_Household_Householder4RelatedChildren_With6Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,28591,dcid:Annual_IncomePovertyThreshold_Household_Householder5RelatedChildren_With6Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,34009,dcid:Annual_IncomePovertyThreshold_Household_With7Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,35896,dcid:Annual_IncomePovertyThreshold_Household_With7Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,36120,dcid:Annual_IncomePovertyThreshold_Household_Householder1RelatedChildren_With7Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,35347,dcid:Annual_IncomePovertyThreshold_Household_Householder2RelatedChildren_With7Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,34809,dcid:Annual_IncomePovertyThreshold_Household_Householder3RelatedChildren_With7Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,33805,dcid:Annual_IncomePovertyThreshold_Household_Householder4RelatedChildren_With7Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,32635,dcid:Annual_IncomePovertyThreshold_Household_Householder5RelatedChildren_With7Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,31351,dcid:Annual_IncomePovertyThreshold_Household_Householder6RelatedChildren_With7Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,37934,dcid:Annual_IncomePovertyThreshold_Household_With8Person,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,40146,dcid:Annual_IncomePovertyThreshold_Household_With8Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,40501,dcid:Annual_IncomePovertyThreshold_Household_Householder1RelatedChildren_With8Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,39772,dcid:Annual_IncomePovertyThreshold_Household_Householder2RelatedChildren_With8Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,39133,dcid:Annual_IncomePovertyThreshold_Household_Householder3RelatedChildren_With8Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,38227,dcid:Annual_IncomePovertyThreshold_Household_Householder4RelatedChildren_With8Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,37076,dcid:Annual_IncomePovertyThreshold_Household_Householder5RelatedChildren_With8Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,35879,dcid:Annual_IncomePovertyThreshold_Household_Householder6RelatedChildren_With8Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,35575,dcid:Annual_IncomePovertyThreshold_Household_Householder7RelatedChildren_With8Person,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,45220,dcid:Annual_IncomePovertyThreshold_Household_With9OrMorePerson,USDollar,USC_CPS_ASECSurveyWeightedAverage
country/USA,2010,48293,dcid:Annual_IncomePovertyThreshold_Household_With9OrMorePerson,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,48527,dcid:Annual_IncomePovertyThreshold_Household_Householder1RelatedChildren_With9OrMorePerson,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,47882,dcid:Annual_IncomePovertyThreshold_Household_Householder2RelatedChildren_With9OrMorePerson,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,47340,dcid:Annual_IncomePovertyThreshold_Household_Householder3RelatedChildren_With9OrMorePerson,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,46451,dcid:Annual_IncomePovertyThreshold_Household_Householder4RelatedChildren_With9OrMorePerson,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,45227,dcid:Annual_IncomePovertyThreshold_Household_Householder5RelatedChildren_With9OrMorePerson,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,44120,dcid:Annual_IncomePovertyThreshold_Household_Householder6RelatedChildren_With9OrMorePerson,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,43845,dcid:Annual_IncomePovertyThreshold_Household_Householder7RelatedChildren_With9OrMorePerson,USDollar,USC_CPS_ASEC_Survey
country/USA,2010,42156,dcid:Annual_IncomePovertyThreshold_Household_Householder8OrMoreRelatedChildren_With9OrMorePerson,USDollar,USC_CPS_ASEC_Survey
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Node: E:poverty_threshold->E0
observationAbout: C:poverty_threshold->observationAbout
observationDate: C:poverty_threshold->observationDate
value: C:poverty_threshold->value
variableMeasured: C:poverty_threshold->variableMeasured
unit: C:poverty_threshold->unit
measurementMethod: C:poverty_threshold->measurementMethod
typeOf: dcs:StatVarObservation
Loading
Loading