Inspiration

A lot of us aspire to eat healthy, find great deals, and stay eco-friendly at the same time. Unfortunately, it can be difficult to find a balance of the three; especially living in modern cities where our food can travel thousands of miles just to get to our grocery stores. We often don't have time to think about where our food is actually coming from, much less spend time scouting the grocery aisles trying to figure out what's in season, or find the best option for tomatoes or peaches.

LocalSzn is here to help you make more eco-friendly decisions when choosing your produce; helping you save money, support your local economy, and be more mindful of what you eat along the way.

We believe it's important to support our local food growers, local economy, and our environment.

LocalSzn brings produce sourced from nearby to your attention; helping reduce your ecological footprint by making it easier for you to avoid buying produce sourced from far away whenever possible. Produce from nearby can be tastier, fresher, and is ultimately more ecologically and economically sustainable since you're helping local farmers and your local economy.

We want to help you be more mindful where your food is coming from.

While it might be easy to pick up the first bag of apples you see on the shelf, we believe it's important to help you find more sustainable alternatives. If the same kind of apple (or another type of apple) you're looking for is in season from a nearby province instead of all the way from California or Spain, we want to keep you in the loop.

Helping keep you aware of what local food is in season helps you save money along the way.

Keeping track of growing seasons and trying to spot a great deal can be almost impossible to do when you're busy with everything else life has to offer. With LocalSzn, we also keep track of produce prices throughout the year and help you keep an eye out for what is most likely to be cheaper, locally sourced, and in season.

What it does

LocalSzn's three main features:

  1. Identifies locally sourced produce items in season
  2. Identifies produce items most likely to be relatively cheaper than usual
  3. Easy user queries to help you find locally sourced, in-season, and wallet-friendly alternatives for your go-to produce item.

Identifies locally sourced produce items in season

By specifying the province where you do the bulk of your produce shopping, we tailor your feed to help you find produce that's both in season, and sourced from your province or nearby provinces - complete with estimated price information to make your budget-making easier.

Identifies produce items most likely to be relatively cheaper than usual

By analyzing trends from historical price data, we give you a top-down picture of what to expect price-wise when you walk into a supermarket and look for what we've suggested. We'll tell you what's most likely to be cheapest right now based on previous and current price data, and spot great produce deals for you - even if you don't have a clue what you'd usually have to pay for that mango!

Easy user queries to help you find locally sourced, in-season, and wallet-friendly alternatives for your go-to produce item.

If you want to look for that one vegetable that you need for that one recipe you really want to make this weekend, but don't know if it's in season or not, don't fret! Type the name of the item into our search bar, and we'll give you the predicted prices, seasonality status, and availability from a local source for any variants we can find of that item - helping you worry less about what you want to buy, and more about how you're actually going to go about cooking that recipe.

How we built it

Data sources:

LocalSzn uses publicly available data covering weekly wholesale market prices across Canada collected by Agriculture and Agri-Food Canada. This dataset is updated weekly, and entries are updated in our local database through the Open.canada.ca API. Additionally, we used other Open.canada.ca datasets such as the Annual Crop Inventory and Forecast Yield of Major Crops as inspiration for exploring our primary dataset for implementation in LocalSzn.

Front End:

HTML5 and CSS3 were used to design the layout of the website. The search bar and the list of produce web page were implemented through the use of javascript.

Back End:

Our backend code is a combination of Python, Firebase, and the Firestore library. For Python, we made extensive use of the Pandas, and Pycountry libraries to process the data from the original dataset and manipulate it to extract the information we needed.

Puttin' it all together:

We brought the whole project together through a mix of Firebase and GitHub. Google Firebase is an incredibly powerful platform for quickly developing and deploying applications. We utilized Cloud Firestore as our NoSQL database to efficiently store and query the weekly wholesale market prices for all commodities. Our app retrieves only the relevant results to offer a smooth end-user experience. Firebase also provides cloud hosting, so that deploying the latest version of the React app is only a command away. We also utilized Google Cloud Functions to serve a supplementary Python script for determining the commodities that are currently in season.

Challenges we ran into

Front End:

In the front-end, one of the difficulties was navigating through the vast amount of tools that HTML5 and CSS3 provides for optimizing the web design process. As such, knowing which functionality to use to efficiently organize and structure the web app was challenging, especially for beginner-to-intermediate level programmers.

Back End:

One of our main challenges was figuring out how to use Firebase to create a webapp, as well as working on compatibility between our original dataset, user input, and other encoding idiosyncrasies. Using Python scripts in tandem with Firebase was also a challenge, as it was tough to figure out how to get it to work with the existing database in Firebase. Additionally, we were very ambitious with our original dataset, and found it difficult to make sure everything we set out to do would be completed by submission.

Accomplishments that we're proud of

Being able to design a web app and placing forth our programming skills into practice was definitely a huge accomplishment as for some of us this hackathon was the first 'traditional' hackathon we have ever attended. Getting the website to work from the back and front ends was also super rewarding and we're really proud of that. Fleshing out a viable product targeting real-world needs in such a short amount of time was ambitious, but we got it to work by staying organized, working hard, and communicating effectively.

What we learned

For beginners on the team, it was a strong learning experience when it came to GitHub and how it can be used to collaborate with other programmers. On the front-end, we learned how to use more complex features of CSS3, such as responsive design aspects. We also learned how JavaScript can be integrated to provide functionality to a web page.

On the back-end, we learned how to use Firebase to effectively analyze and filter our data to provide the infrastructure of our project. Additionally, in wrangling this giant dataset with Pandas, we learned how to deal with conflicting data structures, and work easily between dataframes and JSON formats both through Firebase and standalone scripts. This connection portion through Firebase was something we all stepped into without any experience, so being able to have a functional project in a platform none of us had used before was a huge learning experience.

What's next for LocalSzn

There is still a wide variety of extensions we would like to implement, including as a geolocation API for more precise location tracking and price information, web scraping to allow LocalSzn to recommend nearby farmers' markets and letting users know if their desired produce could be found in nearby grocery stores. We'd also like to compare price information between stores to let the user know if they are getting the best deal locally. A "shopping list" feature where users would be able to make a list of whatever produce they'd like to buy as it comes up would be useful for keeping users active on the app, and notifications for produce they buy often being on sale would also be nifty, especially in tendem with this "shopping list" feature. On a more data-related note, having graphs for visualizing price trends for produce and providing more in-depth and accurate price tracking/estimation methods would be a priority in this context.

Share this project:

Updates