From e89582aed5c09304f9ac85b8d0914196141609c1 Mon Sep 17 00:00:00 2001 From: John Krauss Date: Wed, 13 Apr 2016 10:35:53 -0400 Subject: [PATCH] remove columns from demographicsnapshot that do not appear at BG level --- src/pg/sql/41_observatory_augmentation.sql | 109 ++++++++++----------- 1 file changed, 54 insertions(+), 55 deletions(-) diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index 740704f..d6c5f11 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -21,7 +21,6 @@ -------------------------------------------------------------------------------- -- Creates a table of demographic snapshot --- TODO: Remove since it does address geocoding? CREATE OR REPLACE FUNCTION OBS_GetDemographicSnapshot(geom geometry) RETURNS TABLE( @@ -37,24 +36,24 @@ RETURNS TABLE( other_race_pop NUMERIC, two_or_more_races_pop NUMERIC, not_hispanic_pop NUMERIC, - not_us_citizen_pop NUMERIC, - workers_16_and_over NUMERIC, - commuters_by_car_truck_van NUMERIC, - commuters_drove_alone NUMERIC, - commuters_by_carpool NUMERIC, - commuters_by_public_transportation NUMERIC, - commuters_by_bus NUMERIC, - commuters_by_subway_or_elevated NUMERIC, - walked_to_work NUMERIC, - worked_at_home NUMERIC, - children NUMERIC, + --not_us_citizen_pop NUMERIC, + --workers_16_and_over NUMERIC, + --commuters_by_car_truck_van NUMERIC, + --commuters_drove_alone NUMERIC, + --commuters_by_carpool NUMERIC, + --commuters_by_public_transportation NUMERIC, + --commuters_by_bus NUMERIC, + --commuters_by_subway_or_elevated NUMERIC, + --walked_to_work NUMERIC, + --worked_at_home NUMERIC, + --children NUMERIC, -- TODO we should be able to get this at BG households NUMERIC, - population_3_years_over NUMERIC, - in_school NUMERIC, - in_grades_1_to_4 NUMERIC, - in_grades_5_to_8 NUMERIC, - in_grades_9_to_12 NUMERIC, - in_undergrad_college NUMERIC, + --population_3_years_over NUMERIC, + --in_school NUMERIC, + --in_grades_1_to_4 NUMERIC, + --in_grades_5_to_8 NUMERIC, + --in_grades_9_to_12 NUMERIC, + --in_undergrad_college NUMERIC, pop_25_years_over NUMERIC, high_school_diploma NUMERIC, less_one_year_college NUMERIC, @@ -63,10 +62,10 @@ RETURNS TABLE( bachelors_degree NUMERIC, masters_degree NUMERIC, pop_5_years_over NUMERIC, - speak_only_english_at_home NUMERIC, - speak_spanish_at_home NUMERIC, - pop_determined_poverty_status NUMERIC, - poverty NUMERIC, + --speak_only_english_at_home NUMERIC, + --speak_spanish_at_home NUMERIC, + --pop_determined_poverty_status NUMERIC, + --poverty NUMERIC, median_income NUMERIC, gini_index NUMERIC, income_per_capita NUMERIC, @@ -79,12 +78,12 @@ RETURNS TABLE( owner_occupied_housing_units NUMERIC, million_dollar_housing_units NUMERIC, mortgaged_housing_units NUMERIC, - pop_15_and_over NUMERIC, - pop_never_married NUMERIC, - pop_now_married NUMERIC, - pop_separated NUMERIC, - pop_widowed NUMERIC, - pop_divorced NUMERIC, + --pop_15_and_over NUMERIC, + --pop_never_married NUMERIC, + --pop_now_married NUMERIC, + --pop_separated NUMERIC, + --pop_widowed NUMERIC, + --pop_divorced NUMERIC, commuters_16_over NUMERIC, commute_less_10_mins NUMERIC, commute_10_14_mins NUMERIC, @@ -130,24 +129,24 @@ BEGIN 'other_race_pop', 'two_or_more_races_pop', 'not_hispanic_pop', - 'not_us_citizen_pop', - 'workers_16_and_over', - 'commuters_by_car_truck_van', - 'commuters_drove_alone', - 'commuters_by_carpool', - 'commuters_by_public_transportation', - 'commuters_by_bus', - 'commuters_by_subway_or_elevated', - 'walked_to_work', - 'worked_at_home', - 'children', + --'not_us_citizen_pop', + --'workers_16_and_over', + --'commuters_by_car_truck_van', + --'commuters_drove_alone', + --'commuters_by_carpool', + --'commuters_by_public_transportation', + --'commuters_by_bus', + --'commuters_by_subway_or_elevated', + --'walked_to_work', + --'worked_at_home', + --'children', 'households', - 'population_3_years_over', - 'in_school', - 'in_grades_1_to_4', - 'in_grades_5_to_8', - 'in_grades_9_to_12', - 'in_undergrad_college', + --'population_3_years_over', + --'in_school', + --'in_grades_1_to_4', + --'in_grades_5_to_8', + --'in_grades_9_to_12', + --'in_undergrad_college', 'pop_25_years_over', 'high_school_diploma', 'less_one_year_college', @@ -156,10 +155,10 @@ BEGIN 'bachelors_degree', 'masters_degree', 'pop_5_years_over', - 'speak_only_english_at_home', - 'speak_spanish_at_home', - 'pop_determined_poverty_status', - 'poverty', + --'speak_only_english_at_home', + --'speak_spanish_at_home', + --'pop_determined_poverty_status', + --'poverty', 'median_income', 'gini_index', 'income_per_capita', @@ -172,12 +171,12 @@ BEGIN 'owner_occupied_housing_units', 'million_dollar_housing_units', 'mortgaged_housing_units', - 'pop_15_and_over', - 'pop_never_married', - 'pop_now_married', - 'pop_separated', - 'pop_widowed', - 'pop_divorced', + --'pop_15_and_over', + --'pop_never_married', + --'pop_now_married', + --'pop_separated', + --'pop_widowed', + --'pop_divorced', 'commuters_16_over', 'commute_less_10_mins', 'commute_10_14_mins',