NEPA Tech Meetup December 2017: My Spark Talk
12/19, 6:00 PM: This month will be a casual (this includes dress!) social gathering for technology and art-minded…www.meetup.com
NEPA Tech had its monthly Meetup on Tuesday in Scranton, PA. Most of us gave a “Spark Talk,” a 1–5 minute talk about yourself, your plan or a project that you’re working on.
I ended up being the final speaker. I’ve never done a Spark or Lighting Talk before. So I talked about a Node.js API that I’m making to access New York City restaurant inspection records.
Here’s my recollection of the talk.
Did My Favorite Restaurant Pass Inspection?
I also work as a newspaper reporter, so I deal a lot with public data. I was curious about my favorite restaurants and how they did on health inspections.
So I poked around, and I found a public database of New York City restaurant inspection records. It didn’t have an API (application programming interface) for searching the data, so I decided to build one myself.
Curiosity Killed the Cat
Turns out, it was much harder than I expected. I also found out some stuff about some of my favorite restaurants that I’d rather not know about!
Restaurants can get cited for violations as minor as a dent in a can of food. They can also be cited for having live mice!
Problems with ‘Panda King’
I ran into some problems while building the API.
For example, the database has some weird quirks. It doesn’t contain neighborhood or city names. So if you were searching, let’s say, for a restaurant in Scranton, you can’t search the database for “Scranton.” Instead, you need to search by the ZIP code, which is not intuitive.
Also, if you want to find a restaurant by name, you need to type in the exact name. Otherwise, you won’t get any results. For example, “Panda King” won’t return any results. You need to search for “Panda King Chinese Restaurant.” [Edit: Panda King is a fictitious name, as far as I know.]
The ability to use partial search terms was something that I had taken for granted with Google search. It took me two nights to write code that fixed this problem.
In the future, I’d like to add two new features. One is adding pins to a map, showing where the restaurants are. I’d probably use Leaflet.js or Google Map.
The other is connecting the API to Yelp. So when users look up a restaurant’s health inspection reports, they can also get customer reviews of the place from Yelp.
Anyways, thanks guys. Let’s go eat now!
Try the live demo at https://nyc-restaurant-inspector.herokuapp.com