From eda10dfa61bb84fac3670ffe7a024c92788eda2a Mon Sep 17 00:00:00 2001 From: "Andrew W. Hill" Date: Mon, 25 Apr 2016 10:48:01 -0400 Subject: [PATCH] Update methods.md removed JSON response stuff --- doc/methods.md | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/doc/methods.md b/doc/methods.md index 8d52e44..8e1ae08 100644 --- a/doc/methods.md +++ b/doc/methods.md @@ -18,27 +18,24 @@ normalize | for measures that are are **sums** (e.g. population) the default nor #### Returns -A JSON object containing the following properties +A NUMERIC value containing the following properties Key | Description --- | --- value | the raw or normalized measure -name | the human readable name of the measure -description | a brief description of the measure -type | the data type (text, number, boolean) #### Example 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') -> 'value' +UPDATE tablename SET local_male_population = OBS_GetUSCensusMeasure(the_geom, 'Male Population') ``` Get a measure at a single point location ```SQL -SELECT * FROM json_each(OBS_GetUSCensusMeasure(CDB_LatLng(40.7, -73.9), 'Male Population')) +SELECT OBS_GetUSCensusMeasure(CDB_LatLng(40.7, -73.9), 'Male Population') ```