Peyrard Nathalie wrote:> I would like to know if (as the usa map with Splus), it is possible with > R to plot the french map and to add points (representing towns for > instance) on the figure in the appropriate (x,y) system.You can use my Rmap library (http://www.maths.lancs.ac.uk/Software/Rmap/) to plot geographic maps in R. You then need to get the data for France. Rmap is tested mostly with ESRI shapefile datasets. Here are two web sites with French department data sets, but you must make sure your use of them conforms with the licensing of the data set: http://www.cdc.gov/epiinfo/EIeurope.htm http://www.ign.fr/affiche_rubrique.asp?rbr_id=809&lng_id=FR Rmap is in very early stages of development, and so you may have problems getting it working on your machine. It is mainly tested on Linux platforms, so Windows users may have problems. Barry Rowlingson Maths and Stats Lancaster University Lancaster, UK
At 16:21 30/06/2003, Peyrard Nathalie wrote:>Hello, > >I would like to know if (as the usa map with Splus), it is possible with R >to plot the french map and to add points (representing towns for instance) >on the figure in the appropriate (x,y) system. >Thank you. > > Nathalie PeyrardYou can download the french map at http://www.ign.fr/affiche_rubrique.asp?rbr_id=810&lng_id=FR in shape files (ESRI) format and then use the library 'shapefiles' to load the map into R. I have write a small function to convert shapefiles into poly fomat. May be this function could be incorporated into Benjamin Stabler's package ?? Benjamin contact me if you are intersted. Transform the shapefile into poly objects and then use the plotpolys function of the spdep package. Then you use graphical functions such as points shape2poly <- function(shape) { nrecord <- length(shape$shp$shp) res <- list() id <- vector("character",nrecord) recta <- matrix(0,nrecord,4) for (i in 1:nrecord) { res <- c(res, list(as.matrix(shape$shp$shp[[i]]$points))) id [i]<- as.character(shape$dbf$dbf[i,1]) recta[i,] <- as.vector(shape$shp$shp[[i]]$box) } attr(res, "region.id") <- id attr(res, "region.rect") <- recta class(res) <- "polylist" return(res) } myshp<-read.shapefile("'myshapefile") polyeco<-shape2poly(myshp) plotpolys(polyeco,attributes(polyeco)$region.rect) points(...,...)
Hello, I would like to know if (as the usa map with Splus), it is possible with R to plot the french map and to add points (representing towns for instance) on the figure in the appropriate (x,y) system. Thank you. Nathalie Peyrard
Have you tried www.r-project.org -> search -> "R Site Search"? There are several geographers who follow this list. From the above mentioned search, I found an exchange with subject "Mapping in R" discussing such a thing dated mercredi 21 novembre 2001 17:21, from: Christophe DECLERCQ, MD Observatoire R?gional de la Sant? Nord-Pas-de-Calais 13, rue Faidherbe 59046 LILLE Cedex FRANCE Phone +33 3 20 15 49 24 Fax +33 3 20 55 92 30 E-mail c.declercq at orsnpdc.org hope this helps. spencer graves Peyrard Nathalie wrote:> Hello, > > I would like to know if (as the usa map with Splus), it is possible with > R to plot the french map and to add points (representing towns for > instance) on the figure in the appropriate (x,y) system. > Thank you. > > Nathalie Peyrard > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Nathalie, You could have a look at the web site of the Institut G?ographique National (http://www.ign.fr) where you can download a free SHAPEFILE with polygon data for the French d?partements. You can choose one of two projections: LAMBERT II ?tendu or LAMBERT 93 (http://www.ign.fr/affiche_rubrique.asp?rbr_id=810&lng_id=FR). In the associated DBF file, you get the name and the x,y coordinates for the pr?fecture of each d?partement. You could use these data in R with one of the packages which read shapefiles (for example, 'shapefiles' which is on CRAN or the draft package 'maptools'- see http://spatial.nhh.no/R/ - which is already very useful as it is). I hope it helps. Christophe -- Christophe DECLERCQ, MD Observatoire R?gional de la Sant? Nord-Pas-de-Calais 13, rue Faidherbe 59046 LILLE Cedex FRANCE Phone +33 3 20 15 49 24 Fax +33 3 20 55 92 30 E-mail c.declercq at orsnpdc.org> -----Message d'origine----- > De : r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch]De la part de Peyrard Nathalie > Envoy? : lundi 30 juin 2003 15:21 > ? : r-help at stat.math.ethz.ch > Objet : [R] french map > > > Hello, > > I would like to know if (as the usa map with Splus), it is possible with > R to plot the french map and to add points (representing towns for > instance) on the figure in the appropriate (x,y) system. > Thank you. > > Nathalie Peyrard > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >