Improving graphs
This commit is contained in:
parent
eae3f1c5e0
commit
fb3e8327be
@ -12,10 +12,19 @@ return(DATA)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DATA <- GET_DATA()
|
DATA <- GET_DATA()
|
||||||
|
TEMP <- DATA %>% filter(year==2035)
|
||||||
|
TEMP <- DATA %>% filter(year==2035)
|
||||||
|
RES <- TEMP %>% mutate(year=2036)
|
||||||
|
for(i in 2037:2060){
|
||||||
|
RES <- RES %>% rbind(TEMP %>% mutate(year=i))
|
||||||
|
}
|
||||||
|
DATA <- DATA %>% rbind(RES)
|
||||||
|
DATA$Type <- factor(DATA$Type,levels=c("Direct","Indirect","Induced"))
|
||||||
|
DATA
|
||||||
EMP_WY <- DATA %>% filter(Impact=="Employment",Region=="WY")
|
EMP_WY <- DATA %>% filter(Impact=="Employment",Region=="WY")
|
||||||
DOL_WY <- DATA %>% filter(Impact!="Employment",Region=="WY")
|
DOL_WY <- DATA %>% filter(Impact!="Employment",Region=="WY")
|
||||||
|
ggplot(EMP_WY, aes(x = year, y = value, fill = Type)) + geom_area(stat = "identity", position = "stack") + theme_bw()+scale_x_continuous(breaks=2026:2060)+scale_y_continuous(breaks=seq(0,10000,by=250))+ylab("Wyoming Employment Additions\n(Full-time Equivalent)")
|
||||||
ggplot(EMP_WY, aes(x = year, y = value, fill = Type)) + geom_bar(stat = "identity", position = "stack") + theme_minimal()
|
?scale_y_continuous
|
||||||
ggplot(DOL_WY, aes(x = year, y = value/10^9, fill = Type)) + geom_bar(stat = "identity", position = "stack") + theme_minimal()+facet_wrap(~Impact)
|
ggplot(DOL_WY, aes(x = year, y = value/10^9, fill = Type)) + geom_bar(stat = "identity", position = "stack") + theme_minimal()+facet_wrap(~Impact)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user