# a comparison of both countries rm(list=ls()) source('X:/Kirsty Hassall/Anna Szyniszewska/Cassava/Stats/CIV.R') source('X:/Kirsty Hassall/Anna Szyniszewska/Cassava/Stats/Uganda.R') dim(dat_civ) dim(dat_uga) names(dat_civ) names(dat_uga) dat <- data.frame(Country=factor(c(rep("CIV", 69), rep("Uganda", 87))), rbind(dat_civ[,c("field_id", "area_m2","Centre_Lon","Centre_Lat","Cass_Prod", "Cass_HA", "SPAM2010","Population", "tot_area_ind_plants","tot_ind_plants","tot_buildings","tot_cassava_area", "tot_monoculture_area","tot_intercrop_area", "no_fields")], dat_uga[,c("field_id", "area_m2","Centre_Lon","Centre_Lat","Cass_Prod", "Cass_HA", "SPAM2010","Population", "tot_area_ind_plants","tot_ind_plants","tot_buildings","tot_cassava_area", "tot_monoculture_area","tot_intercrop_area", "no_fields")])) # survey data g1 <- ggplot(dat, aes(x=Country, y=log(tot_cassava_area))) + geom_boxplot() + geom_point() g2 <- ggplot(dat, aes(x=Country, y=log(tot_monoculture_area))) + geom_boxplot() + geom_point() g3 <- ggplot(dat, aes(x=Country, y=log(tot_intercrop_area))) + geom_boxplot() + geom_point() g4 <- ggplot(dat, aes(x=Country, y=(tot_buildings))) + geom_boxplot() + geom_point() ggarrange(g1,g2,g3,g4, nrow=2,ncol=2) # modelled data m1 <- ggplot(dat, aes(x=Country, y=log(Cass_Prod))) + geom_boxplot() + geom_point() m2 <- ggplot(dat, aes(x=Country, y=log(Cass_HA))) + geom_boxplot() + geom_point() m3 <- ggplot(dat, aes(x=Country, y=log(SPAM2010))) + geom_boxplot() + geom_point() m4 <- ggplot(dat, aes(x=Country, y=log(Population))) + geom_boxplot() + geom_point() ggarrange(m1,m2,m3,m4, nrow=2,ncol=2)