Comments (3)
These cases are solved in the refactor-test
branch (original comment updated only to include cases that still don't work). Some of these animations are a bit hectic, but focus is on handling the logic properly and frames for each stage, rather than on the tweening itself
summarise without grouping
library(datamations)
library(dplyr)
datamation_sanddance("small_salary %>% summarize(mean = mean(Salary))")
grouping variable contains _
library(dplyr)
library(datamations)
small_salary_eg <- small_salary %>%
mutate(highest_degree = Degree)
datamation_sanddance(
pipeline = "small_salary_eg %>% group_by(highest_degree)",
)
grouping variable value contains _
library(dplyr)
library(datamations)
small_salary_eg <- small_salary %>%
mutate(degreework = paste0(Degree, "_", Work))
datamation_sanddance(
pipeline = "small_salary_eg %>% group_by(degreework)")
and .
case works too:
library(dplyr)
library(datamations)
small_salary_eg <- small_salary %>%
mutate(degreework = paste0(Degree, ".", Work))
datamation_sanddance(
pipeline = "small_salary_eg %>% group_by(degreework)")
no variation in a group's values (e.g. all the same, or only one value per group)
(mainly works because I've removed the error bars for now)
library(dplyr)
library(datamations)
datamation_sanddance("mtcars %>% group_by(carb, gear) %>% summarise(wt = mean(wt))")
from datamations.
More cases that work now:
data contained in first verb rather than piped in
This is now supported. The data is parsed out and moved to the first position. Some tests for this as well.
library(datamations)
"small_salary %>% group_by(Degree) %>% summarize(mean = mean(Salary))" %>%
parse_pipeline()
#> [[1]]
#> small_salary
#>
#> [[2]]
#> group_by(Degree)
#>
#> [[3]]
#> summarize(mean = mean(Salary))
"group_by(small_salary, Degree) %>% summarize(mean = mean(Salary))" %>%
parse_pipeline()
#> [[1]]
#> small_salary
#>
#> [[2]]
#> group_by(Degree)
#>
#> [[3]]
#> summarize(mean = mean(Salary))
"group_by(palmerpenguins::penguins, Degree, Work) %>% summarize(mean = mean(bill_length_mm))" %>%
parse_pipeline()
#> [[1]]
#> palmerpenguins::penguins
#>
#> [[2]]
#> group_by(Degree, Work)
#>
#> [[3]]
#> summarize(mean = mean(bill_length_mm))
more than 2 grouping variables
This is well supported now with the column facet -> row facet -> colour grouping flow. The output of datamations_sanddance()
is just a list of vegalite pseudo-specs right now, but some tests demonstrating that this works.
from datamations.
The only thing left here is "summarizing more than 1 value" which seems more like an enhancement than a bug! So I'm going to open a new issue for that and close this off.
from datamations.
Related Issues (20)
- Update Javascript documentation HOT 4
- Get python to parity with R updates HOT 1
- JS code as npm package and write unit tests HOT 1
- Clean up final error bars on zoom HOT 1
- Penguins example looks funny HOT 15
- Update package version to resolve dependabot security warning
- Penguins example breaks with 2 or 3 variables in shiny app HOT 2
- Find a spot for the updated shiny app HOT 1
- R-CMD-check workflow failing HOT 1
- This repo is missing important files
- ESLint workflow failing
- Pylint workflow failing HOT 1
- Implementation of Min and Max aggregation functions in JavaScript HOT 1
- Implementation of Sum and Product aggregation functions in JavaScript HOT 1
- Implementation of Count and Count Numbers aggregation functions in JavaScript HOT 1
- Implement Count and Quantile in Python
- Implement Min and Max in Python HOT 1
- Implement Sum and Product in Python HOT 1
- Respect factor orderings HOT 1
- Supported R version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datamations.