soc_discover | R Documentation |
Provides access to the Socrata Discovery API, allowing you to search tens of thousands of government datasets and assets published on the Socrata platform. Governments at all levels publish data on topics including crime, permits, finance, healthcare, research, and performance.
soc_discover(
attribution = NULL,
categories = NULL,
domain_category = NULL,
domains = NULL,
ids = NULL,
names = NULL,
only = "dataset",
provenance = NULL,
query = NULL,
tags = NULL,
domain_tags = NULL,
location = "us",
limit = 10000
)
attribution |
string; Filter by the attribution or publisher |
categories |
character vector; Filter by categories. |
domain_category |
string; Filter by domain category (requires a specified domain). |
domains |
character vector; Filter to domains. |
ids |
character vector; Filter by an asset IDs. |
names |
character vector; Filter by asset names. |
only |
character vector; Filter to specific asset types. Must be one or more of: |
provenance |
string; Filter by provenance: |
query |
character string; Filter using a a token matching one from an asset's name, description, category, tags, column names, column fieldnames, column descriptions or attribution. |
tags |
character vector; Filter by tags associated with the assets. |
domain_tags |
string; Filter by domain tags associated with the assets (requires a specified domain). |
location |
string; Regional API domain: |
limit |
whole number; Maximum number of results (cannot exceed 10,000). |
A tibble containing metadata for each discovered asset. Columns include:
Asset identifier (four-by-four ID).
Asset name.
Attribution or publisher of the asset.
Display name of the asset owner.
Provenance of asset (official or community).
Textual description of the asset.
Date asset was created.
Date asset data was last updated
Date asset metadata was last updated
Category labels assigned to the asset.
Tags associated with the asset.
Category label assigned by the domain.
Tags applied by the domain.
Metadata associated with the asset assigned by the domain.
Names of asset columns.
Labels of asset columns.
Datatypes of asset columns.
Description of asset columns.
Permanent URL where the asset can be accessed.
Direct asset link.
License associated with the asset.
https://dev.socrata.com/docs/other/discovery
# Search for crime-related datasets in the Public Safety category
results <- soc_discover(
query = "crime",
categories = "Public Safety",
only = "dataset"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.