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.

regr_intercept(...)

regr_intercept(...)

Returns the y-intercept of the linear least squares fit

Works with the following datatypes:

This function works with 2.1 endpoint(s). What does this mean? »

The regr_intercept(...) function returns the y-intercept of a linear least squares fit of two sets of numeric values (Numbers). For example, to obtain the linear least squares fit y-intercept between the typical number of hours assigned and their hourly rate for all employees in the City of Chicago:

https://data.cityofchicago.org/resource/tt4n-kn4t.json?$select=regr_intercept(typical_hours,hourly_rate)

It can also be used in $group aggregations, like this one to get the y-intercept by full or part time status:

https://data.cityofchicago.org/resource/tt4n-kn4t.json?$select=full_or_part_time,regr_intercept(typical_hours,hourly_rate)&$group=full_or_part_time