Last active
December 29, 2015 01:49
-
-
Save thephw/7595760 to your computer and use it in GitHub Desktop.
Men's Roller Derby Teams
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
require 'csv' | |
require 'json' | |
data = CSV.parse(File.read('mens_derby_ilcs.csv')) | |
features = data[1..-1].map do |row| | |
{ geometry: { type: 'Point', coordinates: [row[11],row[10]]}, type: 'Feature', properties: Hash[*data[0].zip(row).flatten]} | |
end | |
feature_collection = {type: "FeatureCollection", features: features} | |
puts feature_collection.to_json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nevermind, I apparently just can't read documentation at 2am.