7.3 The Analytical Policeman: Visualization for Law and Order

7.3 The Analytical Policeman: Visualization for Law and Order

Quick Question

Redo the map from Video 6, but this time fill each state with the variable GunOwnership. This shows the percentage of people in each state who own a gun.

Which of the following states has the highest gun ownership rate? To see the state labels, take a look at the World Atlas map.

 California  close
 Montana  check
 Texas  close
 Louisiana  close
 Missouri  close
Check Show Solution

Explanation You can generate the gun ownership plot using the following command: ggplot(murderMap, aes(x = long, y = lat, group=group, fill = GunOwnership)) + geom\_polygon(color="black") + scale\_fill\_gradient(low = "black", high = "red", guide="legend") Of these five states, the one that is the most red is Montana.

Course Info

Learning Resource Types

theaters Lecture Videos
notes Lecture Notes
assignment_turned_in Problem Sets with Solutions