Skip to content

emmyyin/recycling-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 

Repository files navigation

recycling-info ♻️

This is a Python program to extract data about materials and how to recycle them. 🌿The data is in swedish and gathered from a swedish website. The extracted data is displayed in a simple Flutter application. 📱

How to use

Prerequisites

Python 2.6, 2.7 or 3.3+, Selenium and Chromedriver is used to scrape the information.

Sqlite3 is used to store the gathered data in a SQLite database.

Firebase Realtime Database and firebase_admin can also be used to store the data.

Flutter is used for the mobile application.

Creating the database

Clone the project and run following command from within the project directory:

python ./recycle_info_scraper/scraper.py

This starts the script which will scrape the web page for information and store it in a database. Change the main function to choose database type, see below.

Running the mobile app

The application uses a Firebase Realtime Database to display data. This must be set up before running the app. After set up, make sure you are in the right directory and start the flutter application with the following commands:

cd ./recycle_app
flutter pub get
flutter run

Note: You need to have flutter installed and a simulator running or a phone connected. More info HERE.

Database

SQLite

A SQLite database can be used to store the data. The setup currently consists of 6 tables in the database:

RECYCLEABLES (ID,  NAME, TYPE)
SYNONYMS (ID, NAME)
TYPES (ID, NAME)
RECYCLE_PLACES (ID, NAME)
ALL_HAZARDUOS_MATERIALS (ID, NAME)
ASSOCIATED_HAZARDUOS_MATERIALS (ITEM, MATERIAL)

Firebase Realtime Database

The NoSQL database provided by Firebase can also be used. A Firebase project must then be created, and credentials provided and incorporated into the project. Change the path in the init function in the firebase_connect.py file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published