Description Usage Arguments References Examples
Query for data from the CSTMC (Canadian Science & Technology Museum Corporation)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | cstmc_changes(offset = 0, limit = 31, as = "list", ...)
cstmc_datasets(offset = 0, limit = 31, as = "list", ...)
cstmc_group_list(
offset = 0,
limit = 31,
sort = NULL,
groups = NULL,
all_fields = FALSE,
as = "list",
...
)
cstmc_group_show(id, include_datasets = TRUE, as = "list", ...)
cstmc_tag_list(
query = "*:*",
vocabulary_id = NULL,
all_fields = FALSE,
as = "list",
...
)
cstmc_tag_show(id, as = "list", ...)
cstmc_package_search(
q = "*:*",
fq = NULL,
sort = NULL,
rows = NULL,
start = NULL,
facet = FALSE,
facet.limit = NULL,
facet.field = NULL,
as = "list",
...
)
cstmc_package_show(id, use_default_schema = FALSE, as = "list", ...)
cstmc_resource_search(
q = "*:*",
sort = NULL,
offset = NULL,
limit = NULL,
as = "list",
...
)
|
offset |
Record to start at, default to beginning. |
limit |
Number of records to return. |
as |
(character) One of list (default), table, or json. Parsing with
table option uses |
... |
Curl args passed on to |
sort |
Field to sort on. You can specify ascending (e.g., score desc) or
descending (e.g., score asc), sort by two fields (e.g., score desc,
price asc), or sort by a function (e.g., |
groups |
(character) A list of names of the groups to return, if given only groups whose names are in this list will be returned |
all_fields |
(logical) Return full tag or group dictionaries instead of
just names. Default: |
id |
(character) The name or id of the tag |
include_datasets |
(logical) Include a list of the group's datasets.
Default: |
query |
(character) A tag name query to search for, if given only tags whose names contain this string will be returned |
vocabulary_id |
(character) The id or name of a vocabulary, if give only tags that belong to this vocabulary will be returned |
q |
Query terms, defaults to ':', or everything. It is a string of
the form |
fq |
Filter query, this does not affect the search, only what gets returned |
rows |
Number of records to return. Defaults to 10. |
start |
Record to start at, default to beginning. |
facet |
(logical) Whether to return facet results or not.
Default: |
facet.limit |
(numeric) This param indicates the maximum number of constraint counts that should be returned for the facet fields. A negative value means unlimited. Default: 100. Can be specified on a per field basis. |
facet.field |
(charcter) This param allows you to specify a field which should be treated as a facet. It will iterate over each Term in the field and generate a facet count using that Term as the constraint. This parameter can be specified multiple times to indicate multiple facet fields. None of the other params in this section will have any effect without specifying at least one field name using this param. |
use_default_schema |
(logical) Use default package schema instead of a
custom schema defined with an IDatasetForm plugin. Default: |
http://data.techno-science.ca/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ## Not run:
# Changes
cstmc_changes()
cstmc_changes(as='json')
cstmc_changes(as='table')
# List datasets
cstmc_datasets()
# List groups
cstmc_group_list()
# Show groups
cstmc_group_show('communications')
# List tags
cstmc_tag_list('aviation')
# Show tags
cstmc_tag_show('Aviation')
# Search for packages
cstmc_package_search(q = '*:*')
cstmc_package_search(q = '*:*', rows = 2, as='json')
cstmc_package_search(q = '*:*', rows = 2, as='table')
cstmc_package_search(q = '*:*', sort = 'score asc')
cstmc_package_search(q = '*:*', fq = 'num_tags:[3 TO *]')$count
# Show packages
cstmc_package_show('34d60b13-1fd5-430e-b0ec-c8bc7f4841cf')
cstmc_package_show('34d60b13-1fd5-430e-b0ec-c8bc7f4841cf', as='json')
cstmc_package_show('34d60b13-1fd5-430e-b0ec-c8bc7f4841cf', as='table')
cstmc_package_show('34d60b13-1fd5-430e-b0ec-c8bc7f4841cf', TRUE)
# Search for resources
cstmc_resource_search(q = 'name:data')
cstmc_resource_search(q = 'name:data', as='json')
cstmc_resource_search(q = 'name:data', as='table')
cstmc_resource_search(q = 'name:data', limit = 2, as='table')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.