diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index 0c157aa..a736fb5 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -22,7 +22,7 @@ -- Creates a table of demographic snapshot -CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetDemographicSnapshotJ(geom geometry, time_span text default '2009 - 2013', geometry_level text default '"us.census.tiger".block_group') +CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetDemographicSnapshot(geom geometry, time_span text default '2009 - 2013', geometry_level text default '"us.census.tiger".block_group') RETURNS SETOF JSON AS $$ DECLARE diff --git a/src/pg/test/expected/41_observatory_augmentation_test.out b/src/pg/test/expected/41_observatory_augmentation_test.out index 1836a52..27ab610 100644 --- a/src/pg/test/expected/41_observatory_augmentation_test.out +++ b/src/pg/test/expected/41_observatory_augmentation_test.out @@ -21,10 +21,6 @@ Loading obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql fixture file... Done. Loading obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql fixture file... Done. - total_pop | male_pop | female_pop | median_age | white_pop | black_pop | asian_pop | hispanic_pop | amerindian_pop | other_race_pop | two_or_more_races_pop | not_hispanic_pop | households | pop_25_years_over | high_school_diploma | less_one_year_college | one_year_more_college | associates_degree | bachelors_degree | masters_degree | median_income | gini_index | income_per_capita | housing_units | vacant_housing_units | vacant_housing_units_for_rent | vacant_housing_units_for_sale | median_rent | percent_income_spent_on_rent | owner_occupied_housing_units | million_dollar_housing_units | mortgaged_housing_units | commuters_16_over | commute_less_10_mins | commute_10_14_mins | commute_15_19_mins | commute_20_24_mins | commute_25_29_mins | commute_30_34_mins | commute_35_44_mins | commute_45_59_mins | commute_60_more_mins | aggregate_travel_time_to_work | income_less_10000 | income_10000_14999 | income_15000_19999 | income_20000_24999 | income_25000_29999 | income_30000_34999 | income_35000_39999 | income_40000_44999 | income_45000_49999 | income_50000_59999 | income_60000_74999 | income_75000_99999 | income_100000_124999 | income_125000_149999 | income_150000_199999 | income_200000_or_more | land_area -------------------+------------------+------------------+------------+------------------+------------------+------------------+------------------+----------------+----------------+-----------------------+------------------+------------------+-------------------+---------------------+-----------------------+-----------------------+-------------------+------------------+------------------+---------------+------------+-------------------+------------------+----------------------+-------------------------------+-------------------------------+-------------+------------------------------+------------------------------+------------------------------+-------------------------+-------------------+----------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+----------------------+-------------------------------+-------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+----------------------+----------------------+----------------------+-----------------------+----------- - 9516.27915900609 | 6152.51885204623 | 3363.76030695986 | 28.8 | 5301.51624447348 | 149.500458087105 | 230.000704749392 | 3835.26175169611 | 0 | 0 | 0 | 5681.01740730998 | 3323.51018362871 | 7107.02177675621 | 1040.753188991 | 69.0002114248176 | 793.502431385402 | 327.751004267883 | 2742.7584041365 | 931.502854235037 | 66304 | 0.3494 | 28291 | 3662.76122313407 | 339.251039505353 | 120.750369993431 | 0 | 1764 | 35.3 | 339.251039505353 | 0 | 224.250687130657 | 6549.27006773893 | 327.751004267883 | 28.750088093674 | 201.250616655718 | 621.001902823358 | 373.751145217762 | 1851.5056732326 | 1414.50433420876 | 1115.50341803455 | 615.251885204623 | | 57.500176187348 | 0 | 212.750651893187 | 408.251250930171 | 0 | 155.25047570584 | 109.250334755961 | 92.0002818997568 | 63.2501938060828 | 184.000563799514 | 621.001902823358 | 552.001691398541 | 327.751004267883 | 333.501021886618 | 126.500387612166 | | -(1 row) test_obsgetcensuswithtestpointand2variables --------------------------------------------- diff --git a/src/pg/test/sql/41_observatory_augmentation_test.sql b/src/pg/test/sql/41_observatory_augmentation_test.sql index 9b89436..ee6c46c 100644 --- a/src/pg/test/sql/41_observatory_augmentation_test.sql +++ b/src/pg/test/sql/41_observatory_augmentation_test.sql @@ -122,14 +122,14 @@ SELECT as OBS_GetPolygons_for_null_island; SELECT * FROM - cdb_observatory._OBS_GetSegmentSnapshot( + cdb_observatory.OBS_GetSegmentSnapshot( cdb_observatory._TestPoint(), '"us.census.tiger".census_tract' ); -- segmentation around null island SELECT * FROM - cdb_observatory._OBS_GetSegmentSnapshot( + cdb_observatory.OBS_GetSegmentSnapshot( CDB_LatLng(0, 0), '"us.census.tiger".census_tract' ); @@ -149,7 +149,6 @@ WITH result as ( WITH result as ( SELECT array_agg(_OBS_GetCategories) as expected FROM cdb_observatory._OBS_GetCategories( - -- cdb_observatory._TestPoint(), CDB_LatLng(0,0), Array['"us.census.spielman_singleton_segments".X10'], '"us.census.tiger".census_tract'