Giter Club home page Giter Club logo

Comments (6)

jhofman avatar jhofman commented on May 21, 2024 1

Great.

After we resolve #2, let's get this code in a branch and then pull request if it's useful to keep it around.

from datamations.

jhofman avatar jhofman commented on May 21, 2024

This looks like it's sandboxed in its own svg. @giorgi-ghviniashvili, is this flexible enough for what we want to do?

from datamations.

jhofman avatar jhofman commented on May 21, 2024

More documentation: https://rstudio.github.io/r2d3/

from datamations.

jhofman avatar jhofman commented on May 21, 2024

See if you can pass a full dataframe from R to d3 using r2d3 and render a simple x-y scatter plot with the following data.

df <- data.frame(x = c(1,2,3), y = c(15,25,35), color = c('red','red','blue'))

If that works, try using the actual data in data-raw to create a plot where the x axis is degree (masters or phd), the y axis is salary, and points are colored by degree. (Jitter on the x axis is optional for now.)

Screen Shot 2021-04-05 at 2 23 29 PM

Bonus would be to turn this into an animation where the first frame is this scatter plot and the last frame shows only the averages in each group, as in the final frame of the demo animation from the R package. The animation should have all points in the first frame "flying into" the final average in its group in the last frame.

Screen Shot 2021-04-05 at 2 23 35 PM

The error bars are optional for now as well.

You can use this as a guide.

from datamations.

jhofman avatar jhofman commented on May 21, 2024

The R for Data Science book is a good resource.

from datamations.

giorgi-ghviniashvili avatar giorgi-ghviniashvili commented on May 21, 2024

Hi @jhofman .

I have done the scatterplot with csv data frame (read_csv).

Here is the video:

initial_scatter.mov

Jitter done using d3.forceCollide.

Setup an interval method which just toggles between average or full view.

from datamations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.