Inspiration

The hardest part of sustainability is knowing where to start. That's why I wanted to make it easy for people to make a difference and get to know their community

What it does

This website scrapes events that involve tree planting, and takes key info like postal code, time of event and descriptions.

How we built it

I used a Flask framework in Python to create the web app. I used a library called BeautifulSoup to scrape content from Eventbrite. As the project evolves, more website sources will be used. The python code (app.py) finds key words like "Tree Planting", and only scrapes further postal code and event information from the same HTML line if the key word is found. The code extracts the relevant data using regular expressions, and then stores the extracted data in a dictionary. The scraped data is then sent to the home.html in the template folder.

Challenges we ran into

The scraping and parsing functions are very buggy. Some entries do not result in any information being parse correctly, or at all. I also tried to use Folium, Open Street Map and Leaflet to map the parsed Postal codes. This was intended to visually display events on a map. The map currently doesn't function and show on the web page.

Accomplishments that we're proud of

This is my first project in Python, and I'm proud to have all the function in a basic way. The fact that could scrape and parse content in a semi organized fashion is a big accomplishment for me.

What we learned

I didn't know anything about parsing and scraping before I started, so I'm glad to have learned these skills. I learned a lot about the Flask and BeautifulSoup library, including which situations led to more parsing errors.

What's next for Tree Planting Event Locator

I want to work out bugs in the parsing function. I also want to get the map working and displayed properly. More websites will be scraped so my website is a compiler of multiple event sources. I also want to host the website on Azure so it is publicly accessible.

Share this project:

Updates