Update methods.md
removed JSON response stuff
This commit is contained in:
parent
f8ab20c8aa
commit
eda10dfa61
@ -18,27 +18,24 @@ normalize | for measures that are are **sums** (e.g. population) the default nor
|
|||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
A JSON object containing the following properties
|
A NUMERIC value containing the following properties
|
||||||
|
|
||||||
Key | Description
|
Key | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
value | the raw or normalized measure
|
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
|
#### Example
|
||||||
|
|
||||||
Add a Measure to an empty column based on point locations in your table
|
Add a Measure to an empty column based on point locations in your table
|
||||||
|
|
||||||
```SQL
|
```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
|
Get a measure at a single point location
|
||||||
|
|
||||||
```SQL
|
```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')
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@ -60,27 +57,24 @@ normalize | for measures that are are **sums** (e.g. population) the default nor
|
|||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
A JSON object containing the following properties
|
A NUMERIC value
|
||||||
|
|
||||||
Key | Description
|
Key | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
value | the raw or normalized measure
|
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
|
#### Example
|
||||||
|
|
||||||
Add a Measure to an empty column based on polygons in your table
|
Add a Measure to an empty column based on polygons in your table
|
||||||
|
|
||||||
```SQL
|
```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 polygon
|
Get a measure at a single polygon
|
||||||
|
|
||||||
```SQL
|
```SQL
|
||||||
SELECT * FROM json_each(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),0.001), 'Male Population')
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@ -101,27 +95,24 @@ normalize | for measures that are are **sums** (e.g. population) the default nor
|
|||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
A JSON object containing the following properties
|
A NUMERIC value
|
||||||
|
|
||||||
Key | Description
|
Key | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
value | the raw or normalized measure
|
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
|
#### Example
|
||||||
|
|
||||||
Add a Measure to an empty column based on point locations in your table
|
Add a Measure to an empty column based on point locations in your table
|
||||||
|
|
||||||
```SQL
|
```SQL
|
||||||
UPDATE tablename SET local_male_population = OBS_GetMeasure(the_geom, '"us.census.acs".B08134006') -> 'value'
|
UPDATE tablename SET local_male_population = OBS_GetMeasure(the_geom, '"us.census.acs".B08134006')
|
||||||
```
|
```
|
||||||
|
|
||||||
Get a measure at a single point location
|
Get a measure at a single point location
|
||||||
|
|
||||||
```SQL
|
```SQL
|
||||||
SELECT * FROM json_each(OBS_GetMeasure(CDB_LatLng(40.7, -73.9), '"us.census.acs".B08134006'))
|
SELECT OBS_GetMeasure(CDB_LatLng(40.7, -73.9), '"us.census.acs".B08134006')
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@ -143,27 +134,26 @@ normalize | for measures that are are **sums** (e.g. population) the default nor
|
|||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
A JSON object containing the following properties
|
A NUMERIC value
|
||||||
|
|
||||||
Key | Description
|
Key | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
value | the raw or normalized measure
|
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
|
#### Example
|
||||||
|
|
||||||
Add a Measure to an empty column based on polygons in your table
|
Add a Measure to an empty column based on polygons in your table
|
||||||
|
|
||||||
```SQL
|
```SQL
|
||||||
UPDATE tablename SET local_male_population = OBS_GetMeasure(the_geom, '"us.census.acs".B08134006') -> 'value'
|
UPDATE tablename SET local_male_population = OBS_GetMeasure(the_geom, '"us.census.acs".B08134006')
|
||||||
```
|
```
|
||||||
|
|
||||||
Get a measure within a polygon
|
Get a measure within a polygon
|
||||||
|
|
||||||
```SQL
|
```SQL
|
||||||
SELECT * FROM json_each(OBS_GetMeasure(ST_Buffer(CDB_LatLng(40.7, -73.9),0.001), '"us.census.acs".B08134006'))
|
SELECT OBS_GetMeasure(ST_Buffer(CDB_LatLng(40.7, -73.9),0.001), '"us.census.acs".B08134006')
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
Loading…
Reference in New Issue
Block a user