This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert UTC to EDT | |
allTweets %<>% dplyr::mutate(created_at = as_datetime(created_at, tz = "UTC")) %>% | |
dplyr::mutate(created_at = with_tz(created_at, tzone = "America/New_York")) | |
# Produce lat and lng coordinates | |
allTweets <- lat_lng(allTweets) | |
# Plot | |
par(mar = rep(12, 4)) | |
map("state", lwd = .25) | |
# plot lat and lng points onto state map | |
with(allTweets, points(lng, lat, | |
pch = 16, cex = .25, | |
col = rgb(.8, .2, 0, .2))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment