ropensci / ozunconf17

Website for 2017 rOpenSci Ozunconf
http://ozunconf17.ropensci.org/
24 stars 6 forks source link

Something something p5.js #23

Open jonocarroll opened 6 years ago

jonocarroll commented 6 years ago

I don't have a specific idea in mind, but p5.js is a fantastic library that just begs to be used in a htmlwidget. Some 'prior art':

geom_realtime(): live-plotting microphone input: https://www.youtube.com/watch?v=3mdiCUbgxi0

click and animate: https://www.youtube.com/watch?v=BRYlPWEtVQ8

The examples page linked above has many, many possibilities.

PeteHaitch commented 6 years ago

Sean Kross (@seankross) gave a really cool talk at JSM on https://github.com/seankross/p5, his R package with bindings to p5. His slides are available as a blog post http://seankross.com/2017/08/11/Beyond-Axes-Simulating-Systems-with-Interactive-Graphics.html

jonocarroll commented 6 years ago

So, yeah. I want to make what Sean made, I guess.

It doesn't look like he took it anywhere near as far as it could go, so there's still plenty more that could build on this. Take that repo as inspiration for R bindings to p5.js and think of what we could do with it.

PeteHaitch commented 6 years ago

Sean may be interested in collaborating to advance the package. He's just started grad school, so I'm sure he's got a billion other things on his plate!

adam-gruer commented 6 years ago

It could be awesome to sit this over the data coming out of #3

seankross commented 6 years ago

Hey all, (thanks for the mention @PeteHaitch)

I am just starting grad school and my life is a little crazy as a result! Still I really think that p5 and R should absolutely get together. @jonocarroll if you want to fork my repository and run with the code then go for it! If you want to start from scratch because my library doesn't make any sense you should do that, don't worry about stepping on my toes I don't care! If you want to collaborate on what I've already written I'd be happy to do that as well, though I'm not going to be able to be online during ozunconf17.

tl;dr Go for it and don't worry about me but I'd be happy to help too!

Sean

MilesMcBain commented 6 years ago

Ohhhhhh wow. This is great stuff... also I really dig that slideshow/blog post mashup thing you have going on @seankross. I feel like I watched your talk now.

seankross commented 6 years ago

Yeah another "someday maybe" project is to turn that slide hand-out presentation format into a proper R Markdown template using the same HTML-comment-as-content framework as Ari.

jonocarroll commented 6 years ago

Cheers @seankross -- I'm absolutely keen to collaborate on this stuff when you get some bandwidth. Your p5 functions look like and do exactly what I had in mind initially and I'm definitely going to base what I do on your work. My larger goal though is to enable a user to generate plots with the same R syntax, as in #26

jonocarroll commented 6 years ago

Right, so with geom_realtime() as its own project/issue (#26) this one needs more focus. I say we extend what @seankross has so brilliantly made (https://github.com/seankross/p5) into a more feature-rich wrapper.

I don't have a specific use case yet, but it would be nice to wrap some of the features of p5. As a lofty goal, I would think we could get a game of FlappyBird made during the unconf using only R commands and R wrappers to p5. Here's a pure JS implementation that we could map the functionality of.

A slightly less silly/more useful goal would be to do the wrapping so that a user could plot their data as shapes/some sort of interactivity/3D.

hrbrmstr commented 6 years ago

Just making sure folks are also aware of https://processing-r.github.io/

jonocarroll commented 6 years ago

I was not aware of it, so thank you @hrbrmstr! It's definitely a more sophisticated application of the bindings, but the p5 package did exactly what we wanted and allowed us to extend to arbitrary R function input processing data streams, plotting in real-enough-time.

Vignettes and blog posts to follow in good time.

stefaniebutland commented 6 years ago

Putting @jonocarroll's blog post on realtime here since references things discussed here: 2017 rOpenSci ozunconf :: Reflections and the realtime Package https://ropensci.org/blog/2017/11/14/realtime/

bedantaguru commented 5 years ago

@jonocarroll so what is the plan for geom_realtime