Can You Crowdsource a Better School Environment?

Areas of Science Computer Science
Time Required Long (2-4 weeks)
Prerequisites None
Material Availability This Computer Science Project requires the use of a computer with Internet access. An Android device is helpful but not required.
Cost Very Low (under $20)
Safety No issues


How can you motivate students and teachers to make positive changes in their school? Why not try using what is in everyone's pocket—a smartphone! With this project you'll try your hand at harnessing the power of crowdsourcing and mobile technology by creating an app that motivates users to change their school for the better. Do not worry about the app creation, the MIT App Inventor tool makes that part easy; the instructions provided here will lead you through it step-by-step. Will your crowdsourcing strategy work? There's only one way to find out!


Follow simple steps to create your own mobile app and find out if crowdsourcing can be an effective way of cleaning up a school.

Share your story with Science Buddies!



Sabine De Brabandere, PhD, Science Buddies

Cite This Page


MLA Style

De Brabandere, Sabine. "Can You Crowdsource a Better School Environment?" Science Buddies, 28 July 2017, Accessed 13 Nov. 2019.

APA Style

De Brabandere, S. (2017, July 28). Can You Crowdsource a Better School Environment? Retrieved from

Last edit date: 2017-07-28


Tired of seeing your school with wind-blown trash on the grounds, graffiti on restroom doors, and grimy lockers? Do the students seem to ignore the problems? How could you grab their attention? How could you motivate them to fix up the school and keep it clean?

First, let's investigate why a clean and tidy school matters. Research has shown that people are more productive, feel safer, and behave more kindly in clean environments, making them better places to live for all of us (see Figure 1). Clean environments also encourage people to take the necessary actions to keep things clean. Reasons enough to take the first step in making your school clean and welcoming!

A clean environment encourages more positive, kind behavior.
Figure 1. Research has demonstrated that a clean environment encourages positive, kind behaviors.

Recently, scientists and managers have managed to accomplish huge jobs by crowdsourcing. They outsource, or pass on, parts of their tasks to the general public answering an open call to action. The reasons that motivate people to participate in a crowdsourcing campaign can include their desire to contribute in ways that make them feel good about themselves, or a desire to use their knowledge of a specific subject, worldview, or spiritual belief to contribute to a large-scale project (something larger than they could do on their own). The prospect of a prize, recognition, or personal advantage can also be motivational.

In this project, you will explore whether or not you can use crowdsourcing to perform the cleanup task at your school. You will do this by creating an app that harnesses the power of crowdsourcing. The word app is the abbreviation for application software. It refers to a self-contained computer program designed to run on a mobile device like a smartphone or tablet. But do not worry, there is an easy way to build apps even if you have had no programming experience. Anyone, regardless of their experience level, can build an app using App Inventor, a simple programming tool developed by the Massachusetts Institute of Technology (MIT).

