<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Florida | Miao Sun | 孙苗</title><link>https://cactusolo.github.io/tag/florida/</link><atom:link href="https://cactusolo.github.io/tag/florida/index.xml" rel="self" type="application/rss+xml"/><description>Florida</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><copyright>© {2018-2026} Miao Sun</copyright><lastBuildDate>Fri, 14 Dec 2018 00:00:00 +0000</lastBuildDate><image><url>https://cactusolo.github.io/media/icon_huedaf1db70dd9a5ae8fb7d95bfd1a4abe_1318_512x512_fill_lanczos_center_3.png</url><title>Florida</title><link>https://cactusolo.github.io/tag/florida/</link></image><item><title>Plotting Florida</title><link>https://cactusolo.github.io/post/ploting-florida/</link><pubDate>Fri, 14 Dec 2018 00:00:00 +0000</pubDate><guid>https://cactusolo.github.io/post/ploting-florida/</guid><description>
&lt;script src="https://cactusolo.github.io/rmarkdown-libs/header-attrs/header-attrs.js">&lt;/script>
&lt;div class="figure">
&lt;img src="https://cactusolo.github.io/post/2018-12-14-ploting-florida_files/florida.png" alt="" />
&lt;p class="caption">florida&lt;/p>
&lt;/div>
&lt;div id="ploting-florida" class="section level1">
&lt;h1>Ploting Florida&lt;/h1>
&lt;p>Today, I learned some “Spatial Analysis” R packages (e.g., &lt;em>ggmap&lt;/em>, &lt;em>tigris&lt;/em>) from the last workshop of 8-week-long workshop series — &lt;a href="https://informatics.institute.ufl.edu/event/introduction-to-r-for-the-social-sciences-weekly-workshops-fall-2018/">R for the Social Sciences Weekly Workshops&lt;/a>. It was a really great workshop! I leared a lot of &lt;strong>R&lt;/strong> and &lt;strong>Stats&lt;/strong> (e.g., Linear Models, Generalized Linear Models, autocorrelation, etc), even though the topics were more focused on Social Sciences.&lt;/p>
&lt;p>Thanks to Raffaele Vacca, Tom Smith, and Till Krenz!&lt;/p>
&lt;p>Here are some quick and simple code to plot Florida:&lt;/p>
&lt;pre class="r">&lt;code>library(ggplot2)
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ tibble 3.0.6 ✓ dplyr 1.0.4
## ✓ tidyr 1.1.2 ✓ stringr 1.4.0
## ✓ readr 1.4.0 ✓ forcats 0.5.1
## ✓ purrr 0.3.4
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
# Get the shape data for the state of Florida and We need more detailed shape data to show county borders
flr &amp;lt;- map_data(&amp;quot;county&amp;quot;) %&amp;gt;%
filter(region == &amp;quot;florida&amp;quot;)
# Create a ggplot object that we can add layers to.
flr_plot &amp;lt;-
ggplot(data = flr, mapping = aes(x = long, y = lat)) +
geom_map(map = flr, color = &amp;quot;orange&amp;quot;, fill = &amp;quot;blue&amp;quot;,
aes(map_id=region)) +
coord_quickmap()
flr_plot&lt;/code>&lt;/pre>
&lt;p>&lt;img src="https://cactusolo.github.io/post/2018-12-14-plotting-florida_files/figure-html/unnamed-chunk-1-1.png" width="672" />&lt;/p>
&lt;pre class="r">&lt;code>
#of course, we can do more stuff, like adding county names...&lt;/code>&lt;/pre>
&lt;/div></description></item></channel></rss>