adds caveats about usage
This commit is contained in:
+16
-4
@@ -29,6 +29,12 @@ A table with the following columns.
|
|||||||
| vals | NUMERIC | Values from `'column_name'`. |
|
| vals | NUMERIC | Values from `'column_name'`. |
|
||||||
|
|
||||||
|
|
||||||
|
#### Notes
|
||||||
|
|
||||||
|
* Rows will null values will be omitted from this analysis. To ensure they are added to the analysis, fill the null-valued cells with an appropriate value such as the mean of a column, the mean of the most recent two time steps, or use a `LEFT JOIN` to get null outputs from the analysis.
|
||||||
|
* Input query can only accept tables (datasets) in the users database account. Common table expressions (CTEs) do not work as an input unless specified in the `subquery` parameter.
|
||||||
|
|
||||||
|
|
||||||
#### Example Usage
|
#### Example Usage
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
@@ -37,8 +43,8 @@ SELECT
|
|||||||
aoi.quads,
|
aoi.quads,
|
||||||
aoi.significance,
|
aoi.significance,
|
||||||
c.num_cyclists_per_total_population
|
c.num_cyclists_per_total_population
|
||||||
FROM CDB_AreasOfInterestLocal('SELECT * FROM commute_data'
|
FROM CDB_AreasOfInterestLocal('SELECT * FROM commute_data',
|
||||||
'num_cyclists_per_total_population') As aoi
|
'num_cyclists_per_total_population') As aoi
|
||||||
JOIN commute_data As c
|
JOIN commute_data As c
|
||||||
ON c.cartodb_id = aoi.rowid;
|
ON c.cartodb_id = aoi.rowid;
|
||||||
```
|
```
|
||||||
@@ -105,6 +111,12 @@ A table with the following columns.
|
|||||||
| vals | NUMERIC | Values from `'column_name'`. |
|
| vals | NUMERIC | Values from `'column_name'`. |
|
||||||
|
|
||||||
|
|
||||||
|
#### Notes
|
||||||
|
|
||||||
|
* Rows will null values will be omitted from this analysis. To ensure they are added to the analysis, fill the null-valued cells with an appropriate value such as the mean of a column, the mean of the most recent two time steps, or use a `LEFT JOIN` to get null outputs from the analysis.
|
||||||
|
* Input query can only accept tables (datasets) in the users database account. Common table expressions (CTEs) do not work as an input unless specified in the `subquery` parameter.
|
||||||
|
|
||||||
|
|
||||||
#### Example Usage
|
#### Example Usage
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
@@ -114,8 +126,8 @@ SELECT
|
|||||||
aoi.significance,
|
aoi.significance,
|
||||||
c.cyclists_per_total_population
|
c.cyclists_per_total_population
|
||||||
FROM CDB_AreasOfInterestLocalRate('SELECT * FROM commute_data'
|
FROM CDB_AreasOfInterestLocalRate('SELECT * FROM commute_data'
|
||||||
'num_cyclists',
|
'num_cyclists',
|
||||||
'total_population') As aoi
|
'total_population') As aoi
|
||||||
JOIN commute_data As c
|
JOIN commute_data As c
|
||||||
ON c.cartodb_id = aoi.rowid;
|
ON c.cartodb_id = aoi.rowid;
|
||||||
```
|
```
|
||||||
|
|||||||
+8
-1
@@ -8,7 +8,7 @@ This function takes time series data associated with geometries and outputs like
|
|||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
|------|------|-------------|
|
|------|------|-------------|
|
||||||
| subquery | TEXT | SQL query that exposes the data to be analyzed (e.g., `SELECT * FROM real_estate_history`). This query must have the geometry column name `the_geom` and id column name `cartodb_id` unless otherwise specified in the input arguments |
|
| subquery | TEXT | SQL query that exposes the data to be analyzed (e.g., `SELECT * FROM real_estate_history`). This query must have the geometry column name `the_geom` and id column name `cartodb_id` unless otherwise specified in the input arguments. Tables in queries must exist in user's database (i.e., no CTEs at present) |
|
||||||
| column_names | TEXT Array | Names of column that form the history of measurements for the geometries (e.g., `Array['y2011', 'y2012', 'y2013', 'y2014', 'y2015', 'y2016']`). |
|
| column_names | TEXT Array | Names of column that form the history of measurements for the geometries (e.g., `Array['y2011', 'y2012', 'y2013', 'y2014', 'y2015', 'y2016']`). |
|
||||||
| num_classes (optional) | INT | Number of quantile classes to separate data into. |
|
| num_classes (optional) | INT | Number of quantile classes to separate data into. |
|
||||||
| weight type (optional) | TEXT | Type of weight to use when finding neighbors. Currently available options are 'knn' (default) and 'queen'. Read more about weight types in [PySAL's weights documentation](https://pysal.readthedocs.io/en/v1.11.0/users/tutorials/weights.html). |
|
| weight type (optional) | TEXT | Type of weight to use when finding neighbors. Currently available options are 'knn' (default) and 'queen'. Read more about weight types in [PySAL's weights documentation](https://pysal.readthedocs.io/en/v1.11.0/users/tutorials/weights.html). |
|
||||||
@@ -30,12 +30,19 @@ A table with the following columns.
|
|||||||
| rowid | NUMERIC | id of the row that corresponds to the `id_col` (by default `cartodb_id` of the input rows) |
|
| rowid | NUMERIC | id of the row that corresponds to the `id_col` (by default `cartodb_id` of the input rows) |
|
||||||
|
|
||||||
|
|
||||||
|
#### Notes
|
||||||
|
|
||||||
|
* Rows will null values will be omitted from this analysis. To ensure they are added to the analysis, fill the null-valued cells with an appropriate value such as the mean of a column, the mean of the most recent two time steps, etc.
|
||||||
|
* Input query can only accept tables (datasets) in the users database account. Common table expressions (CTEs) do not work as an input unless specified in the `subquery` parameter.
|
||||||
|
|
||||||
|
|
||||||
#### Example Usage
|
#### Example Usage
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
SELECT
|
SELECT
|
||||||
c.cartodb_id,
|
c.cartodb_id,
|
||||||
c.the_geom,
|
c.the_geom,
|
||||||
|
c.the_geom_webmercator,
|
||||||
m.trend,
|
m.trend,
|
||||||
m.trend_up,
|
m.trend_up,
|
||||||
m.trend_down,
|
m.trend_down,
|
||||||
|
|||||||
Reference in New Issue
Block a user