Plotting Florida


Ploting Florida

Today, I learned some “Spatial Analysis” R packages (e.g., ggmap, tigris) from the last workshop of 8-week-long workshop series — R for the Social Sciences Weekly Workshops. It was a really great workshop! I leared a lot of R and Stats (e.g., Linear Models, Generalized Linear Models, autocorrelation, etc), even though the topics were more focused on Social Sciences.

Thanks to Raffaele Vacca, Tom Smith, and Till Krenz!

Here are some quick and simple code to plot Florida:

## ── 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 <- map_data("county") %>% 
  filter(region == "florida")

# Create a ggplot object that we can add layers to.
flr_plot <- 
  ggplot(data = flr, mapping = aes(x = long, y = lat)) + 
  geom_map(map = flr, color = "orange", fill = "blue",
           aes(map_id=region)) + 


#of course, we can do more stuff, like adding county names...
Miao Sun | 孙苗
Miao Sun | 孙苗

My research interests are reconstructing a large scale phylogeny to explore the diversity patterns in angiosperms across space and time using big biological data and biological comparative methods.