Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

htmlwidgets for standalone interactive display of maps, scatterplots, time-series, graphs and more #6

Open
bbest opened this issue Sep 28, 2015 · 7 comments

Comments

@bbest
Copy link
Contributor

bbest commented Sep 28, 2015

Hi @jules32, @jafflerbach, @oharac, @Melsteroni, @stevejbrown,

I'd like to propose giving a demo to eco-data-science on the power of htmlwidgets.org for interactive display of maps, time series charts, network graphs and more. And this functionality gets rendered as a standalone HTML page from an Rmarkdown document; meaning you don't need a Shiny server or even R installed for someone else to see it, just a web browser either opening local file or on free web server (eg github.io). It also works in the RStudio console and can plug in with Shiny for user interactions and back-end functions. For greater depth, check out the blog buildingwidgets.com.

Would also be of interest to ucsb-data-science, NCEAS and SFG. Could use existing spatial tutorials and OHI as examples. Open to others.

What do you think?


PS For this more public ticket, here's the snippet of examples I previously shared in private at https://github.com/OHI-Science/issues/issues/515 ...

By the way, there are some pretty cool htmlwidgets that you can use with these pretty map and carpet plots to generate popup values on hover, which make them super useful for inspection. And this interactivity can be easily generated from Rmarkdown document into a portable standalone HTML, ie no Shiny server needed.

To share via URL (vs attachment which needs to get downloaded and opened in a browser separately), you could place the HTML files on a gh-pages branch of a repo or use htmlpreview or rawgit.

Here are the showcase examples with static image screenshot. Follow links to see interactive hover.

  • leaflet

    library(leaflet)
    pal <- colorQuantile("YlOrRd", NULL, n = 8)
    leaflet(orstationc) %>% 
      addTiles() %>%
      addCircleMarkers(color = ~pal(tann))

    image

    For applicability to OHI maps, see this Rmarkdown example of Creating a Leaflet choropleth map with a pop-up in R.

  • d3heatmap

    library(d3heatmap)
    d3heatmap(mtcars, scale="column", colors="Blues")

    image

@jules32
Copy link
Contributor

jules32 commented Sep 28, 2015

Sounds awesome! Maybe we can schedule you in November?

@Melsteroni
Copy link

Melsteroni commented Sep 28, 2015

I am enthusiastic about learning more!

@jamiecmontgomery
Copy link
Contributor

jamiecmontgomery commented Sep 28, 2015

Hi @bbest

This looks great and I would absolutely love a tutorial on this!!

It might be better suited to do an RMarkdown session first though? To make
the utility of these tools more apparent and accessible for the larger
group - what do you think?

I've had some folks at NCEAS ask about an RMarkdown session so I'm thinking
of putting one together relatively soon. And then we could follow up with
this awesomeness so November would be a perfect time if you are able to do
it then.

@remi-daigle
Copy link
Contributor

Please do this before I leave!!!

@bbest
Copy link
Contributor Author

bbest commented Mar 11, 2016

Here's the material:

http://ucsb-bren.github.io/env-info/wk06_widgets.html

I'd be happy to present this after April 4th.

@jamiecmontgomery
Copy link
Contributor

Hi @bbest - would you be interested in teaching html widgets sometime in the near future?

@bbest
Copy link
Contributor Author

bbest commented Apr 24, 2017

Hey @jafflerbach,

Sorry about the monstrous lag (I was traveling previously). Yeah, I'd be happy to lead a session on htmlwidgets, which in my mind is something of a data science revolution in being able to port the powerful visualization web libraries to your data using simple R functions that work for both Rmarkdown to html pages or Shiny interactive app contexts.

We can talk more at this Thursday's gathering or schedule in advance.

Thanks, Ben

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants