From 874a397d3b43685f5bebad406c49c0d0c5e85428 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Thu, 14 Apr 2016 14:26:19 -0400 Subject: [PATCH] adding percentile fixtures --- ...ee8b82c877c073438bc935a91d3dfccef875d1.sql | 17 +++ ...4555209878e8c4b37cf0b2b3d072ff129ec470.sql | 130 ++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 src/pg/test/fixtures/obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql create mode 100644 src/pg/test/fixtures/obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql diff --git a/src/pg/test/fixtures/obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql b/src/pg/test/fixtures/obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql new file mode 100644 index 0000000..7ef56d8 --- /dev/null +++ b/src/pg/test/fixtures/obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql @@ -0,0 +1,17 @@ + + +CREATE TABLE IF NOT EXISTS obs_11ee8b82c877c073438bc935a91d3dfccef875d1 ( + cartodb_id integer, + the_geom geometry(Geometry,4326), + the_geom_webmercator geometry(Geometry,3857), + geoid text, + x10 text, + x2 text, + x31 text, + x55 text +); + +INSERT INTO obs_11ee8b82c877c073438bc935a91d3dfccef875d1 (cartodb_id, the_geom, the_geom_webmercator, geoid, x10, x2, x31, x55) VALUES (2150, NULL, NULL, '36047048500', 'Wealthy, urban without Kids', '8', '15', '1'); + +CREATE SCHEMA IF NOT EXISTS observatory; +ALTER TABLE obs_11ee8b82c877c073438bc935a91d3dfccef875d1 SET SCHEMA observatory; diff --git a/src/pg/test/fixtures/obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql b/src/pg/test/fixtures/obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql new file mode 100644 index 0000000..fd4062d --- /dev/null +++ b/src/pg/test/fixtures/obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql @@ -0,0 +1,130 @@ + +CREATE TABLE IF NOT EXISTS obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 ( + cartodb_id integer, + the_geom geometry(Geometry,4326), + the_geom_webmercator geometry(Geometry,3857), + geoid text, + total_pop_quantile double precision, + male_pop_quantile double precision, + female_pop_quantile double precision, + median_age_quantile double precision, + white_pop_quantile double precision, + black_pop_quantile double precision, + asian_pop_quantile double precision, + hispanic_pop_quantile double precision, + amerindian_pop_quantile double precision, + other_race_pop_quantile double precision, + two_or_more_races_pop_quantile double precision, + not_hispanic_pop_quantile double precision, + not_us_citizen_pop_quantile double precision, + workers_16_and_over_quantile double precision, + commuters_by_car_truck_van_quantile double precision, + commuters_drove_alone_quantile double precision, + commuters_by_carpool_quantile double precision, + commuters_by_public_transportation_quantile double precision, + commuters_by_bus_quantile double precision, + commuters_by_subway_or_elevated_quantile double precision, + walked_to_work_quantile double precision, + worked_at_home_quantile double precision, + children_quantile double precision, + households_quantile double precision, + population_3_years_over_quantile double precision, + in_school_quantile double precision, + in_grades_1_to_4_quantile double precision, + in_grades_5_to_8_quantile double precision, + in_grades_9_to_12_quantile double precision, + in_undergrad_college_quantile double precision, + pop_25_years_over_quantile double precision, + high_school_diploma_quantile double precision, + less_one_year_college_quantile double precision, + one_year_more_college_quantile double precision, + associates_degree_quantile double precision, + bachelors_degree_quantile double precision, + masters_degree_quantile double precision, + pop_5_years_over_quantile double precision, + speak_only_english_at_home_quantile double precision, + speak_spanish_at_home_quantile double precision, + pop_determined_poverty_status_quantile double precision, + poverty_quantile double precision, + median_income_quantile double precision, + gini_index_quantile double precision, + income_per_capita_quantile double precision, + housing_units_quantile double precision, + vacant_housing_units_quantile double precision, + vacant_housing_units_for_rent_quantile double precision, + vacant_housing_units_for_sale_quantile double precision, + median_rent_quantile double precision, + percent_income_spent_on_rent_quantile double precision, + owner_occupied_housing_units_quantile double precision, + million_dollar_housing_units_quantile double precision, + mortgaged_housing_units_quantile double precision, + families_with_young_children_quantile double precision, + two_parent_families_with_young_children_quantile double precision, + two_parents_in_labor_force_families_with_young_children_quantil double precision, + two_parents_father_in_labor_force_families_with_young_children_ double precision, + two_parents_mother_in_labor_force_families_with_young_children_ double precision, + two_parents_not_in_labor_force_families_with_young_children_qua double precision, + one_parent_families_with_young_children_quantile double precision, + father_one_parent_families_with_young_children_quantile double precision, + men_45_to_64_quantile double precision, + men_45_to_49_quantile double precision, + men_50_to_54_quantile double precision, + men_55_to_59_quantile double precision, + men_60_61_quantile double precision, + men_62_64_quantile double precision, + black_men_45_54_quantile double precision, + black_men_55_64_quantile double precision, + hispanic_men_45_54_quantile double precision, + hispanic_men_55_64_quantile double precision, + white_men_45_54_quantile double precision, + white_men_55_64_quantile double precision, + asian_men_45_54_quantile double precision, + asian_men_55_64_quantile double precision, + men_45_64_less_than_9_grade_quantile double precision, + men_45_64_grade_9_12_quantile double precision, + men_45_64_high_school_quantile double precision, + men_45_64_some_college_quantile double precision, + men_45_64_associates_degree_quantile double precision, + men_45_64_bachelors_degree_quantile double precision, + men_45_64_graduate_degree_quantile double precision, + father_in_labor_force_one_parent_families_with_young_children_q double precision, + pop_15_and_over_quantile double precision, + pop_never_married_quantile double precision, + pop_now_married_quantile double precision, + pop_separated_quantile double precision, + pop_widowed_quantile double precision, + pop_divorced_quantile double precision, + commuters_16_over_quantile double precision, + commute_less_10_mins_quantile double precision, + commute_10_14_mins_quantile double precision, + commute_15_19_mins_quantile double precision, + commute_20_24_mins_quantile double precision, + commute_25_29_mins_quantile double precision, + commute_30_34_mins_quantile double precision, + commute_35_44_mins_quantile double precision, + commute_45_59_mins_quantile double precision, + commute_60_more_mins_quantile double precision, + aggregate_travel_time_to_work_quantile double precision, + income_less_10000_quantile double precision, + income_10000_14999_quantile double precision, + income_15000_19999_quantile double precision, + income_20000_24999_quantile double precision, + income_25000_29999_quantile double precision, + income_30000_34999_quantile double precision, + income_35000_39999_quantile double precision, + income_40000_44999_quantile double precision, + income_45000_49999_quantile double precision, + income_50000_59999_quantile double precision, + income_60000_74999_quantile double precision, + income_75000_99999_quantile double precision, + income_100000_124999_quantile double precision, + income_125000_149999_quantile double precision, + income_150000_199999_quantile double precision, + income_200000_or_more_quantile double precision +); + +INSERT INTO obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 (cartodb_id, the_geom, the_geom_webmercator, geoid, total_pop_quantile, male_pop_quantile, female_pop_quantile, median_age_quantile, white_pop_quantile, black_pop_quantile, asian_pop_quantile, hispanic_pop_quantile, amerindian_pop_quantile, other_race_pop_quantile, two_or_more_races_pop_quantile, not_hispanic_pop_quantile, not_us_citizen_pop_quantile, workers_16_and_over_quantile, commuters_by_car_truck_van_quantile, commuters_drove_alone_quantile, commuters_by_carpool_quantile, commuters_by_public_transportation_quantile, commuters_by_bus_quantile, commuters_by_subway_or_elevated_quantile, walked_to_work_quantile, worked_at_home_quantile, children_quantile, households_quantile, population_3_years_over_quantile, in_school_quantile, in_grades_1_to_4_quantile, in_grades_5_to_8_quantile, in_grades_9_to_12_quantile, in_undergrad_college_quantile, pop_25_years_over_quantile, high_school_diploma_quantile, less_one_year_college_quantile, one_year_more_college_quantile, associates_degree_quantile, bachelors_degree_quantile, masters_degree_quantile, pop_5_years_over_quantile, speak_only_english_at_home_quantile, speak_spanish_at_home_quantile, pop_determined_poverty_status_quantile, poverty_quantile, median_income_quantile, gini_index_quantile, income_per_capita_quantile, housing_units_quantile, vacant_housing_units_quantile, vacant_housing_units_for_rent_quantile, vacant_housing_units_for_sale_quantile, median_rent_quantile, percent_income_spent_on_rent_quantile, owner_occupied_housing_units_quantile, million_dollar_housing_units_quantile, mortgaged_housing_units_quantile, families_with_young_children_quantile, two_parent_families_with_young_children_quantile, two_parents_in_labor_force_families_with_young_children_quantil, two_parents_father_in_labor_force_families_with_young_children_, two_parents_mother_in_labor_force_families_with_young_children_, two_parents_not_in_labor_force_families_with_young_children_qua, one_parent_families_with_young_children_quantile, father_one_parent_families_with_young_children_quantile, men_45_to_64_quantile, men_45_to_49_quantile, men_50_to_54_quantile, men_55_to_59_quantile, men_60_61_quantile, men_62_64_quantile, black_men_45_54_quantile, black_men_55_64_quantile, hispanic_men_45_54_quantile, hispanic_men_55_64_quantile, white_men_45_54_quantile, white_men_55_64_quantile, asian_men_45_54_quantile, asian_men_55_64_quantile, men_45_64_less_than_9_grade_quantile, men_45_64_grade_9_12_quantile, men_45_64_high_school_quantile, men_45_64_some_college_quantile, men_45_64_associates_degree_quantile, men_45_64_bachelors_degree_quantile, men_45_64_graduate_degree_quantile, father_in_labor_force_one_parent_families_with_young_children_q, pop_15_and_over_quantile, pop_never_married_quantile, pop_now_married_quantile, pop_separated_quantile, pop_widowed_quantile, pop_divorced_quantile, commuters_16_over_quantile, commute_less_10_mins_quantile, commute_10_14_mins_quantile, commute_15_19_mins_quantile, commute_20_24_mins_quantile, commute_25_29_mins_quantile, commute_30_34_mins_quantile, commute_35_44_mins_quantile, commute_45_59_mins_quantile, commute_60_more_mins_quantile, aggregate_travel_time_to_work_quantile, income_less_10000_quantile, income_10000_14999_quantile, income_15000_19999_quantile, income_20000_24999_quantile, income_25000_29999_quantile, income_30000_34999_quantile, income_35000_39999_quantile, income_40000_44999_quantile, income_45000_49999_quantile, income_50000_59999_quantile, income_60000_74999_quantile, income_75000_99999_quantile, income_100000_124999_quantile, income_125000_149999_quantile, income_150000_199999_quantile, income_200000_or_more_quantile) VALUES (52953, NULL, NULL, '36047048500', 0.234783783783784006, 0.422405405405404999, 0.0987567567567567972, 0.0714999999999999941, 0.295310810810811009, 0.407189189189189005, 0.625608108108107963, 0.79520270270270299, 0, 0.858121621621621977, 0.155202702702703005, 0.160445945945945995, 0.703797297297297009, 0.592270270270270016, 0.0180540540540541014, 0.0188243243243243, 0.0334054054054054028, 0.993756756756757009, 0.728162162162162008, 0.995972972972973047, 0.929135135135135015, 0.625432432432431962, 0.038608108108108101, 0.157121621621621993, 0.241878378378378001, 0.173783783783784007, 0.0380675675675676006, 0.0308108108108108014, 0.0486216216216215982, 0.479743243243243023, 0.297675675675675988, 0.190351351351351006, 0.0339324324324324009, 0.158513513513514004, 0.232527027027026989, 0.802513513513513965, 0.757148648648648948, 0.255405405405405017, 0.196094594594594995, 0.816851351351351007, 0.252513513513513976, 0.560054054054053951, 0.77747297297297302, 0.336932432432431983, 0.655378378378377979, 0.141810810810811011, 0.362824324324323988, 0.463837837837837996, 0, 0.93904054054054098, 0.419445945945945975, 0.0387972972972972993, 0, 0.0475675675675676021, 0.0944459459459458944, 0.160324324324324002, 0.132824324324324006, 0.303256756756757007, 0, 0.924499999999999988, 0.232770270270270002, 0.579662162162162042, 0.0422432432432432031, 0.0560675675675676027, 0.165040540540540986, 0.0195810810810811003, 0.168486486486486009, 0.242094594594595008, 0, 0, 0.707283783783783981, 0.850162162162162005, 0.201621621621622005, 0, 0, 0, 0.578743243243243, 0.18727027027026999, 0.154256756756757013, 0.0275270270270270012, 0.292027027027026986, 0.193445945945945996, 0.435770270270269988, 0.614432432432431952, 0.327310810810810981, 0.923756756756756947, 0.0570540540540541014, 0.548918918918918974, 0.0795135135135135035, 0.0187162162162161985, 0.594202702702703034, 0.187472972972972995, 0.0326216216216215979, 0.100270270270269996, 0.361067567567568026, 0.786391891891891959, 0.876067567567567984, 0.983445945945946032, 0.889270270270269947, 0.719621621621622021, 0.452013513513512988, 0.059310810810810799, 0.0956216216216216053, 0.246567567567568008, 0.638864864864865045, 0.179837837837837994, 0.350094594594595021, 0.121972972972973007, 0.15340540540540501, 0.0852972972972973059, 0.194959459459459, 0.423648648648648984, 0.438256756756757015, 0.34521621621621601, 0.700472972972972951, 0.507418918918918993, 0.714310810810811048); + + +CREATE SCHEMA IF NOT EXISTS observatory; +ALTER TABLE obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 SET SCHEMA observatory;