Point-in-polygon with CARTO API

Data events allow you to grab information about a point's location, i.e. which polygon the point lies in. This example illustrates how to set up two data events. Both take advantage of CARTO's querying ability through the SQL API. The first one uses a nearest neighbor query to find the nearest brewery. The second example pulls in the name of the neighborhood polygon in which the point is contained.