src_ckan: Connect to CKAN with dplyr

View source: R/dplyr.R

src_ckanR Documentation

Connect to CKAN with dplyr

Description

Use src_ckan to connect to an existing CKAN instance and tbl to connect to tables within that CKAN based on the DataStore Data API.

Usage

src_ckan(url)

Arguments

url,

the url of the CKAN instance

Examples

## Not run: 
library("dplyr")

# To connect to a CKAN instance first create a src:
my_ckan <- src_ckan("http://demo.ckan.org")

# List all tables in the CKAN instance
db_list_tables(my_ckan$con)

# Then reference a tbl within that src
my_tbl <- tbl(src = my_ckan, name = "44d7de5f-7029-4f3a-a812-d7a70895da7d")

# You can use the dplyr verbs with my_tbl. For example:
dplyr::filter(my_tbl, GABARITO == "C")


## End(Not run)

ropensci/ckanr documentation built on March 25, 2023, 12:01 p.m.