Skip to content

Commit

Permalink
Add feature properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuzak committed Sep 8, 2014
1 parent 880dc30 commit 614a6a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion accession_locations.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion versailes2geojson.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# read in original data
csv = pd.read_csv("versaille_stock.csv", sep="\t")

# Pandas puts NaN in empty fields
# swap NaN for empty strings
csv = csv.fillna("")
# fetch properties, remove Long and Lat
props = list(csv.columns.values)
props = [p for p in props if p not in ["Longitude",
Expand All @@ -19,7 +22,8 @@
feature_props = {p: accession[p] for p in props}

f = Feature(
geometry = Point((lon,lat))
geometry = Point((lon,lat)),
properties = feature_props
)

features.append(f)
Expand Down

0 comments on commit 614a6a4

Please sign in to comment.