• Stars
    star
    204
  • Rank 192,063 (Top 4 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 7 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A bunch of shiny modules that let shiny sense the world around it.

shinysense

A series of shiny modules to help shiny sense the world around it.

It's called shinysense because shinyinputs seemed kinda lame.

Senses present:

Currently the package supports the following 'senses'.

Touch

  • drawr & shinydrawr: Draws a line chart that obscures the end of the results, the user then draws what they think the rest of the chart is and then the rest of the chart is revealed.
  • shinyswipr: Embeds a card that can be swiped in different directions, the swipe direction is returned to shiny.

Vision

  • shinyviewr: Record images from a webcam or any other camera connected to browser viewing app.

Hearing

  • shinylistenr: Records audio on a button press and returns the fast-fourier transformed signal to the server.

Motion

  • shinymovr: Capture and return accelerometer data from your phone or tablet.

Testing it out

Every sense included in the package has a demo app. To run the demo app you can run the included function run_demo() and pass it the name of the function you want to see.

E.g.

shinysense::run_demo('shinyviewr')

This will run a basic demo application that includes the code behind the app. Giving you a jumping off point for including the function in your app!

Available demos include

  • 'shinydrawr'
  • 'shinyviewr'
  • 'shinyswipr'
  • 'shinymovr'
  • 'shinylistenr'
  • 'draw_your_dist': A demo app using shinydrawr to fit a beta distribution to a drawn line.

How do I use it?

shinysense is not currently on CRAN. To install it use the devtools github function.

devtools::install_github("nstrayer/shinysense")

Once the app is installed just included it in your shiny app the way you usually would:

#my super cool shiny app
library(shiny)
library(shinysense)

Naming Scheme

The names of the functions follow a few general rules.

  • The shiny-based functions are all prefixed with shiny. E.g. shinyswipr, shinydrawr...

  • Of those shiny-based functions there are two functions per sense, the server function (just plain name), and the UI function, which has _UI appended to the end.

Note that if you used shinysense in earlier versions, this naming scheme was inconsistent, I sincerely apologize for any frustration this may cause!

  • For functions that work outside of shiny there is no shiny prefix.
    • Currently this only includes drawr which allows you to embed a you-draw-it chart in a static report, and run_demo which starts up the demo apps for the various senses.

Browser security

Recently browsers have been making large steps to protect user's data. This is great, however, it means that it can sometimes be tricky to get these applications working. Almost everything will require a secure connection to work. Secure connection generally means two things: one the website address includes https:// at the front, meaning that all data passed between the browser and server is encrypted, or the app is being run locally and accessed with localhost.

The easiest way to experiment with these functions is to run a local RStudio instance on your laptop or desktop and then run the shiny app in the browser. When hosting an app for public consumption make sure you have an ssl encrypted server (I.e. https).

A workaround for using RStudio Server on a remote server that is not secured with https is to do port forwarding with the ssh command. E.g. ssh -L 127.0.0.1:8787: 127.0.0.1:8787 me@my_servers_address. This will allow you to use localhost for your apps.

Nothing works, what do I do?

The probability of there being bugs in these functions is unfortunately high. If you've found one I would be delighted if you could file a new issue here. I'll try my best to at least respond.

More Repositories

1

datadrivencv

R package for building customizable CVs from spreadsheets
R
575
star
2

cv

My CV built using RMarkdown and the pagedown package.
HTML
523
star
3

tuftesque

A very similar style to the original tufte hugo theme but with a few modifications. Used in my blogdown blog.
HTML
53
star
4

tuftesque2

A successor to the tuftesque blogdown theme. This time starting out as a rmarkdown theme.
CSS
27
star
5

D3ManhattanPlots

An R HTMLWidget for making interactive manhattan plots for GWAS.
JavaScript
19
star
6

spell_casts

A shiny app for casting spells using deep learning
R
16
star
7

js4shiny_r2d3

Repo for R2D3 section at the javascript for shiny users workshop at RStudio::Conf 2020
JavaScript
15
star
8

shinyswipr

An R Shiny module to put swiping interfaces in your app!
JavaScript
13
star
9

nstrayer.github.io

Personal website
HTML
13
star
10

network3d

Three dimensional network visualization in R using webgl/threejs. Built to be configurable and fast.
HTML
13
star
11

slid3r

A simple d3 slider that is meant to be placed inside your svg.
JavaScript
10
star
12

grided

A web-app to help you build grid-layouts for your web-app
TypeScript
9
star
13

manhattanPlotr

A tiny package that just makes nice looking interactive manhattan plots for use in Shiny apps or publication.
JavaScript
8
star
14

visualization_in_r

A repository for the computing workshop I am giving in the Vanderbilt biostatistics department May 20.
HTML
8
star
15

mcmcDemo

A pure javascript implementation of a metropolis haystings mcmc sampler
JavaScript
7
star
16

cvdown

R package for building data-driven CVs/ Resumes with RMarkdown/Pagedown
R
6
star
17

activity_detection_post

Can we use Keras to detect human activity from accelerometer data?
HTML
5
star
18

neural_nets_for_statisticians

A series of two lectures for the class Advanced Statistical Inference at Vanderbilt on Neural Networks
HTML
4
star
19

bipartiteNetwork

A 3-d gpu-powered bi-partite network visualization tool. For use in shiny or static environments. Fast.
JavaScript
4
star
20

travelingSalesman

A tiny interactive that allows you to fiddle with the simulated annealing algorithm
JavaScript
3
star
21

statdists

A javascript library mocking R's distribution forms
JavaScript
3
star
22

phewasHelper

A package with a few tiny helper functions to make life easier to work with phewas and phecodes.
R
3
star
23

shinyearr

This package has been rolled into the library shinysense!
JavaScript
3
star
24

wildfires

Where are wildfires happening?
JavaScript
2
star
25

tree-town-trees

A shiny app to explore all of Ann Arbor's trees
R
2
star
26

rstudioconf19_me-poster

Repo containing the flexdashboard e-poster on the shiny app Multimorbidity Explorer for RStudio::Conf 2019
HTML
2
star
27

d3Stats

A d3 javascript library that will allow easy generation of common statistical plots (scatter, box, violin, histogram... etc.).
JavaScript
2
star
28

Mysis_DVM_Modeling

The code and brainstorms for my senior thesis project "Modeling the Diel Vertical Migration Patterns of Mysis diluviana."
HTML
2
star
29

js_stat_snippets

Small copy and pasteable snippets of common statistics/probability functions in ES6 javascript.
2
star
30

viewr_imagenet_demo

A demo of using the shinyviewr function in my shinysense package to classify photos using the VGG50 imagenet model.
R
2
star
31

tsne_presentation

Vanderbilt biostatistics journal club paper presentation on T-SNE by Maaten et al.
HTML
2
star
32

associationsubgraphs

Estimation of association networks using non-parametric entropy-based measures
R
2
star
33

network_builder

A small javascript tool to build toy networks and export them for use in your favorite network program.
HTML
2
star
34

math295

Code and data for Professor James Bagrow's, Math 295 (Data Science 2) at UVM, F14
Python
2
star
35

marketStory

Exploration of state level farmers market trends.
JavaScript
2
star
36

deeplearnjs

JavaScript
1
star
37

pyrtree

Automatically exported from code.google.com/p/pyrtree
Python
1
star
38

pyshiny-output-binding-example

Simple example demonstrating a custom output binding using the Tabulator JS library
JavaScript
1
star
39

py-shiny-custom-input-component

Example for a custom javascript input for a shiny for python in package form
JavaScript
1
star
40

dataDayTexas

Presentation for my talk at Data Day Texas on Jan 27, 2018
HTML
1
star
41

sequence_classification

A presentation I'm making for my qualifying exam on using deep learning for sequence classification
HTML
1
star
42

biSBMR

A quick R implementation of the Bipartite SBM by Dan Larremore, Abigail Jacobs, and Aaron Clauset. Currently just their code pretty much wholesale.
C++
1
star
43

likelihood

A interactive explanation of likelihood functions/ ratios/ intervals.
JavaScript
1
star
44

sbmrcpp

Experimental new version of sbmR package that forgoes the rcpp s4 class in favor of lightweight wrappers of the built in SEXP classes
C++
1
star
45

brimr

A quick implementation of the BRIM algorithm for bipartite network clustering. May eventually be a package.
R
1
star
46

docker_for_biostatisticians

Slides and demo for Vanderbilt computing seminar on 4/26/2019
HTML
1
star
47

distributionTool

Little app to visualize different probability distributions and play around with their parameters.
JavaScript
1
star
48

nviz

A collection of random visualizations I find myself reusing a lot
R
1
star
49

ehr_mining_presentation

HTML
1
star
50

binomialFun

An interactive exploration of binomial confidence interval generation and hypothesis testing.
JavaScript
1
star
51

leapD3

Experimental repo interfacing leap motion and d3 graphics.
JavaScript
1
star
52

chromebookDevSetup

A simple set of steps to go from fresh chromebook to active dev environment
1
star
53

bayesian_nonparametrics_tutorial

A series of scripts that implement common bayesian nonparametric unsupervised learning methods from scratch. Will eventually be a blog post.
R
1
star
54

WebComponentCheatSheet

A series of code snippets to make getting webcomponents up and running easier
1
star
55

hiking_maps

3d hiking maps from Strava
R
1
star
56

journal_club_bipartite_sbm_larremore_et_al

My slides for the Vandy biostats journal club on Efficiently inferring community structure in bipartite networks by Daniel B. Larremore, Aaron Clauset, and Abigail Z. Jacobs.
HTML
1
star
57

chromebookTesting

Testing the ability to run an entire multifile webdev project from a stock chromebook.
HTML
1
star