Visualizing Uber and Lyft trips in San Francisco: more than 200K trips a day

by billygoaton 6/13/2017, 1:51 PMwith 11 comments

by billygoaton 6/13/2017, 2:30 PM

Sure - PostgREST provides a RESTful API endpoint for any PostgreSQL database. It's kinda magic.

It's an interesting beast: it has almost no configuration at all, you just point it to one database schema, and it then uses the postgres permissions system to decide what tables & views to expose, and who gets to see them.

The only part of it that was a little tricky was creating multiple database users for anonymous views off the internet vs. internal staff who would want to do more than just select some rows.

by byteshifton 6/13/2017, 4:07 PM

Cool stuff! We actually built a similar system to analyze the NYC taxi dataset (or any other geospatial dataset). We use the (PostgreSQL wire protocol compliant) HyPerSpace database in the backend [1]. Let us know if you're ever experiencing performance problems with PostGIS.

[1] https://db.in.tum.de/downloads/publications/hyperspace.pdf

by peatmosson 6/13/2017, 2:26 PM

Very nice visualization and write-up! The tech details are pretty interesting. In particular, noting the back-end was done up in PostgREST. I've been itching for a project to kick the tires on that for a while.

Any more you can add about the experience of "writing" the back-end in PostgREST if you're hanging out in this thread, Billy?

by ruslan_talpaon 6/13/2017, 3:46 PM

Can you share what parts of PostgREST way of doing things you found nice and what parts are lacking?