Commute Newt

Language: Python
Lesson: I learned how useful automation and programming can be through a real-world use case
Github Link: AdalbertoAcosta/CommuteNewt

Commute Newt is a script I developed with the purpose of helping users commute to school or work efficiently. It sends the user a text message telling them what time they should leave their home in order to arrive at their destination in time.

This script is made up of 2 main modules. A module for web scraping commute times off of Google Maps, and another module for texting departure time to the user. For scraping, I am using Selenium to automate browser interactions like inputting addresses and extracting traffic data. The texting module uses the Python SMTP library for sending an email to a gateway. This gateway depends on service providers but can be boiled down to an email address for your phone number; where emails appear as text messages.

I wanted to develop this script for my commute to school since traffic varies a lot where I live. I am now running this program every morning with crontab (a Linux command scheduler) on my Raspberry Pi 4. This project introduced me to web scraping and also created a texting module I can use in my future projects. Moving forward there are a lot of potential improvements and changes I could make. If I decide to continue development as a mobile application, I would shift the code to an object-oriented approach. For my simple use case, I kept the code procedural but OOP would increase the abstraction of my code.

If you would like to know more about this project feel free to reach out to me!