Pybossa
Creating a simple application
Create an account and start a project
- Create an account on http://crowdcrafting.org/
- Click on the Create button on top menu to create an application
- On a first and second screen, fill in the fields that will describe the application. You are allowed to change these later.
You can find your applications in your "personal" pull down menu.
Name -> My Profile
Select items you will work with
As of Nov 2015, there are 4 options, i.e. objects that you can you can present to the users for some pattern recognition task
- images
- sounds
- videos
- PDFs
E.g. select images
Define the type of task
There are three options:
- Classify
- Describe
- Count
E.g. select classify
Define a question
- Make sure to type an answer for each field (prefilled content does not work)
- You can add response items
Next, add another question or two.
Add a source
You can choose between Dropbox and Flickr. Both provide you with simliar features and a test project can be built with either one. Using Flickr is probably a bit easier.
Make sure to add all pictures you need. Click on all pictures you want to import.
To add / change pictures, you can
- MyProfile -> Select your project
- click on
Tasks
- Click on
Import
The documentation as nov Nov 2015, is not totally in synch. E.g. there is no need to create a task presenter as it is described in the quickstart manual
Customizing simple projects
There are several methods for customizing a project. Firstly you could add more tasks either using the Flickr/DropBox interface or using the CSV or JSON taks importer.
Modify tasks
If you are just testing it is best to delete existing tasks. Since tasks are identified by I don't know what, PyBossa will refuse to reimport tasks that already have been defined, even in a different way) To do so
Settings -> Delete tasks
Export to CSV and edit in spreadsheet
This allows for example to manually add pictures and also to change URLs. However, you carefully must respect custom fields that are made for each different type of presenter.
Tasks -> Export
- Click on Download CSV. This will generate a zip file with a csv file, that you then can open in Google Docs (or any texteditor or spreadsheet application)
After making changes, you can import the CSV from various sources (Google Drive, URLs, DropBox)
Edit a JSON File
For people with a little computer science background, editing a JSON file is an alternative.
Export your tasks
Task -> Export
- Download JSON
Import of a modified task file
For a CSV:
Tasks -> Import Use either Google Drive or DropBox.
For the JSON:
Use the API (more later ...)
Change presentation of tasks
Old stuff
(needs to be checked)
pyBossa templates
pyBossa templates are reusable applications templates that implement popular crowd crafting problems. Templates include: a task creator, a task presenter, a tutorial, an application description, etc.
As of April 2013, there are five templates available on the crowdsourcing.org server. You can adapt these to your own needs in various ways.
Template | Task template | Description |
---|---|---|
EpiCollect Plus Project | EpiCollect Plus | Interface to an EpiCollect project |
Geo-coding | Urban Park Task | Allows users to tag a park in a list of cities of the whole world. The result is then shown in a 3D Globe (rendered with WebGL) |
Image Pattern Recognition | Flickr Person Finder | Uses the Flickr web service as the source of the data, pulls a picture from a Flick Feed and then asks the user a question with several possible answers. |
Transcribing documents | PDF transcription | An application that allows transcribing PDF documents (e.g. old texts) |
Sound Pattern Recognition | SoundCloud | ... |
In addition, there are two special templates allowing to import data from CSV files or Google Drive Spreadsheets. In order to use that data, you will have to write the code for a presenter.
Template | Task template | Description |
---|---|---|
CSV | Public link to a CSV file | ? |
Google Drive Spreadsheet | Import a Google Drive Spreadsheet | ? |
All PyBossa templates are available in GitHub repository, e.g. you can add these to your own pyBossa server or modify the code and push to a pyBossa server.
Data exports
Both tasks and task runs can be exported either in CSV or JSON format for analysis.
Adapting the built-in Image pattern recognition template
This example will show how to adapt the built-in Image pattern recognition using the public pyBossa sever.
Example that you only can view once, unless you connect from a different IP. It is really just a test, e.g. only includes three pictures of the 3D printers I own ....
Below, we summarize the steps.
Create an account and an application
- Create an account on http://crowdcrafting.org/
- Click on the Create button on top menu to create an application
- Fill in 8 fields that will describe the application. You are allowed to change these later.
You can find your applications in your "personal" pull down menu.
Name -> My Profile
Select an existing application template
In the Settings for your application (personal pull-down menu -> My applications):
- Click on Import tasks and select the Image Pattern Recognition template
You now will see a link to a Google spreadsheet and that you can substitute by your own. Therefore, do not use this link, create your own as explained below.
- Go to Google Drive and log in. If you don't have a Coogle account you will have to create one.
- Open the this spreadsheet
- Create a copy and share it on your own google drive. With the open file, use menu File->Share.
- Replace all the pictures and maybe also the questions. Do not change the headings, since the presenter will use these.
- col1 = question
- col2 = thumbnail picture
- col3 = credits page
- col4 = full picture
... of course you can link to any picture from any site. E.g. we took ours from this wiki:
Create/Modify the task presenter
Pick the Image recognition task (the others will not work with the template)
You now can change the number and the phrasing of the answers. As you can see below, we added an answer:
<!-- If the user clicks this button, the saved answer will be value="maybe"-->
<button class="btn btn-answer"
value='Maybe'><i class="icon icon-white icon-comment-alt"></i>Maybe</button>
Adapting the buttons PyBossa uses the Twitter bootstrap CSS framework.
- icon-comment-alt refers to a special font that was made for this framework. In principle, you can use any of these font names from this list.
- Same principle for the button color styles, e.g. btn_answer would be light grey. See the Twitter bootstrap buttons list
Original fragment:
<div id="answer"> <!-- Start DIV for the submission buttons -->
<!-- If the user clicks this button, the saved answer will be value="yes"-->
<button class="btn btn-success btn-answer" value='Yes'><i class="icon icon-white icon-thumbs-up"></i> Yes</button>
<!-- If the user clicks this button, the saved answer will be value="no"-->
<button class="btn btn-danger btn-answer" value='No'><i class="icon icon-white icon-thumbs-down"></i> No</button>
<!-- If the user clicks this button, the saved answer will be value="NotKnown"-->
<button class="btn btn-answer" value='NotKnown'><i class="icon icon-white icon-question-sign"></i> I don't know</button>
</div><!-- End of DIV for the submission buttons -->
New fragment:
<div id="answer"> <!-- Start DIV for the submission buttons -->
<!-- If the user clicks this button, the saved answer will be value="yes"-->
<button class="btn btn-success btn-answer" value='Yes'><i class="icon icon-white icon-thumbs-up"></i> Yes</button>
<!-- If the user clicks this button, the saved answer will be value="no"-->
<button class="btn btn-danger btn-answer" value='No'><i class="icon icon-white icon-thumbs-down"></i> No</button>
<!-- If the user clicks this button, the saved answer will be value="maybe"-->
<button class="btn btn-answer" value='Maybe'><i class="icon icon-white icon-comment-alt"></i>Maybe</button>
<!-- If the user clicks this button, the saved answer will be value="NotKnown"-->
<button class="btn btn-answer" value='NotKnown'><i class="icon icon-white icon-question-sign"></i> I don't know</button>
</div><!-- End of DIV for the submission buttons -->
The result looks like this:
A simple example reusing existing code
1. Create an account and/or an application as above
Create an application
- Install a Python virtual environment. This way you can be sure that dependencies will remain ok (not overwritten by system upgrades, etc.)
- Start from an existing template, e.g. from the Application tutorial or from an application you could download from the GitHub repository
.....
Create and push the application to the pyBossa server
python createTasks.py -u http://crowdcrafting.org -k API-KEY
- Select your application (personal pull-down menu on top -> My Applications
- Open your application.
Links
Official documentation
Documentation is available on docs.pybossa.com/. For example:
- PyBossa Overview
- Build with PyBossa
- Quick overview: Creating your own Application
- Step by step tutorial on creating an Application (more advanced use)
- Crowdcrafting.org. Official PyBossa server that hosts many projects. Anyone can create his/her own.
Example applications
Other
- Open Knowledge Labs has posts concerning pyBossa, e.g. about new features
BIBLIOGRAPHY |