<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/mapping-the-prevalence-of-alzheimer-disease-mortality-in-the-usa/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://datascienceplus.com/mapping-the-prevalence-of-alzheimer-disease-mortality-in-the-usa/"> R Programming – DataScience+</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>In comparison with other statistical software (e.g., SAS, STATA, and SPSS), R is the best for data visualization. Therefore, in all <a rel="nofollow" href="https://datascienceplus.com/author/anisa-dhana/" target="_blank">posts I have written</a> for DataScience+ I take advantage of R and make plots using <code>ggplot2</code> to visualize all the findings. For example, <a rel="nofollow" href="https://datascienceplus.com/obesity-trends-in-the-united-states-an-analysis-and-visualization-with-tidyverse-in-r/" target="_blank">previously</a> I plotted the percentiles of body mass index in the NHANES 2005-2014 and got exactly same results as the paper published in <a rel="nofollow" href="https://jamanetwork.com/journals/jama/fullarticle/2526639" target="_blank">JAMA</a>.</p>
<p>In this post, I will make a map of the prevalence of Alzheimer disease mortality by the state in the USA. The <a rel="nofollow" href="https://www.cdc.gov/nchs/pressroom/sosmap/alzheimers_mortality/alzheimers_disease.htm" target="_blank">Centers for Disease Control and Prevention</a> is providing the data for download, and they have created a beautiful map. I will try to reproduce the same results using several packages in R.</p>
<h2>Libraries and Datasets</h2>
<p>Load the library</p>
<pre><code>library(tidyverse)
library(scales)
library(maps)
library(mapproj)
</code></pre>
<p>Download the .CSV file from the Centers for Disease Control and Prevention website (link is above)</p>
<pre><code>dt_ad &lt;- read.csv(&quot;~/Downloads/ALZHEIMERS2016.csv&quot;)
head(dt_ad)</code>
<em> STATE RATE DEATHS URL
1 AL 45.0 2,507 /nchs/pressroom/states/alabama/alabama.htm
2 AK 25.8 111 /nchs/pressroom/states/alaska/alaska.htm
3 AZ 35.8 3,082 /nchs/pressroom/states/arizona/arizona.htm
4 AR 41.3 1,475 /nchs/pressroom/states/arkansas/arkansas.htm
5 CA 36.1 15,570 /nchs/pressroom/states/california/california.htm
6 CO 34.7 1,835 /nchs/pressroom/states/colorado/colorado.htm</em></pre>
<p>Load the map data of the U.S. states</p>
<pre><code>dt_states = map_data(&quot;state&quot;)
head(dt_states)</code>
<em> long lat group order region subregion
1 -87.46201 30.38968 1 1 alabama </em></pre>