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
# colClasses forces the FIPSFULL row to keep their leading zeros | |
PerPovData <- read.csv("data/persistent_poverty-full.csv", colClasses=c("FIPSFULL"="character")) | |
library(rgeos) | |
library(maptools) | |
#Prep Continental Map | |
fips_dist <- readShapeSpatial("maps/fips/basic/US_County_AK_2000_2004.shp") | |
# if you want to check to see if it plots correctly: plot(fips_dist), but I know this is working for me | |
fips_dist <- fortify(fips_dist, region = "FIPS") | |
fips_dist$id <- toupper(fips_dist$id) | |
#Prep Alaska and Hawaii Map |
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
SlaveryData <- read.csv("data/global_slavery_index_2013-transformed.csv") | |
library(ggplot2) | |
library(rgeos) | |
library(maptools) | |
library(extrafont) | |
# font_import() only needs to be done once and I've already done it | |
loadfonts(device = "win") | |
map.world <- readShapeSpatial("maps/world/ne_110m_admin_0_countries.shp") | |
plot(map.world) | |
# I'm a dummy who used the sov_a3 region rather than the adm0_a3 region; |