diff --git a/doc/methods.md b/doc/methods.md index acc124c..5a18a87 100644 --- a/doc/methods.md +++ b/doc/methods.md @@ -14,7 +14,9 @@ Name |Description --- | --- point_geometry | a WGS84 point geometry (the_geom) measure_name | a human readable string name of a US Census variable. The glossary of measure_names is [available below]('measure_name table'). -normalize | for measures that are are **sums** (e.g. population) the default normalization is 'area' and response comes back as a rate per square kilometer. Other options are 'denominator', which will use the denominator specified in the +normalize | for measures that are are **sums** (e.g., population) the default normalization is 'area' and response comes back as a rate per square kilometer. Other options are 'denominator', which will use the denominator specified in the [Data Catalog](http://cartodb.github.io/bigmetadata/index.html) (optional) +boundary_id | source of geometries to pull measure from (e.g., 'us.census.tiger.census_tract') +time_span | time span of interest (e.g., 2010 - 2014) #### Returns @@ -29,7 +31,8 @@ value | the raw or normalized measure Add a Measure to an empty column based on point locations in your table ```SQL -UPDATE tablename SET local_male_population = OBS_GetUSCensusMeasure(the_geom, 'Male Population') +UPDATE tablename +SET local_male_population = OBS_GetUSCensusMeasure(the_geom, 'Male Population') ``` Get a measure at a single point location @@ -54,6 +57,8 @@ Name |Description point_geometry | a WGS84 polygon geometry (the_geom) measure_name | a human readable string name of a US Census variable. The glossary of measure_names is [available below]('measure_name table'). normalize | for measures that are are **sums** (e.g. population) the default normalization is 'none' and response comes back as a raw value. Other options are 'denominator', which will use the denominator specified in the [Data Catalog](http://cartodb.github.io/bigmetadata/index.html) (optional) +boundary_id | source of geometries to pull measure from (e.g., 'us.census.tiger.census_tract') +time_span | time span of interest (e.g., 2010 - 2014) #### Returns @@ -68,13 +73,18 @@ value | the raw or normalized measure Add a Measure to an empty column based on polygons in your table ```SQL -UPDATE tablename SET local_male_population = OBS_GetUSCensusMeasure(the_geom, 'Male Population') +UPDATE tablename +SET local_male_population = OBS_GetUSCensusMeasure(the_geom, 'Male Population') ``` Get a measure at a single polygon ```SQL -SELECT OBS_GetMeasure(ST_Buffer(CDB_LatLng(40.7, -73.9),0.001), 'Male Population') +SELECT OBS_GetMeasure( + ST_Buffer( + CDB_LatLng(40.7, -73.9)::geography, + 1000)::geometry, + 'Male Population') ```