Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1125c2d

Browse filesBrowse files
committed
added geojson snippet
1 parent 526108f commit 1125c2d
Copy full SHA for 1125c2d

File tree

Expand file treeCollapse file tree

2 files changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-7
lines changed

‎geo/geojson.ipynb

Copy file name to clipboardExpand all lines: geo/geojson.ipynb
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,29 +147,29 @@
147147
"source": [
148148
"\n",
149149
"\n",
150-
"coordinates = zip(df['Longitude'], df['Latitude'])\n",
151-
"points = [geojson.Feature(geometry=geojson.Point(c)) for c in coordinates]\n",
150+
"values = zip(df['Longitude'], df['Latitude'], df['Remark'])\n",
151+
"points = [geojson.Feature(geometry=geojson.Point(c), properties=) for v in values]\n",
152152
"\n",
153153
"print(points[0])"
154154
]
155155
},
156156
{
157157
"cell_type": "code",
158-
"execution_count": 8,
158+
"execution_count": 11,
159159
"metadata": {
160160
"collapsed": false
161161
},
162162
"outputs": [],
163163
"source": [
164164
"\n",
165165
"\n",
166-
"geo_collection = geojson.GeometryCollection(points[:100])\n",
166+
"geo_collection = geojson.FeatureCollection(points[:100])\n",
167167
"\n"
168168
]
169169
},
170170
{
171171
"cell_type": "code",
172-
"execution_count": 9,
172+
"execution_count": 12,
173173
"metadata": {
174174
"collapsed": false
175175
},
@@ -181,7 +181,7 @@
181181
},
182182
{
183183
"cell_type": "code",
184-
"execution_count": 10,
184+
"execution_count": 13,
185185
"metadata": {
186186
"collapsed": false
187187
},

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.