Git Product home page Git Product logo

shinyvolcano's Introduction

ShinyVolcano

3D Rendering in R

Purpose

This project aims at rendering Volcano in a Shiny application. Volcano is a dataset included in R, and reproduces the topology of Mount Eden (Maunga Whau), a volcano located in Auckland, New Zealand, on a 10x10m grid.

The files load the dataset and plots it using the persp function. The user can then modify the vertical scale and the point of view. Calculations and rendering being done in software mode (i.e., not using any hardware-acceleration technique), there is a serious lag of 1-2 seconds between user interaction and screen update. This shouldn't be a problem as the exercise was about the interaction itself and not the end result.

If you want to experiment further with topological data in R, take a look at:

  • this PDF listing various ways to have fun with R and the Volcano dataset
  • Shiny-RGL which is a Shiny wrapper for the RGL package. It allows you to use RGL, an openGL package for R, in ShinyApps. Using it would allow you to directly move the volcano with the mouse, instead of relying on sliders to move the point of view.
  • GeoTheory also has some nice experiments with maps and R.

This is by no means a list of definitive reference on this topic, I just wanted to share some fun links :)

How to use this Shiny App

Simply go to shinyapps.io, to run the app in the browser. The commands are straightforward : you can change the camera point of view in the "Point of view" section and, below, act on the "height scale" (how much the altitude is exagerated) and on the shading (roughly, the shadowing contrast).

How to install locally

  • Grab the files or clone the repo
  • Fire up R (or better, RStudio), load the ui.R and server.R files
  • Set your working directory to where the files are located
  • Make sure you have the Shiny package (if not, install.packages('shiny'))
  • Issue the runApp() command (note that the latest RStudio, v.0.98.932, has new commands to launch directly ShinyApps)
  • From there, just interact with the Volcano using the inputs located in the left panel

shinyvolcano's People

Contributors

patapoof avatar

Watchers

James Cloos 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.