In this session, we will concentrate on very basic functionality in using Python as to allow you to read and modify some of the example scripts provided the Python tutorial underlying the course. We will have a look at some basic commands in Python, how to write and open Python scripts from the command line, flow control in scripts, and the definition and loading of functions.
The examples given in the session will largely follow those given in two excellent introductory tutorials.
- Swaroop Chitlur: A Byte of Python.
- Al Sweigart (2015): Automate the Boring Stuff with Python: Practical Programming for Total Beginners. No Starch Press.
We will have only time to discuss a small selection of content covered in these tutorials but make sure to spend some time after the course working through these tutorials. This will help you massively in becoming more self-proficient in the use of Python and ultimately allow you much more flexibility in collecting and analyzing digital trace data.
Another option for teaching yourself the basics of Python is a free interactive introductory course to Python offered by codecademy.
As you have probably gathered by now, this session will only offer you the most preliminary of introductions to the use of Python. But do not worry. If you caught the bug, there are excellent guides available to you taking you further down the rabbit hole.
For a broader view of collecting digital trace data beyond Twitter see:
For a very helpful introduction to data analysis with Python see:
For a handy introduction to machine learning with Python see:
Remember, you might have online access to O’Reilly and PACKT books through your university’s library.