get_cebrap_table: Get tables from Cebrap's Database

Description Usage Arguments Note Examples

View source: R/queries.R

Description

get_cebrap_table() fetches tables from the Cebrap's Brazilian Legislative Database. To use it, users must provide the name of an actual table in the database and the function will handle the SQL queries under the hood. Is it also possible to customize the function call to select just a sample of rows or the name of the columns.

Usage

1
get_cebrap_table(conn, table, head = TRUE, verbose = TRUE)

Arguments

conn

A JDBC connection object created by the set_connection function

table

A string with the name of an existing table in Cebrap's Database

head

Should the function return only the five first rows from the table? To save server resources, this defaults to TRUE

verbose

Should the function display messages? Defaults to TRUE

Note

Currently, get_cebrap_table() only works with the Congresso_BE database.

Examples

1
2
3
4
5
6
## Not run: 
# Request a table
conn <- set_connection(login = "login", password = "pass")
senadores <- get_cebrap_table(conn, "tbl_Sen")

## End(Not run)

nipe-cebrap/cebrapdata documentation built on Dec. 22, 2021, 2:17 a.m.