Dear Jlacko,
thank you so much for finding your important time for me and helping me
I appreciate it. The code I was trying is here---
rm(list=ls(all=TRUE))
library(readxl)
library(ggplot2)
library(rgdal)
library(sp)
library(sf)
library(dplyr)
setwd("D:/Analysis/Continents/spatial_plot/")
file <-read.csv("sample_data.csv", header = T)
# Reading Europe shapefile
Europe <- readOGR(
dsn= path.expand("D:/Analysis/World_Countries"),
layer="TM_WORLD_BORDERS_SIMPL-0.3",
verbose=FALSE
)
ggplot() +
geom_polygon(data = Europe, aes(x = long, y = lat, group = group), fill="#f4f3f3", color = "Black", size = 0.02) +
geom_point(aes(x= Longitude, y = Latitude, colour = Mean_values, shape = Variable), data = MCA, alpha = 4)+ #, size = Country
scale_color_gradientn(name="Standard values", colours=c( "#66CC99","#F26120"))+ # change color scale
coord_equal(ratio=1) + # square plot to avoid the distortion
coord_map("lambert", xlim = c(-15, -170), ylim = c(10, 85))+
scale_shape_manual(values=c(19, 15))+ #, 17
scale_size_manual(values=c(3, 2))+ #, 4
guides(shape = guide_legend(override.aes = list(colour = c( "#66CC99","#F26120")))) + ## Change legend shape colors
theme(legend.position="bottom")+
labs(x="", y="", title="")+ #labels
facet_wrap(~ Century, ncol = 2)+
theme_bw()
Please, can you help me finding my mistakes
(some times lat-long shrinks one side)
my data looks like this--
| Century |
Variable |
Mean_values |
Latitude |
Longitude |
Elevation (m) |
| 800 |
Temp |
1.077865651 |
62.55 |
-153.633333 |
320 |
| 900 |
Temp |
-1.139270001 |
62.55 |
-153.633333 |
320 |
| 1000 |
Temp |
1.058128538 |
62.55 |
-153.633333 |
320 |
| 1100 |
Temp |
0.176537507 |
62.55 |
-153.633333 |
320 |
| 1200 |
Temp |
-1.178744226 |
62.55 |
-153.633333 |
320 |
| 1300 |
Temp |
0.005482531 |
62.55 |
-153.633333 |
320 |
| 800 |
Temp |
-0.954756515 |
72.6 |
-38.5 |
3200 |
| 900 |
Temp |
0.445790152 |
72.6 |
-38.5 |
3200 |
| 1000 |
Temp |
-0.007414765 |
72.6 |
-38.5 |
3200 |
| 1100 |
Temp |
0.546643015 |
72.6 |
-38.5 |
3200 |
| 1200 |
Temp |
-1.24718762 |
72.6 |
-38.5 |
3200 |
| 1300 |
Temp |
-0.462729575 |
72.6 |
-38.5 |
3200 |
| 800 |
Precip |
0.199488452 |
72.6 |
-38.5 |
3200 |
| 900 |
Precip |
1.541942655 |
72.6 |
-38.5 |
3200 |
| 1000 |
Precip |
0.536791115 |
72.6 |
-38.5 |
3200 |
| 1100 |
Precip |
-0.158603281 |
72.6 |
-38.5 |
3200 |
| 1200 |
Precip |
-0.952745759 |
72.6 |
-38.5 |
3200 |
| 1300 |
Precip |
-1.166873182 |
72.6 |
-38.5 |
3200 |
| 800 |
Precip |
-1.398941525 |
38.704767 |
-90.081279 |
122 |
| 900 |
Precip |
-0.534359638 |
38.704767 |
-90.081279 |
122 |
| 1000 |
Precip |
-0.318214167 |
38.704767 |
-90.081279 |
122 |
| 1100 |
Precip |
-0.030020204 |
38.704767 |
-90.081279 |
122 |
| 1200 |
Precip |
0.978658663 |
38.704767 |
-90.081279 |
122 |
| 1300 |
Precip |
1.302876871 |
38.704767 |
-90.081279 |
122 |