Giter VIP home page Giter VIP logo

webr-file's Introduction

🧪 A Moderately More Useful WebR Experiment

See it live before reading!

Getting Some Work Done

WebR will be used in many web contexts, whether it be powering dashboards without the need for a "server", filling in statistical gaps in the javascript ecosystem, or just having fun!

In this experiment, we're doing some more serious work with what may be one typical application of WebR: using it to analyze user-supplied data. This will not become a ubiquitous use case until there's a solution to the "stall" when loading packages and the ability to get more packages requiring compilation into the WebR universe. But, we can frame out the concept in a small app that:

  • lets you upload a CSV
  • do some analysis on it in R (which, for experiment brevity, is R's summary() function)
  • show the first few rows of data (we'll do that with the JS arquero package just to intro that to R folks)
  • use base R's plot() function to plot data frame using a theme from {basetheme}

Instead of including the R files from {basetheme} like we did with a previous experiment, we're riffing from @timelyportfolio's experiment where he figured out a neat way to install built packages from rOpenSci's R Universe.

I'm a bit pressed for time this morning, so here's a just a rough guide to grok what's going on:

  • wc/file-drop.js is a Lit component to handle the file selection and initial data reading
  • wc/file-target.js is another Lit component to handle the displays of plots and tables
  • r.js has some new functions which make it easier to install packages from R Universe
  • main.js does all the package loading

I'll exposit more when time allows.

You can find the source for this experiment on GitHub

webr-file's People

Contributors

hrbrmstr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.