Skip to content

Commit 6872846

Browse files
Update ReDU_map_alpha.R
1 parent b4b0e12 commit 6872846

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

examples/ExtendedDataFigure1/ReDU_map_alpha.R

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,6 @@ chemical_sum <- df_1 %>% group_by(LatitudeandLongitude, Lat, Long, Compound_Name
2121
chemical_sum <- chemical_sum %>% group_by(LatitudeandLongitude, Lat, Long) %>% summarise(total_hits = sum(Files))
2222
plot_sum <- chemical_sum %>% left_join(number_files[,c("LatitudeandLongitude","Unique")], by="LatitudeandLongitude") %>% mutate(proportion = total_hits/Unique)
2323

24-
25-
26-
### PLOT NUMBER OF FILES
27-
plot_number_files <- subset(number_files, number_files$Lat != "not specified" & number_files$Lat != "not applicable")
28-
plot_number_files$Unique <- log(plot_number_files$Unique,10)
29-
#Using GGPLOT, plot the Base World Map
30-
mp <- NULL
31-
mapWorld <- borders("world", colour="gray90", fill="gray90") # create a layer of borders
32-
mp <- ggplot() + mapWorld
33-
print(mp)
34-
#Now Layer the cities on top
35-
mp <- mp + geom_point(data=plot_number_files, aes(x=as.numeric(Long), y=as.numeric(Lat), colour=as.numeric(Unique)), size=1.5, alpha=0.7) +
36-
scale_color_viridis(option="B")+
37-
theme_minimal()+
38-
theme(legend.position="bottom",
39-
legend.title=element_text(colour="black", size=6),
40-
legend.text=element_text(colour="black", size=6))+
41-
labs(x="Longitude", y="Latitude", colour = "Log10(# of Files)")
42-
print(mp)
43-
#ggsave(mp, file="Manuscript/Figures/Source_Material/ReDU_Map_NumberofFiles.pdf", width = 8, height = 5, units = "in", useDingbats=FALSE)
44-
45-
4624
### PLOT NUMBER OF ANNOTATIONS / FILE
4725
plot_sum <- subset(plot_sum, plot_sum$Lat != "not specified" & plot_sum$Lat != "not applicable")
4826
plot_sum$proportion <- log(plot_sum$proportion,10)
@@ -64,8 +42,7 @@ mp <- mp + geom_point(data=plot_sum, aes(x=as.numeric(Long), y=as.numeric(Lat),
6442
legend.text=element_text(colour="black", size=6))+
6543
labs(x="Longitude", y="Latitude", colour = "Log10(# of Annotations / # of Files)")
6644
print(mp)
67-
ggsave(mp, file="Manuscript/Figures/Source_Material/ReDU_Map_NumberofAnnotationsPerFile.pdf",
68-
width = 3.5, height = 2.5, units = "in", useDingbats=FALSE)
45+
ggsave(mp, file="Manuscript/Figures/Source_Material/ReDU_Map_NumberofAnnotationsPerFile.pdf", width = 3.5, height = 2.5, units = "in", useDingbats=FALSE)
6946

7047

7148

0 commit comments

Comments
 (0)