Let's use Socrata functions for querying inspection records by restaurant name or partial search term. The Socrata Open Data API is available for open-government databases maintained by NYC and other governments. Related to Issues #8 and #12
Currently, server.js returns up to 999 records that match query parameters such as borough and zipcode. server.js then filter those results by the name search term.
This process is flawed. The user might be looking for a restaurant that's not among those first 999 records.
The Socrata "like '...'" function solves this problem.
Let's use Socrata functions for querying inspection records by restaurant name or partial search term. The Socrata Open Data API is available for open-government databases maintained by NYC and other governments. Related to Issues #8 and #12
Currently,
server.js
returns up to 999 records that match query parameters such asborough
andzipcode
.server.js
then filter those results by the name search term.This process is flawed. The user might be looking for a restaurant that's not among those first 999 records.
The Socrata "like '...'" function solves this problem.
There is a specific endpoint for making queries with Socrata: https://data.cityofnewyork.us/resource/9w7m-hzhe.json
Query strings must be all uppercase. Ex.
https://data.cityofnewyork.us/resource/9w7m-hzhe.json?$where=DBA like '%25SUSHI VILLAGE%25'