Using App Inventor you can easily create apps for Android devices. Android is a type of mobile operating system, created by Google, popular on many smartphones and tablets (its main counterpart is Apple's iOS). The settings of your device can tell you which operating system your device uses. App Inventor apps only run on Android devices. But you do not need an Android device to create an app with App Inventor. You can use any computer to create your app and a free downloadable emulator (which mimics the operating system of one computer on a different computer) to test it. The users of the app—the crowd you would like to deploy —will need to have an Android device to run the app, however.

Before you start coding, you need to form an idea of how your app will work and what it is supposed to accomplish. Computer software engineers call this set of descriptions the user requirements. First, imagine what your crowd might look like: a small group of peers; individuals attending the school; who, exactly? What is their age range? Once you have identified your target crowd, brainstorm on what might motivate this group to contribute: a point system; a fun activity; social prestige; a good feeling about contributing to a bigger cause? Do you see a potential for a success story? What will the app look like? What will the app do so it fulfills the task of cleaning up the environment as well as the users' need to be entertained and motivated? How will the user interface look?

If this is still a little vague and you do not have an idea of what the user requirements of your app will be, do not worry. The Procedure will guide you through creating a school-cleanup crowdsourcing app where users earn points for performing cleanup actions and then store all entries in a table residing on the Web. Once you have built this basic app, you can pursue several rounds of improvements or changes to customize the app and make it the best product you can. Then you can test it out in the real world and see if your app can actually motivate a crowd of users to improve your school!

Terms and Concepts

  • Crowdsourcing
  • App
  • App Inventor
  • Android
  • User requirements
  • User interface
  • Variables
  • List
  • Fusion Tables
  • Executable
  • Source


  • Is it important to have a good idea of who the users will be, as well as where and when the app will be used, before you start building it? If so, why and where in the design process would you use this information?
  • If you ask students what would motivate them to participate in a school-cleanup, what do you think they will answer?
  • Quality control (having the cleanup tasks done well) can be a challenge when you use crowdsourcing. Do you expect quality to be a limiting factor for the job performed or the data collected during your school cleanup?


News Feed on This Topic

, ,

Materials and Equipment

  • Computer with access to the Internet. For more information on system requirements, please visit Setting up App Inventor 2. Scroll down to the end of the page to find the system requirements.
  • (Optional): Android phone or tablet. This is recommended, but not required, for testing your app.
  • (Optional): Volunteer(s) who could test your app.

Experimental Procedure


Getting Started

Before you embark on building your school cleanup crowdsourcing app, you need to perform a couple of small tasks: First set up your computer and Android device or emulator and then work through a couple of tutorial apps to become familiar with App Inventor 2. This section will walk you through the tasks. Don't get discouraged; once you get App Inventor running on your computer, you will probably finish the first two projects in less than an hour!

  1. Follow the instructions listed on this App Inventor setup page to prep your computer and Android device or emulator to use the App Inventor.
  2. Have a quick look at the Designer and Blocks Editor overview page.
  3. Now, use the introductory TalkToMe Text-to-Speech App project available from the Beginner Video Tutorials page to build the TalkToMe app. You will learn:
    1. How to create a new project;
    2. How to connect your computer with your device;
    3. How to use the design mode to design your app;
    4. How to use the block mode to add functionality;
    5. How to code a button; and
    6. How to use the text-to-speech block.

    Note that what an app does is often referred to as its behavior in computer language. The blocks editor is where you code the behavior of your app. The user interface, or how the user interacts with the device, is specified in the design mode.

  4. Before you build your next app, save your project using the Save project command found in the Project drop-down menu, as shown in Figure 2.
The <i>'Project'</i> drop down menu allows to save a project, so you can come back to it at a later time.
Figure 2. The Project drop-down menu enables you to save a project, so you can come back to it at a later time.
  1. Use the Extended TalkToMe project available from the same page to learn some more basic programming skills like:
    1. How to open and alter an existing project;
    2. How to ask information from the user and store it in a variable; and
    3. How to use variables.

    As a programmer, you will frequently want your program to "remember" information like a value, word, or sentence. For example, if your program requests information from the user, or if it calculates a value, you will want to remember it somewhere so you can use it later. The way your program remembers things is by storing them in variables. In essence, variables are placeholders; they can hold information and be overwritten by new information. Before you can use a variable in a program, it needs an initial value. In this project, the user provides the initial value by typing in text.

  2. You can save this project under a different name using the Save project as... command found in the Project drop-down, as shown in Figure 2.
  3. Before you embark on your own project, create the Magic 8-ball app. This will help you get more comfortable with MIT App Inventor and teach you:
    1. How to build and use a list;
    2. Display a random entry from the list;
    3. Respond to an event;
    4. How to package your app, so it stays on your phone when you disconnect from the Internet.

    A list is a tool that can be used to store multiple pieces of information at once. You can see it as an ordered series of variables. Lists are used to store related data. As you learn to program, you will soon realize lists are commonly used and very handy.

Set the User Requirements for Your Crowdsourcing App

As mentioned in the Introduction, this science project will walk you step by step through building a school-cleanup crowdsourcing app. It will enable you to get an app working in record time. Do not worry if you do not understand all the terms and concepts mentioned in the user requirements below. They will become clear as you go through the project and gain familiarity with MIT App Inventor and Fusion Tables. Once you have this basic app working, you will be in a better position to pursue iterations of changes to personalize the app and make it your own design and vision. Or, you can take the skills you learned and make any other app you like from scratch.

Below are the basic user requirements for the school-cleanup crowdsourcing app. Remember, once you get the basics working you can circle back and customize it to be just right for you and your audience. Requirements:

  1. Users must register to use the app with a Gmail account. This is needed to give users access to the global data table. More on this requirement is found in step 8, below.
  2. The app lets users enter cleanup actions and earn points for each action entered.
  3. For each cleanup action, users enter the following mandatory information: their name, the type of action, and whether it is completed. Users have the option to leave comments in a comment field.
  4. The user interface looks similar to the user interface displayed in Figure 3.
A design for user interface of the school cleanup game.
Figure 3. A simple design for the user interface of the school-cleanup crowdsourcing app.
  1. The app returns an Incomplete entry pop-up message in case any of the mandatory fields were left blank. The pop-up can be closed, enabling the user to complete the entry and submit it again.
  2. The app keeps track of the user's points:
    1. The points starts at 0 each time the app is restarted.
    2. Each cleanup entry will earn the user 5 points.

    (Note: This simple approach will let you gain familiarity with MIT App Inventor. Once you have done that, you can expand your app to do other things, like keeping track of point results of previous sessions or differentiating point rewards per cleanup-action category. More suggestions are in the Enhance Your App section, below.)

  3. With each cleanup entry submitted, the app will:
    1. Create a pop-up window with the following information:
      1. thank-you message and
      2. user's new score.
    2. Optional : Return a spoken funny note, encouragement, or nice-to-know fact around environmental issues with each entry. The app picks this note at random from a list of return messages.
    3. Return a "Please try again" message in case the app could not add the data to the table.
  4. The app stores data for each entry in an global table residing on the Web. We will refer to this table as the School-Cleanup Table.
    1. The table will be created with Fusion Tables, an experimental data visualization Web application. Consult the Bibliography for resources on Fusion Tables.
    2. Each user will be given edit permission to the table via their Gmail account at registration. This is needed so users can add entries to the table.
    3. Only a restricted number of people will know the link to the School Cleanup Table and be able to work directly with the data as well as provide access to new users.
  5. The app stores the following data for each entry in the School Cleanup Table:
    1. Date: date field.
    2. Name: open text field.

      Note: You might change this to a drop-down list if you would like to make the app a contest between classes. A drop-down ensures that each entry uses the exact same format, enabling easy selection and filtering of your table later.

    3. Cleanup action: drop-down list with the items of your choices. Possible choices could be:
      1. "Trash removal"
      2. "Washing equipment (e.g., lockers, tables, benches)"
      3. "Reporting graffiti"
      4. "Reporting broken equipment (e.g., leaky faucet)"
      5. "Other" .

      Users will reflexively be looking for the items in the list. Influence their behavior by choosing items you feel most need attention.

    4. Status: A drop-down list. Suggested choices:
      1. "Completed"
      2. "Needs attention— please specify in comments"

      This will enable the app to collect data that can be passed on to the school repair service.

    5. Comments: open text field.

Build the App

  1. Get a jump start—build the Pizza Party App.

    Storing data in a table on the Internet is not a task for the beginning app inventor. To give you a jump start, follow the tutorial to build a pizza-ordering app. After, we will give you instructions on how to change the pizza-ordering app to a school-cleanup crowdsourcing app.

    1. Navigate to Pizza Party with Fusion Tables for App Inventor 2.
    2. Use the green button on the page to download the source code and save the Pizza_Party_MIT_2014.aia file on your computer. (Note that you can find a brief explanation of the term source code in the section entitled Package and Share Your App, below.)
    3. Load the code in App Inventor:
      1. Open App Inventor and select the Project drop-down from the top menu bar.
      2. Select Import project (.aia) from my computer... as shown in Figure 4.
      3. Navigate to your stored .aia file and load the Pizza Party source code.
      4. You will see the user interface Screen 1 in the designer mode and associated code in the block mode appear.
    4. Use the Save project as ... function to save this app under a different name.
The MIT App Inventor Project drop-down menu enables you to load the source code of a project
Figure 4. The Project drop-down menu enables you to load the source code of a project by loading an .aia file stored on your computer.
  1. Create your Fusion Table.
    1. Follow the instructions in the section "Creating your own Fusion Table" in the Pizza Party tutorial, creating the table exactly as explained. Once you have gained familiarity with the Fusion Tables, you will convert the Fusion Table you have created into the School-Cleanup Table.
  2. Link your Pizza Party app to your just-created Fusion Table.
    1. With your Pizza Party project open in App Inventor, navigate to the block mode. The first few lines of code initialize three global variables, as seen in Figure 5. Initializing these ensures that the app points to and has access to the correct Fusion Table. You need to initialize these variables so the app will point to the table you just created. The following steps explain how to do this.
    2. First, provide the app with a Google Applications Programming Interface Key, abbreviated as API Key. Follow the instructions under the "Getting an API Key" section of the Pizza Party tutorial. Copy your API Key to initialize the API_KEY field. Figure 5 shows what an API Key can look like.
    3. Scroll down in the tutorial until you get to the "Determining your Fusion Table URL and Table ID" section. Follow the instructions carefully.
      1. Using a copy/paste action, initialize the TABLE_URL field with the URL of your table.
      2. Type the string of characters of your table to initialize the TABLE_ID. Be careful not to confuse the table ID (a computer-generated combination of numbers and letters) with the table name. Note you can choose the table name yourself, and it is advisable to choose a descriptive name that reflects the content of the table.

    The results should look similar to Figure 5.

To access a fusion table in an app, the app needs to have an API KEY, the table URL and the table ID.
Figure 5. To access a Fusion Table in an app, the app needs to have an API Key, the table URL, and the table ID.
  1. Test your Pizza Party app.

    After giving a pizza order entry on your phone or tablet, do you see it appear in the Fusion Table? If not, try following these troubleshooting tips:

    1. A couple of areas in your app can commonly contain errors:
      1. No or incorrect API KEY.
        Solution: Recheck and correct the API Key— see step 3b, above.
      2. Incorrect table URL or table ID.
        Solution: Recheck and correct the table URL and ID— see step 3c, above.
      3. The Google account you logged into on your mobile device or emulator has no edit access to the Fusion Table.
        Solution: Check and correct the edit permissions of your Fusion Table by navigating to the Fusion Table on the Web and using the Share button located in the top right corner of the screen. Consult the Pizza Party Tutorial section on Creating your own Fusion Table for further guidance.
      4. The column names or column types in the Fusion Table differ from the column names or column types used in the Pizza Party app.
        Solution: Check your table carefully using the Pizza Party tutorial section Creating your own Fusion Table for guidance. Note that the names and types of the columns in your table need to match exactly the ones used in your app code, so pay attention to the details here.
        If your error message provides you a clue to one of these common mistakes, check that part and try again. If your error message does not give you any clue, check all of the above carefully.
    2. See if your error message occurs in this Pura Vida document, Frequently Made Errors with Fusion Tables and How to Fix Them. Note that your current problem will most likely not reside in errors in the SQL statement, as you did not change the SQL statement so far.
    3. If all of the above fail, try step 4a, above, one more time. If you still have no success, contact the MIT App Inventor Forum. Check if you can find any help there; if need be, post a question yourself.
  2. Once you have the Pizza Party app running, go through the code and adjust it step by step, implementing the school-cleanup app requirements. Make sure to test your altered app after every step and save it as a new, working version, so you can come back to it if needed. Save your current working app under a new name, like "School_Cleanup_Version1."
  3. As a first step, change the user interface to reflect your school-cleanup app. You will do this in the design mode of your project.
    1. In the Properties section of each list picker component, change:
      1. the questions on the list picker label;
      2. the entries of the lists;
      3. display color of your list picker label.

      Note that as you go through the code in block mode later, you will come across a few more places where you will need to change the text displayed on the list picker labels. You can change these as you come across them.

    2. Change the names of the list pickers to reflect your new school-cleanup app. This will make your code more readable. Figure 6 shows you how to change the name of a component.
    3. Delete the Web Viewer as you will not display the content of your Fusion Table in your school-cleanup app. The Delete button for components is located next to the Rename button used in previous step.
    4. Test your app and debug it where needed.
    5. Save your app as version 2.
MIT App inventor allows you to easily rename a component.
Figure 6. App inventor enables you to rename a component easily.
  1. Change the names of the columns in your Fusion Table.
    1. Go to your Fusion Table and change the column names "Pizza" and "Drink" to reflect your new app. Possible descriptive names could be "Action" and "Status."
    2. In your app, navigate to the block mode. Look for the Fusion Table query block and change the column names to reflect your new table. Figure 7 can help with this task.
    3. Test your app and debug it where needed.
    4. Save your app as version 3.
To code your app so it can enter enter data in a fusion table, the names of the columns in the fusion table need to match the columns names in the query exactly.
Figure 7. To enter data in a Fusion Table, the names of the columns need to match the column names in the query exactly. "Date," "Name," "Pizza," "Drink," and "Comment" are the column names in this example.
  1. It is optional but recommended to change the names of global variables.
    1. In block mode, pick one variable at a time (like the global variable "pizza") and replace it consistently throughout the code to a name that reflects the new content (like "action").
    2. Test your new code thoroughly before you start changing a second global variable (like "drink").
    3. Test thoroughly again; adjust where needed.
    4. Save your app as version 4.
  2. Change your confirmation and incomplete submission messages.
    1. Look through the code in block mode. Identify the confirmation and incomplete submission messages and change them to reflect the new app.
    2. Test if your new messages appear well.
  3. Code the actions to be taken after each submission.
    1. Look for the block shown in Figure 8 to identify the event happening just after submitting an entry to the Fusion Table.
    2. Recode the block to represent the thank-you message.
    3. Keep in mind you will add code in the next step to display the user's new points.
    4. Optional: Add code so the app returns a spoken message picked at random from a list of return messages. Look back at the Magic 8-ball tutorial from the Getting Started section to determine how to code this feature.
    5. Test if your new messages appear well and change the code where needed.
    6. Save this version as version 5.
An entry to a fusion table returns in a 'GotResult' event to your app.
Figure 8. An entry to a Fusion Table should return a ".GotResult."
  1. Add code to keep track of the user's points. You do all of this in block mode.
    1. Add a new global variable to keep track of the score.
    2. Initialize the variable as you open the app.
    3. Add points to the variable each time an entry is submitted.
    4. Display the score together with the thank-you message after each successful entry.
    5. Test your app; adjust it where needed.
    6. Save your app as version 6.
  2. Thoroughly test your app.
    1. Make a list of all the possible scenarios you can think of. The list below can get you started:
      1. All fields nicely filled in.
      2. Name field left blank.
      3. Name field text with uncommon characters.
      4. Very long comment message.
      5. User not listed in the share list of the school cleanup Fusion Table. Note: You may need a second user (Gmail account) to test this scenario.
      6. User with only view permission to the table.
      7. A second user (other than yourself) using the app to add data to the Fusion Table.
      8. Etc.

      (Note: Going over the user requirements might help you complete the list.)

    2. Test all the scenarios listed above. Even though some scenarios may not yield valid entries in the table, the app still needs to handle the issue appropriately with a clear return message to the users.
    3. Make changes or improvements where needed.
    4. Make sure to rerun all test scenarios after you have implemented changes.
    5. Save your app as version 7.

General note: The method presented above is just one way of coding your school-cleanup app. You may discover totally different ways of writing the code that work just as well— or even better! Can you explore App Inventor and come up with a different way to write the program?

Enhancing Your App

The steps above complete a school-cleanup crowdsourcing app. You can now let your imagination run wild. What did you envision for your app? Here some questions to get you started:
  • What motivates your target users? Can you implement this in your app?
  • What entertains your target users? Can you implement this in your app?
  • Can you add some just-for-fun features to the app? Should it be more game-like?
  • How can you improve the aesthetics of the user interface?
  • What is in it for the school? What will motivate the principal or school personnel to allow phone use in the school?
  • How will the school-cleanup data table be used?

If you can, talk to your target users and school personnel, show them your current app, and listen carefully to their feedback. This will guide you in making improvements that have the biggest impact.

  1. Some changes you might consider are listed below.
    1. To encourage users to perform the longer cleanup actions like washing tables, let them earn more points for performing those actions.
    2. Turn it in to a game, and add a time component to help make it more competitive and motivation immediate action.
    3. Keep track of the score when users log out so they can add to it next time. Hint: You might need the TinyDB component of App Inventor to implement this feature.
    4. To encourage users to continue the next day, record the time of their last entry together with their score. Give extra points when a new entry occurs— for example, after one day.
  1. Each improvement iteration should consist of the following steps:
    1. Specify the change or improvement in your user requirement.
    2. Implement the changes.
    3. Test your new app.

    The following page will help you understand the Engineering Design Process.

  2. Consult the Bibliography to find additional links to MIT App Inventor tutorials and libraries. They can be a great source of inspiration and help.

Package and Share Your App

Decide on how you would like to share your app. You will want to share your app with the users in executable form, which means it can be installed and run on other Android devices. You can also share the source code (the text listing of commands for an executable program or app) so other people can copy it on their computer, open the project into App Inventor under their account, and work on changes if they wish to. There is also the option to distribute your app on the Google Play Store.

The directions on sharing and packaging apps on the MIT App Inventor site will guide you through the process.

Evaluate the Impact of Your App

Go back to your fusion table and look at the data. Graph how many open reports there are about needed school improvements versus closed events (successfully solved cases) over the period of time people used your app. What does the data show? Did the crowdsourcing app work? Did the school environment improve?


NASA flight software engineer

Computer Software Engineer

sociologist conducting interview


Computer programmer typing on a keyboard

Computer Programmer

female technical writer working

Technical Writer

Have you tried to install new video-game software or connect a new printer to your computer? Doing something like this can be a little scary because of concerns about what may happen to your computer if you don't do it properly. So you read the instructions pamphlet that came with the software or printer and follow it step by step. Thankfully, the instructions are clear and you are successful with the installation! You can credit a technical writer for creating those helpful directions that guided you to success. The technical writer's task is to prepare documents, like user manuals and instructions, that communicate technical information about a computer or other complex product to a target audience in a clear and concise manner. Another way to think of a technical writer is as a person whose job it is to make our use of complicated devices a little easier and less frustrating. Read more


  • Create an app for a phone or tablet that increases awareness of environmental issues or prompts users to live a more sustainable lifestyle, such as an app that facilitates carpooling, walking, or cycling to school.
  • Google allows fairly easy visualization of Fusion Table entries that hold location information in geographic maps. Can you alter your app so it enters geographic location and displays the cleanup actions on a map? What could you learn from the geographic distribution of the cleanup actions?
  • Transform the school cleanup into a neighborhood cleanup. What adjustments would be needed? How will you motivate people from your neighborhood?
  • Could you add an option where users email you before and after pictures of their action? Can you enable them to upload pictures on the Web and add the link in your Fusion Table?
  • Create a duo of apps. The first one would enable users to enter locations needing cleanup in a Fusion Table, including the geographic coordinates of that site. The second would be a scavenger hunt-type cleanup game where gamers need to find the location given the longitude and latitude (which the app can retrieve from the Fusion Table created by the first app) before being able to perform the cleanup action.
  • Can you create phone apps for other areas in life where one could be useful, like apps for personal health, apps helping researchers collect data, or apps enhancing your social life?
  • For a lower-level App Inventor project, check out the Science Buddies Project Idea Staying Healthy with Personal Medicine Apps.

Share your story with Science Buddies!


Ask an Expert


Ask an Expert

Related Links

News Feed on This Topic

, ,

Looking for more science fun?


Find an Activity