Socrata was acquired by Tyler Technologies in 2018 and is now the Data and Insights division of Tyler. The platform is still powered by the same software formerly known as Socrata but you will see references to Data & Insights going forward.

Checkbox Datatype

Checkbox fields are boolean values that represent either true or false. If a value was not provided for the field, they can also be null. Example, in JSON:

[ {
  "checkbox_column": true
} ]

The following operators can be used with checkbox fields:

Operator Description
!= TRUE when two checkbox booleans have the same value
= TRUE when two checkbox booleans do not have the same value

And the following functions can be used with them:

Keyword Name Description Availability
distinct Returns distinct set of records 2.1
Function Name Description Availability
case(...) Returns different values based on the evaluation of boolean comparisons 2.1
count(...) Returns a count of a given set of records 2.0 and 2.1

For example, in combination with an aggregation, to get the count of all of the crimes in Chicago that resulted in arrest:

https://data.cityofchicago.org/resource/6zsd-86xi.json?$select=count(*)&$where=arrest=true

Since checkbox values are already booleans, you can actually leave off the =true in that expression:

https://data.cityofchicago.org/resource/6zsd-86xi.json?$select=count(*)&$where=arrest