Report not found

There was a problem finding this report.
NYC Taxis - Map
June 20, 2014 · Refreshed about 2 years ago
Cloned from NY Map - dot map
Description
Plots 50,000 random pickups from June 18, 2013. Pickups are colored by the racial composition of the Census tracts in which it occurred. Only includes tracts in Manhattan.

Collaborators

Run History
SELECT taxi.pickup_latitude AS lat, taxi.pickup_longitude AS lng, (people.population - people.white)/CASE WHEN people.population > 0 THEN people.population ELSE 1 END AS non_white_percent FROM benn.nyc_taxi_data_june_week taxi JOIN benn.tract_lookup tract ON tract.lat = ROUND(taxi.pickup_latitude*1000)/1000 AND tract.long = ROUND(taxi.pickup_longitude*1000)/1000 AND tract.county = 'New York' JOIN benn.nyc_census_tract_people people ON people.county = tract.county AND people.tract_number = tract.tract_code WHERE taxi.pickup_datetime >= '2013-06-18' AND taxi.pickup_datetime < '2013-06-19' ORDER BY RANDOM() LIMIT 100000
SELECT taxi.pickup_latitude AS lat, taxi.pickup_longitude AS lng, (people.population - people.white)/CASE WHEN people.population > 0 THEN people.population ELSE 1 END AS non_white_percent FROM benn.nyc_taxi_data_june_week taxi JOIN benn.tract_lookup tract ON tract.lat = ROUND(taxi.pickup_latitude*1000)/1000 AND tract.long = ROUND(taxi.pickup_longitude*1000)/1000 AND tract.county = 'New York' JOIN benn.nyc_census_tract_people people ON people.county = tract.county AND people.tract_number = tract.tract_code WHERE taxi.pickup_datetime >= '2013-06-18' AND taxi.pickup_datetime < '2013-06-19' ORDER BY RANDOM() LIMIT 100000
<!DOCTYPE html> <meta charset="utf-8"> <style> .hood { stroke: #525252; fill: #EBEBEB; } .circle { opacity: 0.4; } .title { font: 14px sans-serif; font-style: italic; } #map { text-align: center;} svg { background-color: #ffffff; } </style> <div id="map"></div> <script> var p = d3.format("%") // var colorScale = ["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba" ] var colorScale = ["#2b83ba","#abdda4","#ffffbf","#fdae61","#d7191c" ] var c = d3.scale.quantize() .domain([0,1]) .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.96, 40.77]) .scale(180000) .translate([(width) / 2, (height)/2]); var path = d3.geo.path() .projection(projection); d3.json('https://dl.dropboxusercontent.com/s/08m08cc6u774ouz/nyc.geojson', function(json) { trips = dataset.content; dots = []; trips.forEach(function(d) { var coor = [d.lng,d.lat]; var pnt = projection(coor); var ent = { x1:pnt[0],y1:pnt[1],pct:d.non_white_percent} dots.push(ent) }) var legendBars = map.selectAll("rect") .data(colorScale) .enter() .append("rect") .attr("x", function (d,i) { return 180 + (Math.floor(i)*40); }) .attr("y", function (d) { return 200; }) .attr("height", function (d) { return 15; }) .attr("width", function (d) { return 40; }) .style("fill", function(d) { return d; }); map.selectAll("text") .data(colorScale) .enter() .append("text") .attr("x", function(d,i) {return 180 + (Math.floor(i)*40); }) .attr("y", 225) .attr("dy", ".35em") .attr("text-anchor","middle") .text(function(d,i) { if ( i != 0) { return p((5-i)*20/100); } else { return "";} }); 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) .attr("class","circle") .style("fill",function(d) { return c(d.pct); }) map.append("text") .attr("x",280) .attr("y",130) .attr("class","title") .attr("text-anchor","middle") .text("50,000 random taxi pickups from June 18, 2013") map.append("text") .attr("x",180 + 100) .attr("y",175) .attr("text-anchor","middle") .text("Percent of neighborhood's") map.append("text") .attr("x",180 + 100) .attr("y",190) .attr("text-anchor","middle") .text("population that is white") }); </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