Skip to content

Commit

Permalink
Record made up id for each campsite
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Sep 28, 2013
1 parent b6852de commit 67c272c
Show file tree
Hide file tree
Showing 2 changed files with 497 additions and 248 deletions.
4 changes: 3 additions & 1 deletion source_data/convert.rb
Expand Up @@ -34,9 +34,11 @@ def convert_plist_to_json(input, output)
# end
# write_json(data, "data.json")

id = 1
data = all_campsites.map do |campsite|
park = all_parks.find{|park| campsite["parkWebId"] == park["webId"]}
campsite = campsite.merge("park_name" => park["shortName"])
campsite = campsite.merge("park_name" => park["shortName"], :id => id)
id += 1
# For the time being we're removing the ones we aren't using
campsite.delete("webId")
campsite.delete("parkWebId")
Expand Down

0 comments on commit 67c272c

Please sign in to comment.