Accidents by Precinct (Brooklyn)
Number of accidents with contributing factors reported
Querying Multiple Data Sets in CivicData.com
CivicData.com's SQL Search API lets you execute SQL statements against datasets, and even combine them with SQL joins. This makes it possible to run queries across different data sets and mash up data in new and intersting ways.
The chart above was generated by querying two different data sets in CivicData.com. To see the raw JSON resonse for the SQL query below, click here.
SELECT "ac4a59ea-bf90-4623-9d41-9046875171b2"."OccurrencePrecinctCode" AS "Precinct Code", COUNT("ac4a59ea-bf90-4623-9d41-9046875171b2"."CollisionID") AS "Num Accidents where factors reported" from "ac4a59ea-bf90-4623-9d41-9046875171b2", "f5795be2-ac78-4580-b831-3df42842071c" WHERE "ac4a59ea-bf90-4623-9d41-9046875171b2"."CollisionID" = "f5795be2-ac78-4580-b831-3df42842071c"."CollisionID" AND "f5795be2-ac78-4580-b831-3df42842071c"."ContributingFactorCode" IS NOT NULL GROUP BY "ac4a59ea-bf90-4623-9d41-9046875171b2"."OccurrencePrecinctCode" ORDER BY "Num Accidents where factors reported" DESC