Created
September 20, 2013 08:09
-
-
Save oscarperpinan/6634601 to your computer and use it in GitHub Desktop.
Code to create siar.geojson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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