Report not found

There was a problem finding this report.
Crunchbase example 3
July 17, 2014 · Refreshed 2 months ago
Description
A county map of startup density

Collaborators

Run History
SELECT l.county_code AS county_id, COUNT(*) AS rate FROM crunchbase.companies c JOIN benn.city_to_county_lookup l ON l.state = c.state_code AND l.city = c.city GROUP BY 1 ORDER BY 2 DESC
SELECT l.county_code AS county_id, COUNT(*) AS rate FROM crunchbase.companies c JOIN benn.city_to_county_lookup l ON l.state = c.state_code AND l.city = c.city GROUP BY 1 ORDER BY 2 DESC
<style> h3 {text-align: center; } .counties { fill: #ccc; } .states { fill: none; stroke: #fff; stroke-linejoin: round; } .q0-9 { fill:#ffffcc} .q1-9 { fill:#ffeda0} .q2-9 { fill:#fed976} .q3-9 { fill:#feb24c} .q4-9 { fill:#fd8d3c} .q5-9 { fill:#fc4e2a} .q6-9 { fill:#e31a1c} .q7-9 { fill:#bd0026} .q8-9 { fill:#800026} svg { width: auto; height: auto; } </style> <h3>Number of Startups by County</h3> <p style="text-align:center;">Areas with more startups are shaded red</p> <div id="map"></div> <body> <script src="//cdnjs.cloudflare.com/ajax/libs/queue-async/1.0.4/queue.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/topojson/1.1.0/topojson.min.js"></script> <script> var width = 780, height = 400; var rateById = d3.map(); var projection = d3.geo.albersUsa() .scale(900) .translate([(width / 2) + 50, height / 2]); var path = d3.geo.path() .projection(projection); var svg = d3.select("#map").append("svg") .attr("width", width) .attr("height", height); counties = dataset.content; var max = 0; counties.forEach( function(d) { rateById.set(d.county_id, +d.rate); if ( +d.rate > max) { max = +d.rate; } }) domainMax = .5*max var quantize = d3.scale.quantize() .domain([0, domainMax]) .range(d3.range(9).map(function(i) { return "q" + i + "-9"; })); queue() .defer(d3.json, "https://dl.dropboxusercontent.com/s/sh04tjwairb7vgk/counties.json") .await(ready); if (mode && mode.resize) { mode.resize(); } function ready(error, us) { svg.append("g") .attr("class", "counties") .selectAll("path") .data(topojson.feature(us, us.objects.counties).features) .enter().append("path") .attr("class", function(d) { return quantize(rateById.get(d.id)); }) .attr("d", path); svg.append("path") .datum(topojson.mesh(us, us.objects.states, function(a, b) { return a !== b; })) .attr("class", "states") .attr("d", path); } </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