Added Multiplier histograms
This commit is contained in:
parent
5e1c998274
commit
4ad2344b1d
21
Tapestry.r
21
Tapestry.r
@ -38,8 +38,25 @@ ALL_ORIG <- ALL
|
||||
ALL <- ALL %>% filter(Total<5)
|
||||
REST <- ALL %>% filter(State!='WY')
|
||||
WY <- ALL %>% filter(State=='WY')
|
||||
ggplot(ALL,aes(x=State,y=Total)) + geom_jitter(width = 0.5,size=0.1,aes(color=State)) + geom_boxplot(fill=NA,outlier.shape=NA)+theme(legend.position = "none",aes(color=State) )
|
||||
+theme_bw()
|
||||
PLOT <- ggplot(ALL,aes(x=State,y=Total)) + geom_jitter(width = 0.5,size=0.1,aes(color=State)) + geom_boxplot(fill=NA,outlier.shape=NA)+theme_bw()+theme(legend.position = "none",aes(color=State) ) +ylab("Type II Regional Multipliers")
|
||||
ggsave("Multipliers.png", plot = PLOT, width = 10, height = 7.5)
|
||||
library(janitor)
|
||||
IMPLAN <- read_csv("States/Wyoming_2024_SAM_v1.5.6/IMPLAN_multipliers.csv") %>% clean_names() %>% select(-x1)
|
||||
hist(IMPLAN %>% pull(type_sam_multiplier)+1,breaks=40)
|
||||
IMPLAN <- IMPLAN %>% pull(type_sam_multiplier)+1
|
||||
DIST <- rbind(cbind("IMPLAN",IMPLAN),cbind("Tapestry",WY %>% pull(Total))) %>% as_tibble %>% rename(Source=V1,"Multiplier"=IMPLAN) %>% mutate(Multiplier=as.numeric(Multiplier))
|
||||
Histogram <- ggplot(DIST, aes(x = Multiplier,group=Source,fill=Source)) + geom_histogram(position = 'identity',alpha=0.5,bins=60)+theme_bw()+xlab("Type II Multiplier")+scale_x_continuous(breaks=0.25*1:100)+theme(legend.position = "top")
|
||||
ggsave("Histogram.png", plot = Histogram, width = 10, height = 7.5)
|
||||
|
||||
|
||||
|
||||
Density_Plot <- ggplot(DIST, aes(x = Multiplier,y=after_stat(density),group=Source,fill=Source)) + geom_density( linewidth = 1,alpha=0.75)+theme_bw()+xlab("Type II Multiplier")+scale_x_continuous(breaks=0.25*1:100)+theme(legend.position = "top")
|
||||
ggsave("Density.png", plot = Density_Plot, width = 10, height = 7.5)
|
||||
|
||||
Density_Plot
|
||||
|
||||
|
||||
ggplot(DIST, aes(x = Multiplier)) + geom_histogram(stat_bin(),fill = "#3a86d4", alpha = 0.7)
|
||||
##############Import analsysi
|
||||
GET_IMPORT <- function(ROOT_FOLDER="States/",YEAR=2024){
|
||||
#ROOT_FOLDER="States/";YEAR=2024
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user