Map

40 views
Skip to first unread message

Konstantinos Petridis

unread,
Jul 19, 2014, 4:11:45 AM7/19/14
to ggp...@googlegroups.com

Dear ggplot2 experts,

I want to construct the map of Greece for several categories of data.
But I want this map to be divided per prefecture as show in the image.

Can you please help me?

Thank you in advance,

Kostas

Roman Luštrik

unread,
Jul 19, 2014, 8:27:33 AM7/19/14
to Konstantinos Petridis, ggplot2
What is the question? Do you have access to proper shapes/polygons?

Cheers,
Roman


--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
In God we trust, all others bring data.

Konstantinos Petridis

unread,
Jul 19, 2014, 8:33:32 AM7/19/14
to ggp...@googlegroups.com, costas.e...@gmail.com

Hello,
Thank you for your reply.
l have donloaded a md5 file with the preented structure, but I couldn't find a package to handle such datasets in R.

Best regards,
Kostas

Sean O'Riordain

unread,
Jul 19, 2014, 8:34:19 AM7/19/14
to Konstantinos Petridis, ggplot2
Kostas,
Firstly you'll need a suitable map, I'm guessing that the "Administrative Areas" level 2 data from
http://www.diva-gis.org/gdata
will do the trick.  i.e. go to the above and grab the zip of the shapefiles... unzip and you'll see there are three sets,
GRC_adm0, GRC_adm1, GRC_adm
where 0 is just the country outline, 1 and 2 are internal administration levels - I suspect you want 2...

If you want to look at the shape file, try simply...

# skipping using ggplot2 for the moment...
libary(maptools)
g1 <- readShapePoly('GRC_adm2')
# plain black and white boundaries
plot(g1)

# but what are the administrative "shapes" in there?
str(g1@data)
g1@data

After that you need to be more clear about what data you have and what you want to do! :-) - as Roman says... "What is the question?"

Sean



--

Roman Luštrik

unread,
Jul 19, 2014, 8:44:36 AM7/19/14
to Sean O'Riordain, Konstantinos Petridis, ggplot2
Try looking at this Spatial view for more information on how to handle spatial data.


Cheers,
Roman

Konstantinos Petridis

unread,
Jul 21, 2014, 5:35:45 AM7/21/14
to ggp...@googlegroups.com, sea...@acm.org, costas.e...@gmail.com
Thank you all for your respones. You were very helpful
Reply all
Reply to author
Forward
0 new messages