Welcome to this series of classes on the fundamentals of data and coding for psychology as part of the Research Internship (PSYC3361) course at UNSW Sydney.
Research in psychology typically involves considerable involvement with symbolic representations of information: termed digital data, or just data. Such data is often essential to both conducting research and as the basis of the research outputs. Indeed, our daily lives also typically involve many interactions with data.
In these classes, we will consider data from the fundamental level. Along the way, you will learn some skills in computer programming (in a language called Python).
The ultimate aim is to increase your 'digital literacy'—not in the sense of being able to use digital platforms, but instead to see and think in terms of underlying digital representations.
The specific overall objectives of these classes are for you to be able to:
These classes are also intended to be a forum for discussing science and research with me and your peers, so please feel free to raise any questions you would like to discuss.
The material and class structure are also new this year, and there is scope for tailing the content to specific requests—let me know if there is a topic you are particularly interested in us covering.
N.B. see Importing a notebook below for how to import these into your project.
We will be using an online computing platform called Jupyter notebooks during these lessons. Notebooks are a way of combining prose with executable computer code and its output within a single document.
In particular, we will be using a service provided to UNSW called "Microsoft Azure Notebooks". Note however that everything we will be using is free software that you can download and run on your own computers—we are doing it this way to simplify the setup and get up and running as easily as possible.
To login to the system:
Sign Inin the top right corner.
zXXXXXXX@ad.unsw.edu.au
.When you access the notebook interface for the first time, you will need to create a 'project' to hold the notebooks that you will be working on.
To create a project:
… create one now?link that should be shown on your "My Profile" page.
internship
.Publiccheckbox, if it is selected.
Initialize this project with a READMEcheckbox, if it is selected.
Create.
This only needs to be done once—we will use this project to store all the lesson material.
To import a notebook:
Copy link address.
Uploadbutton and then select
From URL.
Paste) into the
File URLbox.
Note that importing the notebook makes it 'yours'—the changes you make won't affect any other notebooks.
Sometimes it doesn't seem to like importing directly from a website.
If you receive a message like Error while downloading notebook: Notebook does not exist at target URL, or target site has not given us permission to download it.
, you can instead:
Save link asto save the file to your local computer.
Uploadbutton but now select the
From Computeroption.
Choose filesbutton and navigate to where you saved the notebook file in the first step.
Upload
To create a new (blank) notebook:
Newbutton and then select
Notebook.
Python 3.6as the "Language".
Newto create your notebook. It will then appear in the list of notebooks associated with your project, and you can click on it to open it up.
It is useful to be able to export the contents of a notebook out of the Azure Notebooks platform. To do so:
File→
Download as→
HTML (.html).
Note that the interactive capacities of the notebook are not available in the exported file.