1. What is the state with the most murders? Would you say this is the most dangerous state? Hint: Make a plot showing the relationship between population size and number of murders.
murders$state[which.max(murders$total)]
## [1] "California"

California had the highest muder count; however, this does not necessitate that California is the most dangerous state.

murders$state[which.max(murders$population)]
## [1] "California"

You can see that California also has the largest population. A fair way to confirm if California is the most dangeous state is through comparing the murder rate among the states; using the murder rate in lieu of the raw number will help one see which state had the most number of murder incidence in proportion to its total population.

This plot confirms that California has the largest population in addition to the highest number of murder incidences. Therefore, it’s not prudent to conclude that California is the most dangerous state in the United States.

  1. Add a column to the murder data table called murder_rate with each states murder rate.

The murder rate of each state is appended to the existing data frame and shown below.

State Murder Rate
Alabama 2.82
Alaska 2.68
Arizona 3.63
Arkansas 3.19
California 3.37
Colorado 1.29
Connecticut 2.71
Delaware 4.23
District of Columbia 16.45
Florida 3.40
Georgia 3.79
Hawaii 0.51
Idaho 0.77
Illinois 2.84
Indiana 2.19
Iowa 0.69
Kansas 2.21
Kentucky 2.67
Louisiana 7.74
Maine 0.83
Maryland 5.07
Massachusetts 1.80
Michigan 4.18
Minnesota 1.00
Mississippi 4.04
Missouri 5.36
Montana 1.21
Nebraska 1.75
Nevada 3.11
New Hampshire 0.38
New Jersey 2.80
New Mexico 3.25
New York 2.67
North Carolina 3.00
North Dakota 0.59
Ohio 2.69
Oklahoma 2.96
Oregon 0.94
Pennsylvania 3.60
Rhode Island 1.52
South Carolina 4.48
South Dakota 0.98
Tennessee 3.45
Texas 3.20
Utah 0.80
Vermont 0.32
Virginia 3.12
Washington 1.38
West Virginia 1.46
Wisconsin 1.71
Wyoming 0.89
  1. Describe the distribution of murder rates across states. How similar are states? How much do murder rates vary by geographical regions?

This plot generates a visual description of murder rates across states. Most states do not seem to deviate much from the mean murder rate (2.78) across states. However, District of Columbia has a particualrly high murder rate in comparison to other states. This bar chart is then assessed using a color gradient to indicate the intensity of murder rates across states. Most states are within the 0 - 6 murder rate range. Some states such as Vermont and New Hampshire have noticably lower murder rates than the mean murder rate while states such as Louisiana and Districy of Columbia have higher murder rates than the mean.

The box plot assesses the murder rates acress four categorical geographical regions: 1) West, 2) North Central, 3) South, and 4) Northeast. While West, Nort Central, and Northeast regions have similar murder rates, Southern states have a higher mean murder rate. This could be due to potential outliers like District of Columbia that has a much higher rate in relation to other states.

Lastly, the distribution of murder rates across states is created using the usmaps R package. This plot corroborates previous findings where Southern states have relative high murder rates whereas West, North Centeral, and North East states have relatively lower and stable murder rates. As demonstrated by these three plots, murder rates seem to vary significantly by different geographical regions- especially by looking at the U.S map figure with the magnitude of the murder rate indicated by color. However, one must be aware of the outliers that may have contributed to such dispairies.

  1. Write a report for your friends reminding them that the US is a large and diverse country with 50 very different states as well as the District of Columbia (DC). Suppose one of your friends loves hiking, one wants to live in a warm climate, and another would like to be close to several large cosmopolitan cities. Recommend a desirable state for each friend.

For a friend who loves hiking, I would suggest one of the eight states that are categorized as the Mountain Division by the United States Census Bureau. The figure above shows the eight states in the Mountain Division: 1) Arizona, 2) Colorado, 3) Idaho, 4) New Mexico, 5) Montana, 6) Utah, 7) Nevada, and 8) Wyoming. Of eight states, Arizona is the warmest state throughout the year. Therefore, I would suggest this friend that Arizona might be a great state to consider. Arizona is best known for the Grand Canyon, and there are many beautiful landscapes and sites in Arizona aside from the Grand Canyon. Some renowned sites include Camelback Mountain, Flat Iron, and Browns Peak.

For a friend who wants to live in a warm climate, I made the distribution of the average temperature across states throughout the year. Based on the data provided by usa.com, the top five warmest states are: 1) Hawaii, 2) Florida, 3) Louisiana, 4) Texas, and 5) Arizona. This data was imported directly from the website and modified in order to append the states’ temperature values to the existing ‘muders’ data frame. The excel file used to import the data is attached along with my assignment. Considering the humidity also, I would recommend Hawaii for a friend who wants to live in a warm climmate with less humidity. Hawaii is a beautiful state that is known for its rugged landscapes of cliffs, waterfalls, tropical foliage and beaches. However, if this friend wants to be closer to other metropolitan cities, I would recommend Arizona as it will be easier to travel to different states.

Cosmopolitan is the term used for large cities where the population is composed of people from various cultural background. The data used in this analysis is obtained from Nerd Wallet, a financial website for consumers, which calculated which American cities had the most diverse distribution of residents across four cateogiral ethic groups: 1) Hispanic/Latino, 2) White, 3) Black, and 4) Asian/Pacific Islander. Several assumptions are made in this suggestion. I used race as a sole cosmopolitan measurement, speculating that individuals from each ethnic group would bring cultural values. However, some individuals may have been born in the United States. Also, there are problems with categorizing ethnic grouls to these bins like classifying Asian and Pacific Islander to a same group, which has elicited several arguments.

Of the top 20 most diverse cities in the United States, nine cities (Vallejo, Suisun City, Oakland, San Leandro, Florin, Sacramento, Eastvale, Fairfield, and Richmond) are Californian cities. These cities are not congregated in one specific region of California. Cities like Sacramento are in Northern California while Eastvale is located in Southern California. Therefore, we can speculate a relatively equal distribution of ethnic diversity across various cities in California. Therefore, I would suggest this friend to consider California as the option.