Skip to content

Instantly share code, notes, and snippets.

@oscarperpinan
Created September 20, 2013 08:09
Show Gist options
  • Save oscarperpinan/6634601 to your computer and use it in GitHub Desktop.
Save oscarperpinan/6634601 to your computer and use it in GitHub Desktop.
Code to create siar.geojson
library(sp)
library(rgdal)
setwd(tempdir())
download.file('https://raw.github.com/oscarperpinan/solar/gh-pages/data/SIAR.csv', 'siar.csv', method='wget')
siar <- read.csv('siar.csv')
summary(siar)
siarSP <- SpatialPointsDataFrame(siar[,c(6, 7)], siar[,-c(6,7)])
writeOGR(siarSP, 'siar.geojson', 'siarSP', driver='GeoJSON')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment