[R-sig-Geo] Interpolation lat-lon temperatura-date
enric
eagud.q at tv3.cat
Fri Sep 7 15:52:16 CEST 2012
Hello R users!
I am new in R, I have my shapefile a data file with the names of cities,
latitude, longitude and temperature. By now I can plot my region and also
the numbers of the temperature.
http://r-sig-geo.2731867.n2.nabble.com/file/n7580920/rplot.jpg
library(maptools)
library(RColorBrewer)
library(classInt)
http://r-sig-geo.2731867.n2.nabble.com/file/n7580920/dades.csv dades.csv
# read shapefile with projection information
myshp<-readShapePoly("ESP_adm1.shp", proj4string=CRS("+proj=longlat"))
# read data
tb <- read.csv("dades.csv")
print(tb)
tb$longitud
range(tb$temperatura)
nclr = 8
plottitle = "Temperatura"
plotvar = tb$temperatura
jpeg('rplot.jpg')
plot(myshp, xlim=c(0,3), ylim=c(40.5,43)) text(tb$longitud, tb$latitud,
labels=tb$temperatura, cex=0.8, col="blue")
par(oma=c(0,0,0,1))
legend("bottomright", legend=names(attr(colcode, "table")),
fill=attr(colcode,"palette"), cex=0.7)
title(plottitle)
dev.off()
How I can interpolate these temperature-data and plot a map with colours?
How someone can help me
Thank you
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Interpolation-lat-lon-temperatura-date-tp7580920.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list