Coder Social home page Coder Social logo

accidents's Introduction

Accidents / ET586CC

Source

Source: Anuário Estatístico de Acidentes de Trabalho - AEAT

Project theme: workplace accidents in Brazil.

data/accidents-compiled.csv has data compiled between the 2002-2009 period.

Tools and dependencies

You may find it worth to use the RStudio IDE (Integrated Development Environment).

Web-available demo

Before downloading the app you can try it on-line at http://henvic.shinyapps.io/accidents/

Shiny uses a web-based UI with WebSocket to sync it with the R logic on the server-side.

App kindly hosted for free at the ShinyApps.io cloud.

Deploying

You can fast deploy this program in a just few seconds with

R -e "shiny::runGitHub('accidents', 'henvic');"

This will download the last version of the program and run it.

Possible simple improvements

  • lib.R code could be more organized
  • Interval functions options could be dynamically added to the UI
  • Server.R has linting problems
  • Caching

Caching

The code doesn't cache almost anything because the tradeoff would be code quality and the benefits weren't enough to justify it, even thought when loading the 2002-2009 dataset we can notice there's a evident bottleneck.

The caching decision was deferred and, then, once complete, deferred indefinitely.

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. ~ Donald Knuth

The parsing of the CSV file with the construction of the raw data table seems to be one of the most costly operations but no statistics were taken to prove this claim.

Docs

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using the R lint package.

Read the Google's R Style Guide and try to follow it.

If you're new to git and GitHub see the GitHub Guides.

Authors

License

Licensed under the MIT license.

accidents's People

Contributors

henvic avatar

Watchers

James Cloos avatar Leonardo Schettini 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.