Description Usage Arguments Details Value Examples
dpColumnPlotsR
calculates the values for column level plots.
1 2 | dpColumnPlotsR(in_project_id, in_table_id, input_tbl, dp_col_prop,
max_levels = 12)
|
in_project_id |
character The UUID ID for the project in which this table is to be included. |
in_table_id |
integer The table sequence number for table to analize. |
input_tbl |
data.frame The data frame to analize. |
dp_col_prop |
data.frame The data frame with the column properties of
|
max_levels |
= 12 The maximum number of levals to include in a catigorical plot |
This design separates the plot data generation for plotting. There are two advantages of this design. First, for large data we want to offload the calculation to the data platform so we only get back reduced data. Secondly, different report designs will require unique plot aesthetics.
Generates the data for a bar or histogram plot. Note x_var
is a character and
should be converted to numeric when ploting a histogram.
For DBMS resident data you should use dpColumnPlotsR
to avoid downloading all
rows to R.
data.frame with a row for each column in input_tbl and columns:
project_id - UUID of project with this table
table_id - of table with these columns
column_id - integer sequence of column
plot_id - intially = 1; may eventually have more than one plot per column
plot_type - one of ["catigorical", "first character", "histogram"]
x_var character - label of the bar
count integer - number of rows in bar's value or range
1 2 3 4 5 6 7 8 | ## Not run:
dpProjID <- dpTables$project_id[1]
dpTblID <- 1
Tbl <- read_csv(dpTables$table_source[dpTblID])
dpColProp <- dpColumnPropertiesR(dpProjID, dpTblID, Tbl)
dpColPlts <- dpColumnPlotsR(dpProjID, dpTblID, Tbl, dpColProp)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.