You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/blocks/01-wrangling.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Use the column selector to pick the columns you want. You can select multiple co
14
14
15
15
The block includes a "distinct" option. When enabled, duplicate rows are removed from the result, keeping only unique combinations of the selected columns.
@@ -28,7 +28,7 @@ Add multiple conditions using the "+ Add Condition" button. Each condition can b
28
28
29
29
For more elaborate filter conditions using comparisons or calculations, use the filter expression block instead.
30
30
31
-

31
+

32
32
33
33
---
34
34
@@ -38,7 +38,7 @@ The filter expression block keeps only rows that meet specific conditions using
38
38
39
39
Supported operators include `>`, `<`, `==`, `!=`, `>=`, `<=` for comparisons, and `%in%` for checking membership in a set of values. Combine multiple conditions using `&` (AND) to require all conditions to be true, or `|` (OR) to require at least one condition to be true. The expression editor provides syntax highlighting and validates your expressions. Examples: `mpg > 20`, `cyl == 4 | cyl == 6`, `hp > 100 & wt < 3`.
40
40
41
-

41
+

42
42
43
43
---
44
44
@@ -50,7 +50,7 @@ When sorting by multiple columns, the order matters. The first column is the pri
50
50
51
51
Add columns using the "+" button and remove them using the "×" button. Toggle between ascending and descending order for each column independently.
52
52
53
-

53
+

