Giter Site home page Giter Site logo

surabhisood / bellybuttonbiodiversity Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.54 MB

https://surabhisood-b3.herokuapp.com/ contains interactive dashboard for OTUs present in Test subjects

Python 3.53% JavaScript 73.12% HTML 23.35%
javascript html flask python heroku

bellybuttonbiodiversity's Introduction

Goal

Use Plotly.js to build a dashboard of interactive charts and deploy on Heroku.

View dashboard here.

Process

Flask

In the app.py file, I used Flask to render the template which dynamicaly genetares based on the Id selected by the user from drop down.

app.js

In the app.js file,I created two functions. One to obtain all the graphs based on user selection of 'Test Selection Id' from the dropdown menu. Other to generate the Demographic Info.

The pis, bar and bubble charts were straightforward.However, the gauge chart was bit trickier. Plotly.js had documentation on its own gauge charts, but none fit what I was looking for, so I used a different solution based on two resources I found online. The technique was to first make a donut chart, hide half of it, and divide the second half into nine steps (to reflect the frequency of washes, WFREQ, per sample). The pointer on the gauge would then point to the respective number of washes based on the selected sample. The pointer was created with a combination of a scatter plot and paths, whose point position changed in accordance with the selected sample.

All the plots were obtained from Plotly.js

An init() function was created to display a list of available samples as user can select from as well as populate the dashboard with default values when the dashboard is first loaded. The final function (optionChanged()) simply called the getPlot() and getInfo() functions based on the user selection.

Heroku

To deploy this dashboard on Heroku, I simply created a new app in Heroku and connected it to the corresponding GitHub repo. Then, I added a Procfile and requirements.txt file to my repo.

bellybuttonbiodiversity's People

Contributors

surabhisood avatar

Watchers

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