get_hub2_table | R Documentation |
get_hub2_table allows the programmer to retrieve a data table from the CLESSN hub2 data warehouse. ** WARNING hub2 will be decommissionned by end of 2022 **
get_hub2_table(table_name, data_filter = NULL, max_pages = -1, hub_conf)
table_name |
The name of the table to retrieve from the hub2 warehouse |
data_filter |
A list containing the filters to apply against the query to retrieve the data. Only observations in the table complyingw with the filter conditions will be returned |
max_pages |
The number of pages to return. A page is 1000 rows. Tu return the entire table use max_pages = -1 |
hub_conf |
The hub2.0 credentials obtained from the clessnhub::login function |
returns a dataframe containing the data warehouse table content
## Not run:
clessnhub::login(
Sys.getenv("HUB_USERNAME"),
Sys.getenv("HUB_PASSWORD"),
Sys.getenv("HUB_URL"))
# get the journalists intervention in press conference from the
# 'agoraplus_interventions' table from hub2
data_filter = list(
type = "press_conference",
metadata__location = "CA-QC",
data__speakerType = "journalist",
data__eventDate__gte = "2021-01-01",
data__eventDate__lte = "2022-06-23"
)
df <- clessnverse::get_hub2_table(
table_name = 'agoraplus_interventions',
data_filter = data_filter,
max_pages = -1,
hub_conf = hub_config
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.