title: R Filling Counties by FIPS code with heat map
body: <p>This is my first time plotting in R, and I would greatly appreciate any help.</p>
  <p>I have a dataframe df with two columns, region and value. The region column represents the FIPS codes and the values represents the number I want to plot with regards to the color scale ranging from 0-5000.</p>
  <p>I looked at <a href="https://stackoverflow.com/questions/33129917/shading-counties-using-fips-code-in-r-map">Shading counties using FIPS code in R map</a> but I am not sure how to convert this gray scale shading to colors with either hex or rgb representation. In addition, I do not know how I would shade in colors based off a certain row's values.</p>
  <p>This is the code I currently have, and it is plotting a map of the counties (all white) along with their borders.</p>
  <pre><code>library(maps)
  library(dplyr)
  
  data(county.fips)
  year_df &lt;- year_df[c(&quot;region&quot;, &quot;value&quot;)]
  counties &lt;- county.fips %&gt;% left_join(year_df, by=c('fips'='region'))
  map(&quot;county&quot;, fill=TRUE)
  </code></pre>
  <p>Thanks in advance!</p>