Quick idea to understand what modules get imported.
Example:
>>> import importlog
# Run a bunch of code
>>> import shapely.geometry
>>> p = shapely.geometry.Point(0.0, 0.0)
>>> b = p.buffer(1.0)
Quick idea to understand what modules get imported.
Example:
>>> import importlog
# Run a bunch of code
>>> import shapely.geometry
>>> p = shapely.geometry.Point(0.0, 0.0)
>>> b = p.buffer(1.0)
{ | |
"type": "network", | |
"nodes": [ | |
{"coordinates": [-71.13568, 42.38196], "properties": {}}, | |
{"coordinates": [-71.13555, 42.382523], "properties": {"highway": "traffic_signals"}}, | |
{"coordinates": [-71.134087, 42.38384], "properties": {"railway": "level_crossing"}}, | |
{"coordinates": [-71.141007, 42.386862], "properties": {"highway": "crossing"}} | |
], | |
"geometries": [ | |
{"type": "LineString", "nodes": [0, 1, 2], "properties": {"highway": "primary", "name": "Main Street"}}, |
Thinking about the Turf tornado analysis from https://www.mapbox.com/blog/60-years-of-tornadoes-with-turf/ and what the similar approacoh is in GeoPandas.
The two programs take slightly different approaches to the counting. Turf loops over the counties, counting how many tornadoes fall inside its borders. GeoPandas performs a spatial join - first forming a spatial index on the tornadoes. The joined GeoDataFrame combines the columns (properties) of both sets. Then a groupby
operation is performed counting the number of entries for each county.
The Turf version is significantly faster - most likely due to the slow spatial join operation in GeoPandas and that all columns are included resulting in a large final DataFrame - and probably just that node is much faster than Python here. Overall, Turf's speed is impressive.
<?xml version="1.0" encoding="UTF-8"?> | |
<gpx | |
version="1.1" | |
creator="RunKeeper - http://www.runkeeper.com" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns="http://www.topografix.com/GPX/1/1" | |
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" | |
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"> | |
<trk> | |
<name><![CDATA[Running 7/10/14 8:54 pm]]></name> |
On the Maptime Boston Meetup Page someone pointed out a map of the top 250 beers on beeradvocate.com. Keeping with the spirit of Maptime I extracted out the data so that anyone can make a map they want.
I downloaded the GeoJSON embedded in the map on this page: http://epic-curiousity.com/2014/06/beer-bucket-list-map-top-250.html
It was heavily parsed to produce the resulting beers.geojson. Each beer has the following properties: