What happens when you've been saving to move out for years, like to know the area before you see it, and you like to play with the Google Maps API?
The below:
Using what I originally learned years ago at DaVita, and what I also used a bit at Comcast to show partner device reach, I extended things yet again.
This tool was made to make it as quick as possible to find all of the stores and other things I found important. That means where the convenience stores were. Where the grocery stores were, where Amazon lockers were hiding. And of course where the nearest subway stop was located.
On this map, you'll see numerous things. The main circle, represents a 3 mile radius around my current position at Comcast. 3 miles represents about how far I can walk in an hour, so I used that as the boundary for where to search for places. Inside of that circle, are smaller quarter mile shaded circles around each Market Frankford and Broad street line subway station. They represent an ~15min walk.
At the top, is an address search. entering an address there will recenter the map on that location, and drop a pin there so that it's easier to see what is, or isn't, around a given address.
So, why put multiple hours into something like this?
Easy. Because I wanted to see what I could do. I wanted to see how useful of a tool I could make, with what (Relatively speaking...) little coding knowledge I have. And just as importantly, I wanted to make something genuinely useful not just for me, but for my other two roommates as well. Neither ended up caring enough to use it, but atleast it was there lol
Enabling all of the cool front end wizardry, was this google docs spreadsheet.
The sheet, quite literally generates the code used in the html file that make up that moving tool webpage. Thanks to the wonders of concatenation and how Google Maps works, I was able to add in as many parameters as I needed, and once I had that, I used the sheet to generate the code. On that sheet, I can control whether or not any given point has an image, or just a pin. Whether it has a circle around it, and what color that circle would be.
The manual act of converting addresses into latitude and longitude still needed to take place though. As did combing websites and Google Maps itself for the POI's.
Still, it was fun, and I'd say it was worth it.
Hello there! If you read this far, congrats, you now know that the page above is actually out of date. The new site is now on Amazon S3, behind cloudfront to allow HTTPS connections. Long term, the plan is to also add in a lambda function to automatically invalidate the cache when any pages are updated. Also planned, is a lambda function to update the page as a whole whenever I update that base Google Doc.
Anyway, without further time wastage, the link to the up to date site is here.
So, the new moving website is done. I wrote the python in IntelliJ IDEA, installed the AWS SDK and CLI onto my MacBook Pro, and got everything into a working Lambda function (Albeit one only set to run manually due to a lack of needing it updated that frequently).
Took around a weekend to get most of it done 🙂 You can see the new new site here (It's the same link as above). It's Hosted on S3, and the Lambda function used Python to not only update the actual back end data source file on S3, it also follows up by invalidating cloudfront, and can also send an SNS notification after a successful run as well.
I might also be shifting from a back end Javascript file, to a DynamoDB as the backend data source. But that's a higher cost idea with little benefit at my (Lack of.....) scale.