Drawing maps using shapefiles and R

October 4, 2011

(This article was first published on Daniel MarcelinoDaniel Marcelino » R, and kindly contributed to R-bloggers)

Shapefile Brazil: SenateSometimes a student may use a self explained chart, instead of a boring table for showing outcomes in a research paper. Yet, graphs are efficient in showing the broad picture of an issue and also for present results. In political science, you can getting into this topic reading Kastellec and Leoni (2007), for instance.

I usually like draw maps to present electoral results or to show correlation whatever. In this scrap, however, I show a clue for show regression estimates in a nice cartography using R – a free statistical package.

To plot the chart with OLS coefficients I need first get them. So, I repeated the following command for each of those 27 Brazilian states:

To leave a comment for the author, please follow the link and comment on their blog: Daniel MarcelinoDaniel Marcelino » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)