fars_map_state: Draw the map and point grpah to denote the accidents.

Description Usage Arguments Details Examples

Description

This is called by the user.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

state number

year

year

sample state.num and the corresponding state. ——————————————— 01 Alabama 02 Alaska 04 Arizona 05 Arkansas 06 California 08 Colorado 09 Connecticut 10 Delaware 11 District 12 Florida 13 Georgia of Columbia 15 Hawaii 16 Idaho 17 Illinois 18 Indiana 19 Iowa 20 Kansas 21 Kentucky 22 Louisiana 23 Maine 24 Maryland 25 Massachusetts 26 Michigan 27 Minnesota 28 Mississippi 29 Missouri 30 Montana 31 Nebraska 32 Nevada 33 New Hampshire 34 New Jersey 35 New Mexico 36 New York 37 North Carolina 38 North Dakota 39 Ohio 40 Oklahoma 41 Oregon 42 Pennsylvania 43 Puerto Rico 44 Rhode Island 45 South Carolina 46 South Dakota 47 Tennessee 48 Texas 49 Utah 50 Vermont 51 Virginia 52 Virgin Islands (since 2004) 53 Washington 54 West Virginia 55 Wisconsin 56 Wyoming

Error: 1) If the state.num is not valid, then "invalid STATE number: <state.num/>" is thrown. 2) If there are no data found for the given state.num and year, then "no accidents to plot" is thrown.

Details

1) First draw the "state", by getting the min, max . i.e. the given range of lat, long 2) Then "point" it with all "data"(lat, long) of the corresponding state.

Examples

1
2
3
4
5
6
## Not run: 
  fars_map_state(1,2013)
  fars_map_state(2,2013)
  fars_map_state(36,2013)

## End(Not run)

dappaduppa/ddweek4pkg documentation built on May 26, 2019, 9:31 a.m.