Skip to content

Instantly share code, notes, and snippets.

@johnjosephhorton
Created March 6, 2012 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnjosephhorton/1989087 to your computer and use it in GitHub Desktop.
Save johnjosephhorton/1989087 to your computer and use it in GitHub Desktop.
Code for making a plot of contractor locations
library(ggplot2)
library(sqldf)
# using the dataset 'raw' wich is a list of contractors by lat, long
df <- sqldf("SELECT COUNT(*) AS num, LocLat, LocLong
FROM raw GROUP BY LocLat, LocLong")
g <- qplot(LocLong,LocLat, colour=num, size=log(num), data = df)
png("india.png")
print(g)
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment