Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add download dataset example and rename its folder #1634

Merged
merged 3 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cartoframes/data/observatory/catalog/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ def to_csv(self, file_path, credentials=None, limit=None, order_by=None, sql_que
a default credentials (if set with :py:meth:`set_default_credentials
<cartoframes.auth.set_default_credentials>`) will be used.
sql_query (str, optional): a query to select, filter or aggregate the content of the dataset.
For instance, to download just one row: `select * from {dataset} limit 1`. The placeholder
`{dataset}` is mandatory and it will be replaced by the actual dataset before running the query.
For instance, to download just one row: `select * from $dataset$ limit 1`. The placeholder
`$dataset$` is mandatory and it will be replaced by the actual dataset before running the query.
You can build any arbitrary query.
add_geom (boolean, optional): to include the geography when using the `sql_query` argument. Default to True.

Expand Down Expand Up @@ -420,8 +420,8 @@ def to_dataframe(self, credentials=None, limit=None, order_by=None, sql_query=No
a default credentials (if set with :py:meth:`set_default_credentials
<cartoframes.auth.set_default_credentials>`) will be used.
sql_query (str, optional): a query to select, filter or aggregate the content of the dataset.
For instance, to download just one row: `select * from {dataset} limit 1`. The placeholder
`{dataset}` is mandatory and it will be replaced by the actual dataset before running the query.
For instance, to download just one row: `select * from $dataset$ limit 1`. The placeholder
`$dataset$` is mandatory and it will be replaced by the actual dataset before running the query.
You can build any arbitrary query.
add_geom (boolean, optional): to include the geography when using the `sql_query` argument. Default to True.

Expand Down
8 changes: 4 additions & 4 deletions cartoframes/data/observatory/catalog/geography.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ def to_csv(self, file_path, credentials=None, limit=None, order_by=None, sql_que
a default credentials (if set with :py:meth:`set_default_credentials
<cartoframes.auth.set_default_credentials>`) will be used.
sql_query (str, optional): a query to select, filter or aggregate the content of the geography dataset.
For instance, to download just one row: `select * from {geography} limit 1`. The placeholder
`{geography}` is mandatory and it will be replaced by the actual geography dataset before running
For instance, to download just one row: `select * from $geography$ limit 1`. The placeholder
`$geography$` is mandatory and it will be replaced by the actual geography dataset before running
the query. You can build any arbitrary query.

Raises:
Expand Down Expand Up @@ -222,8 +222,8 @@ def to_dataframe(self, credentials=None, limit=None, order_by=None, sql_query=No
a default credentials (if set with :py:meth:`set_default_credentials
<cartoframes.auth.set_default_credentials>`) will be used.
sql_query (str, optional): a query to select, filter or aggregate the content of the geography dataset.
For instance, to download just one row: `select * from {geography} limit 1`. The placeholder
`{geography}` is mandatory and it will be replaced by the actual geography dataset before running
For instance, to download just one row: `select * from $geography$ limit 1`. The placeholder
`$geography$` is mandatory and it will be replaced by the actual geography dataset before running
the query. You can build any arbitrary query.

Returns:
Expand Down
19 changes: 12 additions & 7 deletions docs/developer-center/examples/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -340,30 +340,35 @@
"path": "data_services"
}]
}, {
"title": "Data enrichment",
"desc": "Learn how to augment your public and private datasets through spatial operations and CARTO's Data Observatory",
"file": "data_enrichment.md",
"title": "Data Observatory",
"desc": "Learn how to discover third party datasets and enrich your data through CARTO's Data Observatory",
"file": "data_observatory.md",
"hide_sidebar_samples": true,
"samples": [{
"title": "Discover a dataset",
"desc": "Basic steps to discover a Dataset in the Data Observatory",
"file": "discover_dataset",
"path": "data_enrichment"
"path": "data_observatory"
}, {
"title": "Download a dataset",
"desc": "Download a dataset applying filters",
"file": "download_dataset",
"path": "data_observatory"
}, {
"title": "Enrich points",
"desc": "Use the enrichment to enrich points for a dataset",
"file": "points_enrichment_dataset",
"path": "data_enrichment"
"path": "data_observatory"
}, {
"title": "Enrich polygons",
"desc": "Use the enrichment to enrich polygons for a dataset",
"file": "polygons_enrichment_dataset",
"path": "data_enrichment"
"path": "data_observatory"
}, {
"title": "Subscribe to a premium dataset",
"desc": "Basic steps to subscribe to a premium dataset in the Data Observatory to start enriching your data",
"file": "enrichment_subscription_workflow",
"path": "data_enrichment"
"path": "data_observatory"
}]
}, {
"title": "Publish and share",
Expand Down
Loading