There is a more recent run of this report. Click here to view it.

Report not found

There was a problem finding this report.
NY Map - dot map
June 19, 2014 · Refreshed about 5 years ago
Cloned from NY Map
Description
Map of NY

Collaborators

Run History
SELECT -- ROW_NUMBER() OVER () AS id, RANDOM() AS random, ROUND(pickup_longitude*1000)/1000 AS start_lng, ROUND(pickup_latitude*1000)/1000 AS start_lat, -- dropoff_longitude AS stop_lng, -- dropoff_latitude AS stop_lat, trip_distance AS shading -- 2 AS random_value FROM benn.nyc_taxi_data_jan_1 WHERE pickup_latitude > 40 AND pickup_latitude < 41 AND pickup_longitude > -74 AND pickup_longitude < -73 ORDER BY 1 LIMIT 50000
SELECT -- ROW_NUMBER() OVER () AS id, RANDOM() AS random, ROUND(pickup_longitude*1000)/1000 AS start_lng, ROUND(pickup_latitude*1000)/1000 AS start_lat, -- dropoff_longitude AS stop_lng, -- dropoff_latitude AS stop_lat, trip_distance AS shading -- 2 AS random_value FROM benn.nyc_taxi_data_jan_1 WHERE pickup_latitude > 40 AND pickup_latitude < 41 AND pickup_longitude > -74 AND pickup_longitude < -73 ORDER BY 1 LIMIT 50000
<!DOCTYPE html> <meta charset="utf-8"> <style> rect.selection { stroke: gray; opacity: 0.3; fill: steelblue; } .hood { stroke: #525252; fill: #EBEBEB; } .d3-tip { line-height: 1; font-weight: bold; padding: 12px; background: rgba(0, 0, 0, 0.8); color: #fff; border-radius: 2px; } .d3-tip:after { box-sizing: border-box; display: inline; font-size: 10px; width: 100%; line-height: 1; color: rgba(0, 0, 0, 0.8); content: "\25BC"; position: absolute; text-align: center; } .d3-tip.n:after { margin: -1px 0 0 0; top: 100%; left: 0; } </style> <div id="map"></div> <script src="//cdnjs.cloudflare.com/ajax/libs/d3-tip/0.6.3/d3-tip.min.js"></script> <script src="https://cdn.rawgit.com/mbostock/d3/master/lib/colorbrewer/colorbrewer.js"></script> <script> $('input:radio').change(function(){ highlighting = $(this).val() }) $('#reset').click(function(){ d3.selectAll(".circle").classed("hidden",false).classed("highlight",false); }) highlighting = "origin"; // var colorScale = colorbrewer.Blues[9]; var colorScale = ["#d7191c", "#fdae61", "#ffffbf", "#abd9e9", "#2c7bb6"] var c = d3.scale.quantize() .domain([0, 5]) .range(colorScale); var width = 960, height = 700, radius = 1; var map = d3.select('#map').append('svg') .attr("width", width) .attr("height", height); var projection = d3.geo.mercator() .center([-73.94, 40.75]) .scale(100000) .translate([(width) / 2, (height)/2]); var path = d3.geo.path() .projection(projection); var tip = d3.tip() .attr('class', 'd3-tip') .offset([-10, 0]) .html(function(d) { return d.name; }); map.call(tip); d3.json('https://dl.dropboxusercontent.com/s/08m08cc6u774ouz/nyc.geojson', function(json) { trips = dataset.content; dots = []; trips.forEach(function(d) { var startCoor = [d.start_lng,d.start_lat]; var endCoor = [d.stop_lng,d.stop_lat]; var sPnt = projection(startCoor); var ePnt = projection(endCoor); var ent = { x1:sPnt[0],y1:sPnt[1],x2:ePnt[0],y2:ePnt[1],shading:d.shading } dots.push(ent) }) map.selectAll('path') .data(json.features) .enter().append('path') .attr('d', path) .attr('class','hood'); map.selectAll("start") .data(dots) .enter().append("circle") .attr("cx",function(d){ return d.x1; }) .attr("cy",function(d){ return d.y1; }) .attr("r",radius) .style("fill",function(d) { return c(d.shading); }) }); </script>
{{ dataSourceName(params.queryId) }}

The dataset is too large to view in browser

Export

Looks like something went wrong with your query.

{{ DS.queryRuns[params.queryId].errorMessage }}
This query was cancelled