This module provides foundational knowledge of computer programming concepts and software engineering practices. It introduces students to major data science programming languages and workflows, with a focus on social science data and research questions. Students will be introduced to R and Python, two principal data science programming languages. This course covers basic and intermediate programming concepts, such as object types, functions, control flow, testing and debugging. Particular emphasis will be made on data handling and analytical tasks with a focus on problems in social sciences. Homeworks will include hands-on coding exercises. In addition, students will apply their programming knowledge on a research project at the end of the module.
- Tom Paskhalis, Office Hours: Thursday 11:00-13:00 online
- Martyn Egan
- 11 two-hour lectures
- Monday 14:00 in PX 201 7-9 Leinster Street South
- 11 two-hour tutorials
- Thursday 09:00 in PX 201 7-9 Leinster Street South
- No lecture/tutorial in Week 7
| Week | Lecture (Monday) | Language | Topic | Due (Friday) |
|---|---|---|---|---|
| 1 | 12 September | - | Introduction to Computation | |
| 2 | 19 September | R | R Basics | |
| 3 | 26 September | R | Control Flow in R | Assignment 1 |
| 4 | 3 October | R | Functions in R | |
| 5 | 10 October | R | Debugging and Testing in R | Assignment 2 |
| 6 | 17 October | R | Data Wrangling in R | |
| 7 | 24 October | - | - | |
| 8 | 31 October | Python | Fundamentals of Python Programming I | |
| 9 | 7 November | Python | Fundamentals of Python Programming II | Assignment 3 |
| 10 | 14 November | Python | Data Wrangling in Python | |
| 11 | 21 November | Python, R | Complexity and Performance | Assignment 4 |
| 12 | 28 November | Python, R | Web Scraping |
This is an introductory class and no prior experience with programming is required.
- Laptop with Windows/Mac/Linux OS (no Chrome books)
- Required software:
- Additional software:
- Git - version control system
- GitHub - git-based online platform for code hosting
- RStudio - integrated development environment for R
- Spyder - integrated development environment for Python
- Visual Studio Code - feature-rich text editor
See syllabus for further details.
- Course website: tinyurl.com/POP77001
- GitHub repository: github.com/ASDS-TCD/POP77001_Computer_Programming_2022
Books:
-
Guttag, John. 2021 Introduction to Computation and Programming Using Python: With Application to Computational Modeling and Understanding Data. 3rd ed. Cambridge, MA: The MIT Press
-
Matloff, Norman. 2011. The Art of R Programming: A Tour of Statistical Software Design. San Francisco, CA: No Starch Press.
-
McKinney, Wes. 2017. Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython. 2nd ed. Sebastopol, CA: O'Reilly Media
-
Peng, Roger D. 2016. R Programming for Data Science. Leanpub
-
Wickham, Hadley, and Garrett Grolemund. 2017. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. Sebastopol, CA: O'Reilly Media.
-
Wickham, Hadley. 2019. Advanced R. 2nd ed. Boca Raton, FL: Chapman and Hall/CRC.
Online:
-
Python 3 Documentation (intermediate and advanced)
-
Participation (10 %)
- Tutorial attendance
-
4 assignments (40%)
- Bi-weekly programming exercises
- Due by 23:59 on Friday of weeks 3, 5, 9 and 11 on Blackboard
-
Research project (50%)
- Final Python/R project demonstrating familiarity with programming concepts and ability to communicate results
- Due by 23:59 on Friday, 16 December 2022
- ✔️ Code exists
- ⌚ Code runs and does what it has to do
- 📜 Code is legible (meaningful naming, comments)
- ⚙️ Code is modular (no redundacies, use of abstractions)
- 🏎️ Code is optimized (no needless loops, runs fast)
Marks at Trinity: https://www.tcd.ie/academicregistry/exams/student-guide/
- Plagiarising computer code is as serious as plagiarising text (see Google LLC v. Oracle America, Inc.)
- All submitted programming assignments and final project should be done individually;
- You may discuss general approaches to solutions with your peers;
- But do not share or view each others code;
- You can use online resources but give credit in the comments.
Check the Trinity's guide on the levels and consequences of plagiarism
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
