Table-class: A reference class to apply an API key to the other functions...

Table-classR Documentation

A reference class to apply an API key to the other functions in this package

Description

Once a referece class is set, a user does not need to repeatedly put an API key into a function. An API key can be obtained after submitting an API request form in the sign-up website (http://eventdata.utdallas.edu/signup). Please follow the direction in the UTD sign-up webpage.

Fields

utd_api_key

A character vector

Methods

DataTables()

This function returns the names of data tables.

Return Value

a list of a data table

pullData(table_name, country, start, end)

This is the main function to extract subdata from the UTD Event data server by country names and time ranges.

Parameters

  • table_name a name of data table.

  • country a list of countires with the ISO code format or full names.

  • start a string format of yyyymmdd as a starting date of a data set

  • end a string format of yyymmdd as an end date of a data set

Return Value

real-time data or subseted data

tableVar(table = "table_name", lword = " ")

This function returns the variable list a spcified data set.

Parameters

  • table data table name a user wants.

  • lword a look-up word of variable names.

Return Value

a list of variables in a data table

Examples

## Not run: # creating an object
obj<-Table$new()
# setting an object of an API key
obj$setAPIKey("....")
# once the object of an API is set, a user no need to repeat typing an API key
obj$DataTable()  # returns the available data tables in the UTD server
# to subset real-time data ('phoenix_rt') from 20171101 to 20171102 on MEX (Mexico)
obj$pullData("Phoenix_rt", list("MEX"),start="20171101", end="20171102")
## End(Not run)

KateHyoung/UTDEventData documentation built on Nov. 16, 2022, 2:29 p.m.