Reactivity
3.1 Reactive Calc
Extract the account filtering logic into a reactive calculation.
Extract the account filtering logic into a reactive calculation.
Extract the account filtering logic into a reactive calculation.
The source code for this exercise is here.
3.2 Stacking Reactives
We have a second sidebar input which allows the user to filter the dataset by the number of characters in the text
field. Add a second reactive calculation to the app which filters the account_data()
reactive.
For reference input.chars()
returns a tuple with the lower and upper range of a value, and you can filter the data frame with: df[df["text"].str.len().between(*input.chars())]
.
We have a second sidebar input which allows the user to filter the dataset by the number of characters in the text
field. Add a second reactive calculation to the app which filters the account_data()
reactive.
For reference input.chars()
returns a tuple with the lower and upper range of a value, and you can filter the data frame with: df[df["text"].str.len().between(*input.chars())]
.
We have a second sidebar input which allows the user to filter the dataset by the number of characters in the text
field. Add a second reactive calculation to the app which filters the account_data()
reactive.
For reference input.chars()
returns a tuple with the lower and upper range of a value, and you can filter the data frame with: df[df["text"].str.len().between(*input.chars())]
.
The source code for this exercise is here.