Skip to content

Commit

Permalink
Merge pull request #1634 from CartoDB/do_download_example
Browse files Browse the repository at this point in the history
Add download dataset example and rename its folder
  • Loading branch information
Jesus89 authored May 12, 2020
2 parents a0e50f8 + c8eb32a commit 31390f5
Show file tree
Hide file tree
Showing 8 changed files with 8,151 additions and 262 deletions.
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 @@ -346,30 +346,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

0 comments on commit 31390f5

Please sign in to comment.