Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Learn Experiment Development with oTree
Rating: 4.4 out of 5(81 ratings)
343 students

Learn Experiment Development with oTree

From beginner to intermediate
Created byJonas Frey
Last updated 1/2025
English

What you'll learn

  • Developing single and multiplayer experiments
  • Deploying experiments on a server

Course content

6 sections32 lectures10h 52m total length
  • Install oTree8:04

    In this lecture, we learn how to install oTree in the development enviroment PyCharm.  Note: since March 2021 the oTree default syntax has changed somewhat. This course will gradually be updated to also support the new syntax but for now please use pip3 install -U "otree<5" when installing oTree. We will discuss the new format in one of the later sections of the course and you can decide to switch to it after that.

  • Overview over oTree21:38

    In this lecture we take a look at our first oTree app. Note that I deleted the sample games and added an app called overview app between lecture 1 and this lecture. In this lecture I am not going to show how I created this overview_app, we will learn how to do this in lecture 3. You can download it from the resource secion of this lecture if you want to.


    Note: In an update that was released in December 2021 the class Constants was renamed to C. Also, the default variables in this class are now in all caps instead of lowercase e.g. num_rounds changed to NUM_ROUNDS . So whenever the video tells you to write “Constants.variable_name” you should write “C.VARIABLE_NAME” instead.  The old format still works, so you can continue to use the example code provided in the Course but it is recommended that you learn the new format instead.

  • Our first Experiment16:34

    In this lecture, we develop a simple example experiment in which subjects can enter a number which gets multiplied by a constant factor.

Requirements

  • Basic konwledge of Python

Description

What is oTree?

oTree is a framework to develop social science experiments which can be used both online an in the laboratory.

Why learn oTree?

oTree is a flexible framework that uses Python in the background and HTML/CSS to for the user interface. Because of this flexibility oTree is a one size fits all solution to social science experiments. Once you have mastered oTree you don't need to use any other experimental software again. Moreover, Python is rapidly gaining popularity in data science so you can use the same programming language to design your experiments and to analyse your data.

Why this course?

Because oTree is so flexible it can be challenging to get started with oTree. This course is designed to solve this problem by providing a step-by-step introduction into oTree that covers everything from installing oTree on your computer to developing experiments with complex oTree functionality such as LivePages.

What is covered in this course?

  • Installing oTree

  • Overview over oTree

  • Developing a simple survey experiment

  • Experiments with multiple rounds

  • Multiplayer experiments

  • Overview over the oTree template language

  • User interface design with HTML and CSS

  • Randomising the question order

  • Experiments with multiple treatments

  • Responsive pages - Using JavaScript with oTree

  • Debugging oTree experiments

  • Deploying the experiment to a Heroku server

What are the prerequisites for this course?

The course requires basic knowledge of Python. If you have never worked with Python before, check out one of the many free Python courses on Udemy.

Who is the target Audience for this course?

This course is targeted at academics, who do experimental economics or another experimental social science. It is suitable both for students and faculty.


Who this course is for:

  • Experimental Researchers in Economics and other Social Sciences