Influence Public Behavior

Data can be impactful and highlight the scale of the waste management problem in order to encourage people to reduce, re-use, recyle, and refuse.

Coming soon!— automatically generate a social media post from the data that you provide.

Coordinate Volunteer Effort

Trash data from past cleanups can help to indicate where future volunteer effort is most needed.

Open Access to the Data

From the home screen, all users will be able to see all data recorded and also download a CSV export.

Coming soon!— access the data via API:

GET /api/data

Easy Data Entry

Type or toggle values for commonly found countable trash categories:

  • Total weight
  • Metal cans
  • Drums
  • Glass
  • Electronics
  • Footwear
  • Jerry cans
  • Plastic containers
  • Plastic straws
  • Smoking-related
  • Tires

AI-Powered Transcription

Sometimes it's too troublesome to record individual items, or maybe your hands are too dirty — you can also write freeform trash data or even transcribe audio and use AI to determine the data entry values.

Upload a Spreadsheet

If it's easier for you to collate and keep your own records using spreadsheets, you can simply upload the spreadsheet here.

ReadMe

Pre-requisites

  1. Node & Yarn

    This is built using RedwoodJS which requires Node.js (>=14.19.x <=16.x) and Yarn (>=1.15)

  2. Postgres

    Follow the instructions for local Postgres setup on the RedwoodJS documentation.

  3. Google API Key

    The app uses Google's Geocoding API to determine the address for a user's current location based on the latitude and longitude of their device as reported by their browser. This is to save the user some input effort and to ensure consistent location reporting. You will need to create a Google Cloud account and a project. Then you will need to enable the Geocoding API for that project and generate an API key credential.

  4. OpenAI API Key

    The app uses OpenAI to parse written or spoken transcriptions containing information about trash data. If you wish to use this feature, you will need to generate an API key. (if you do not wish to use this feature, you should set enableTranscriptionAI to false in /web/src/config.js)

  5. Mixpanel Project Token

    The app tracks pageviews and events using Mixpanel. Sign up for an account, create a project, and get a project token. It's up to you how you want to set up your reports and dashboards in Mixpanel, but these are the events that the app currently tracks:

    Home Page View Unique visits to the home page (i.e. visitors to the app)
    New Record The event triggered when the user taps the button to create a new trash data record (i.e. key activation metric).
    Data Saved The event triggered when a record has been added (i.e. the completion of the primary user journey).
    Downloaded The event triggered when a user downloads a CSV of all the data
    Transcribed The event triggered when the user provides their data via an AI-parsed transcription.
    Uploaded The event triggered when the user uploads a spreadsheet with their trash data.
    Feedback The event triggered when the user provides a star rating after submitting data. This will have a value named score.

    The app will also track the user's device, os, and browser.

  6. An .env file

    Create a .env file in the project root directory with the following key-value pairs:

    								
    DATABASE_URL="postgresql://<YOUR USERNAME>@localhost:5432/databasename_dev?connection_limit=1"
    TEST_DATABASE_URL="postgresql://<YOUR USERNAME>@localhost:5432/databasename_test?connection_limit=1"
    GOOGLE_API_KEY=<YOUR GOOGLE API KEY>
    OPENAI_API_KEY=<YOUR OPENAI API KEY>
    MIXPANEL_PROJECT_TOKEN=<YOUR MIXPANEL PROJECT TOKEN>
    								
    							

Running a Local Copy

Follow the instructions in the RedwoodJS documentation.

After you clone the repository, run:

						
yarn install
yarn redwood dev
						
					

Your browser should automatically open to http://localhost:8910 where you'll see the home screen. If you make any changes to the code they will be reflected here.

The app uses the Singapore Government Design System.

Configuration

There are 3 configuration options in the /web/src/config.js file:

enableTranscriptionAI

When this is set to true, the app will present a feature for the user to enter an audio transcription. You might want to turn this off if you are not paying for an OpenAI subscription, which is required for parsing transcriptions.

Default: true

enableCleanupGroupSelection

When this is set to true, the form will prompt the user to select from a list of cleanup groups. This is for when you want to associate trash data collection records with specific cleanup volunteer groups. The list of groups to select from is in /web/src/cleanup-groups.js

Default: true

weightUnits

The value is a string that denotes the weight unit. This is in case you're running this app in Liberia, Myanmar, or any other country that uses non-metric units.

Default: "kg"

Deployment

Follow the intstructions in the RedwoodJS documentation . You'll also learn about setting up a remote database.

Coming Soon

  1. Generate social media post
  2. Paginate trash data records
  3. Trash data public API