54
54
55
55
---
56
56
@@ -62,7 +62,7 @@ For head and tail types, specify the number of rows using n (count) or prop (pro
62
62
63
63
The custom type accepts a rows expression like "1:5" or "c(1, 3, 5, 10)". All slice types support grouping via the by parameter, which performs the slice operation within each group separately.
64
64
65
-

65
+

66
66
67
67
---
68
68
@@ -74,7 +74,7 @@ Use mathematical operators (`+`, `-`, `*`, `/`, `^`) and functions (`sqrt()`, `l
74
74
75
75
Expression order matters: later expressions can reference columns created by earlier expressions in the same mutate block. The by parameter allows grouping, making column references operate within each group. Add expressions with the "+ Add Expression" button and remove them with the "×" button.
76
76
77
-

77
+

78
78
79
79
---
80
80
@@ -86,7 +86,7 @@ Select the existing column from a dropdown to ensure valid column names. Type th
86
86
87
87
The block validates that you don't rename the same column twice and ensures column names don't conflict with existing names.
88
88
89
-

89
+

90
90
91
91
---
92
92
@@ -100,7 +100,7 @@ Use the "Columns to group by" selector to group data before summarizing. When gr
100
100
101
101
For more complex aggregations using custom R expressions, use the summarize expression block instead.
102
102
103
-

103
+

104
104
105
105
---
106
106
@@ -112,7 +112,7 @@ Enter expressions like `mean(mpg)`, `sum(hp)`, `dplyr::n()`, or more complex cal
112
112
113
113
Use the "Columns to group by" selector to group data before summarizing. The "Show advanced options" section provides additional settings like the unpack option for handling functions that return data frames.
114
114
115
-

115
+

116
116
117
117
---
118
118
@@ -124,7 +124,7 @@ Join types: left_join keeps all rows from the left dataset and matching rows fro
124
124
125
125
The "Custom Column Mappings" interface supports both same-name joins (when columns have identical names) and different-name joins (when the matching columns have different names in each dataset). Add multiple join keys to match on multiple columns simultaneously. Enable "Use natural join" to automatically join on all common columns.
126
126
127
-

127
+

128
128
129
129
---
130
130
@@ -136,7 +136,7 @@ Columns are matched by name. If datasets have different columns, the result incl
136
136
137
137
The "Show advanced options" section provides the id_name option which adds an identifier column that tracks which source dataset each row came from. This is useful when combining data from multiple sources and you need to maintain provenance.
@@ -148,7 +148,7 @@ All input datasets must have exactly the same number of rows. The rows are combi
148
148
149
149
If datasets have columns with the same name, they are automatically renamed with numeric suffixes (e.g., "Sepal.Length...1", "Sepal.Length...6") to avoid conflicts.
@@ -166,7 +166,7 @@ Select which columns to pivot. These columns are transformed into two new column
166
166
167
167
The "Show advanced options" section provides names_prefix (removes common prefixes from column names) and values_drop_na (removes rows where the value is NA). This is useful for reshaping time series data, survey responses, or preparing data for visualization.
168
168
169
-

169
+

170
170
171
171
---
172
172
@@ -178,7 +178,7 @@ Select which column contains values for new column names (names_from) and which
178
178
179
179
The "Show advanced options" section provides names_prefix (adds a prefix to new column names) and values_fill (provides a value for missing combinations). This is useful for creating crosstabs, pivot tables, or comparing values across categories.
180
180
181
-

181
+

182
182
183
183
---
184
184
@@ -190,7 +190,7 @@ Select the column to separate and specify the names for the new columns (comma-s
190
190
191
191
The "Show advanced options" section provides remove (whether to remove the input column), convert (whether to convert new columns to appropriate types), and extra/fill options for handling rows with too many or too few pieces.
192
192
193
-

193
+

194
194
195
195
---
196
196
@@ -202,7 +202,7 @@ Select the columns to unite and specify the name for the new combined column. En
202
202
203
203
The "Show advanced options" section provides the remove option (whether to remove the input columns after uniting) and na.rm (whether to remove NA values before uniting).
204
204
205
-

205
+

Copy file name to clipboardExpand all lines: docs/blocks/02-visualisation.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Map columns to the x and y axes to show how variables relate to each other. Add
12
12
13
13
Scatter plots support additional aesthetics including shape (for categorical distinctions) and alpha (transparency). Use alpha values between 0 and 1 to reduce overplotting in dense regions. The block automatically handles scale creation and legend generation for all mapped aesthetics.
@@ -24,7 +24,7 @@ Select a categorical variable for the x axis to create bars for each category. T
24
24
25
25
Bar charts work well for comparing discrete groups, showing distributions of categorical variables, or displaying summary statistics. The block handles count aggregation automatically when no y variable is specified.
26
26
27
-

27
+

28
28
29
29
---
30
30
@@ -36,7 +36,7 @@ Map a sequential variable (like time or age) to the x axis and a continuous vari
36
36
37
37
Line charts support additional aesthetics including linetype for distinguishing groups with different line styles (solid, dashed, dotted) and size for varying line thickness. This visualization is ideal for temporal data, growth curves, and tracking changes over ordered sequences.
38
38
39
-

39
+

40
40
41
41
---
42
42
@@ -48,7 +48,7 @@ Select a categorical variable for x and a continuous variable for y. The box sho
48
48
49
49
Box plots provide a compact summary of distribution shape, central tendency, and variability. They're particularly effective when comparing multiple groups side-by-side, as the aligned boxes make differences in median, spread, and skewness immediately visible.
50
50
51
-

51
+

52
52
53
53
---
54
54
@@ -60,7 +60,7 @@ Like box plots, violin plots require a categorical x variable and continuous y v
60
60
61
61
Violin plots are superior to box plots when you need to see whether distributions are unimodal or multimodal, identify subtle differences in distribution shape, or understand the full data density rather than just quartiles. They're especially valuable with larger datasets where distribution details matter.
@@ -72,7 +72,7 @@ Map a continuous variable to x to create a density curve. The fill aesthetic cre
72
72
73
73
Density plots work well for comparing distributions when you want smooth, continuous representations rather than binned histograms. They're particularly effective with the alpha aesthetic set to 0.5-0.7, which makes overlapping distributions easy to distinguish. Use them to compare distribution shapes, identify modes, or assess whether groups follow similar patterns.
@@ -84,7 +84,7 @@ Like line charts, area charts map sequential data to x and continuous values to
84
84
85
85
Area charts work best when the filled space has meaning, such as cumulative quantities, market shares, or resource allocation over time. The alpha aesthetic (0.6-0.8) is particularly important when comparing overlapping areas, as it allows all curves to remain visible while still emphasizing volume.
86
86
87
-

87
+

88
88
89
89
---
90
90
@@ -96,7 +96,7 @@ Select a continuous variable for x. The block automatically creates bins and cou
96
96
97
97
Histograms are fundamental for exploratory data analysis: assessing whether data follows a normal distribution, identifying skewness or multimodality, detecting outliers, and understanding data range. Experiment with bin counts to find the right level of detail for your data's density and range.
@@ -108,7 +108,7 @@ Map a categorical variable to x and a numeric value to y. Each category becomes
108
108
109
109
While controversial among data visualization experts who prefer bar charts for precise comparisons, pie charts remain intuitive for showing simple proportions, especially when one category dominates or when emphasizing that parts constitute a whole. Keep categories limited and consider using a donut chart variant for a modern aesthetic.
110
110
111
-

111
+

112
112
113
113
---
114
114
@@ -120,7 +120,7 @@ Configure exactly like pie charts, but set donut_hole to a value between 0.3 and
120
120
121
121
The empty center draws attention and can be used strategically to display total values, titles, or key metrics. The ring shape also makes it slightly easier to compare arc lengths than full pie slices, as the curves are more linear. Use donut charts when aesthetics matter or when you want to emphasize the ring pattern over the center point.
122
122
123
-

123
+

124
124
125
125
---
126
126
@@ -132,7 +132,7 @@ Select a facet variable to create a separate panel for each unique value. The nc
132
132
133
133
Facet wrap works well with 3-15 groups where you want to see each group's pattern separately while maintaining visual comparison. It automatically handles scales: by default all facets share the same x and y scales for easy comparison, though you can set scales to "free" for independent axes. Use this for comparing patterns across time periods, regions, or categories.
134
134
135
-

135
+

136
136
137
137
---
138
138
@@ -144,7 +144,7 @@ Select variables for facet_rows and facet_cols to create a rows × columns layou
144
144
145
145
Facet grid is powerful for experimental designs with multiple factors, comparing subgroups across time periods, or any situation where data is naturally organized by two categorical variables. The grid structure reveals interaction effects and makes systematic comparisons straightforward. Keep factor levels reasonable (typically 2-5 levels per dimension) to maintain readability.
@@ -156,7 +156,7 @@ Select from over 20 built-in themes including classic ggplot2 themes (theme_mini
156
156
157
157
Themes control non-data elements: backgrounds, grid lines, axis styling, legend appearance, and text formatting. Apply a theme block after visualization blocks to style the entire plot consistently. Common choices include theme_minimal for clean presentations, theme_classic for publication-ready plots, and theme_dark for emphasis or presentations on dark backgrounds.
158
158
159
-

159
+

160
160
161
161
---
162
162
@@ -168,7 +168,7 @@ Select a layout style (horizontal, vertical, or grid) and specify the number of
168
168
169
169
Grid composition is essential for complex figures that tell a complete story through multiple related views. Each input can be a complete visualization pipeline, allowing you to combine different chart types, subsets, or transformations. This is particularly powerful for academic papers, reports, or dashboards where you need to present multiple coordinated views.
Copy file name to clipboardExpand all lines: docs/concepts/01-reactivity.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,12 +17,12 @@ blockr did not invent reactivity! blockr is built on the [Shiny](https://shiny.p
17
17
If you have already completed the [Build a dashboard](../../learn/02-build-a-dashboard) tutorial, you have already seen reactivity in action.
18
18
In that tutorial you learnt how to build a simple dashboard which uses a filter to update a plot on penguins:
19
19
20
-

20
+

21
21
22
22
Let's zoom into the workflow to better understand what is going on.
23
23
Here, we can see that as one block updates, all downstream blocks update:
24
24
25
-

25
+

26
26
27
27
In this example, this results in only a single block updating.
28
28
@@ -31,20 +31,20 @@ In other words, it comes after it in the workflow.
31
31
If data flows from A → B → C, then B and C are both downstream of A.
32
32
This means that for complicated workflows, a change higher up the workflow can result in many blocks being updated:
33
33
34
-

34
+

35
35
36
36
Note that upstream blocks never get updated.
37
37
In our simple example, this means that our data block does **not** get updated, because it is upstream of our filter block:
38
38
39
-

39
+

40
40
41
41
## Errors
42
42
43
43
Sometimes updating a block can causes errors downstream.
44
44
45
45
For example, again using our simple penguins dashboard, if we update the dataset block to use a dataset other than penguins, it will causes errors downstream:
46
46
47
-

47
+

48
48
49
49
This happens because the downstream filter and plot blocks user variables from the penguins dataset.
50
50
When this dataset changes, these variables are no longer available and so the downstream blocks error to let us know they are trying to use variables that no longer exist.
Copy file name to clipboardExpand all lines: docs/dev/create-block.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@
2
2
3
3
<VideoEmbedid="-PdixmAscQI"title="Creating blocks in blockr" />
4
4
5
-
Write custom blocks in pure R to extend blockr with your own logic. A block is a specialized Shiny module that returns an **expression** (the R code it generates) and a **state** (its current input values).
5
+
Write custom blocks in pure R to extend blockr with your own logic. A block is a specialized Shiny module that returns an **expression** (the R code it generates) and a **state** (its current input values). A workflow is a Shiny app composed of connected blocks.
6
+
7
+
Blocks should live in an R package so they can be registered, shared, and tested. The examples below show the package-based approach.
Most users access blockr through [blockr.cloud](https://blockr.cloud) and don't need to install anything. If you want to run blockr locally, follow the steps below.
4
+
5
+
## Prerequisites
6
+
7
+
You need [R](https://www.r-project.org/) (version 4.1 or later) installed on your system.
8
+
9
+
## Install blockr
10
+
11
+
```r
12
+
install.packages("blockr")
13
+
```
14
+
15
+
## Run blockr
16
+
17
+
```r
18
+
blockr::run_app()
19
+
```
20
+
21
+
This opens an empty blockr canvas in your browser. From here you can add blocks, connect them, and build workflows just like on blockr.cloud.
22
+
23
+
## Next steps
24
+
25
+
-[Build your first app](01-build-your-first-app): a step-by-step tutorial to get started
0 commit comments