3 ShinyApp

3.1 Manual

3.1.1 choroplethmap: choroplethMap`

Creates a choropleth map of fatal encounters for the given year

choroplethmap(yeart = "mean")
Argument Description
yeart an integer year between 2000 and 2017 or “mean”, if blank calculates mean

Value :a chloropleth for the entered year

Seealso : plot_geo

3.1.2 descStat : descstat

Stratifies a data set based on a given demographic Used within dstable and ds plot

descstat(dem, ds = fatalencounters)
Argument Description
dem a demographic, the demographic the data is to be stratified for (Age, Gender, or Race)
ds a data frame, data frame you want to be stratified, if no input uses fatalencounters

stratified data frame

Seealso:dstable and dsplot

3.1.3 dsplot: dsPlot

3.1.3.1 Description

Makes a table based off stratified data

3.1.3.2 Usage

dsplot(dem)

3.1.3.3 Arguments

Argument Description
dem a demographic, the demographic the data is to be stratified for (Age, Gender, or Race)

3.1.3.4 Value

ggplot of the resulting data from an in-method descstat call

3.1.3.5 Seealso

[descStat] and dstable and ggplot2

3.1.4 dstable: dsTable

3.1.4.1 Description

Makes a table based off stratified data

3.1.4.2 Usage

dstable(dem)

3.1.4.3 Arguments

Argument Description
dem a demographic, the demographic the data is to be stratified for (Age, Gender, or Race)

3.1.4.4 Value

data table of the resulting data from an in-method descstat call

3.1.4.5 Seealso

descstat and dsplot

3.1.5 ffcartogram: ffCartogram

3.1.5.1 Description

Creates a cartogram of fatal encounters for the given year

3.1.5.2 Usage

ffcartogram(year)

3.1.5.3 Arguments

Argument Description
year an integer year between 2000 and 2017

3.1.5.4 Value

a cartogram for the entered year

3.1.5.5 Seealso

cartogram_cont

3.1.6 permillcalc: PerMillCalc

3.1.6.1 Description

Calculates the fatal encounters (per million population or total) for each state

3.1.6.2 Usage

permillcalc(x = fatalencounters, capita = TRUE)

3.1.6.3 Arguments

Argument Description
x a data frame of individual fatal encounter cases, default uses fatalencounters
capita a boolean, if TRUE evaluates cases per million population of each state, if FALSE just calculates total cases, default is TRUE

3.1.6.4 Value

table a data frame of fatalencounter per state (evaluated per capita or as totals based on capita param)

3.1.7 permillgraph: perMillGraph

3.1.7.1 Description

Creates a graph of fatal encounters by state

3.1.7.2 Usage

permillgraph(state, all, capita)

3.1.7.3 Arguments

Argument Description
state a state name, the state that is graphed or highlighted
all a boolean, if TRUE graphs state over the data of other states, if FALSE graphs just the given state
capita a boolean, if TRUE evaluates cases per million population of each state, if FALSE just calculates total cases

3.1.7.4 Seealso

permillcalc and permilltable

3.1.8 permilltable: perMillTable

3.1.8.1 Description

Creates a table of fatal encounters by state

3.1.8.2 Usage

permilltable(statenm, all, capita)

3.1.8.3 Arguments

Argument Description
statenm a state name, the state that is displayed or highlighted
all a boolean, if TRUE table includes all states, if FALSE table displays just the given state
capita a boolean, if TRUE evaluates cases per million population of each state, if FALSE just calculates total cases

3.1.8.4 Seealso

permillcalc and permilltable