Skip to content

Commit

Permalink
Update utils.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbaumann committed Feb 23, 2018
1 parent e8c195f commit 3270df7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs-markdown/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,21 @@ df['Elevation (feet)'] = df['Elevation (feet)'].astype(float)
# Clean up by dropping null rows
df.dropna(axis=1, how='all', inplace=True)

# Create geojson data object
# Create geojson file output
df_to_geojson(
df.fillna(''),
filename="cdec.geojson",
properties=['CDEC ID', 'CNRFC ID', 'Gage Type', 'Elevation (feet)'],
precision=4
)
>>> {'feature_count': 2353, 'filename': 'cdec.geojson', 'type': 'file'}

# Create geojson python dict
data = df_to_geojson(
df.fillna(''),
properties=['CDEC ID', 'CNRFC ID', 'Gage Type', 'Elevation (feet)'],
precision=4
)
```

## scale_between
Expand Down

0 comments on commit 3270df7

Please sign in to comment.