Git Product home page Git Product logo

fars's Introduction

fars

Travis build status

The goal of fars is to describe data from the US National Highway Traffic Safety Administration’s Fatality Analysis Reporting System, in the time period 2013-2015. It has two functions fars_summarize_years and fars_map_state

Installation

You can install the development version of fars like so:

install_github('mentoldo/fars', build_vignettes=TRUE)

Example

It has two functions fars_summarize_years and fars_map_state.

fars_summarize_years makes a frecuency table for accidents by months for years passed as arguments for all US States.

library(fars)
## basic example code
library(kableExtra)

fars_summarize_years(c(2013, 2014, 2015)) %>% 
  kable()
#> [1] 2013
#> [1] "/home/psyche/R/x86_64-pc-linux-gnu-library/4.1/fars/extdata/accident_2013.csv.bz2"
#> [1] 2014
#> [1] "/home/psyche/R/x86_64-pc-linux-gnu-library/4.1/fars/extdata/accident_2014.csv.bz2"
#> [1] 2015
#> [1] "/home/psyche/R/x86_64-pc-linux-gnu-library/4.1/fars/extdata/accident_2015.csv.bz2"
MONTH 2013 2014 2015
1 2230 2168 2368
2 1952 1893 1968
3 2356 2245 2385
4 2300 2308 2430
5 2532 2596 2847
6 2692 2583 2765
7 2660 2696 2998
8 2899 2800 3016
9 2741 2618 2865
10 2768 2831 3019
11 2615 2714 2724
12 2457 2604 2781

fars_map_state plots the geolalization of all fatal crashes in highways in the indicated year and state.

fars_map_state(26, 2015)

fars's People

Contributors

mentoldo avatar

Watchers

 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.