DEV Community

Andrew Cook
Andrew Cook

Posted on

Demolition Permit Visualizer

Over the weekend I made this web application with ruby on rails and Sinatra: https://chicago-demolition-permit-records-parser.onrender.com/ .

It was inspired by a project detailed in this blog post: https://mascontext.com/observations/after-demolition .

It aims to make parsing and visualizing Chicago demolition permit records easy.

The main challenge was getting the google maps api to render an image with multiple markers. Constructing a valid URL was more complicated than I expected.

Unfortunately, I realized too late that the api did not provide dated entries so searching by date would require collecting the permit number and searching through a response to another api to match the permit number and then collecting the date information from that api. I assumed the permit information was not exactly chronological and thus, for my purposes, an unordered collection. This would result in, in my estimation, an O(n2) time complexity where n is equal to the number of permits that need to be dated. On top of this poor time complexity the execution time is made slower by being composed of asynchronous calls to an API. (If you see a flaw in this logic, please comment, and let me know how to make this work!)

Despite this downturn, I would consider this app functional and a successful endeavor in ruby!

Top comments (0)