A lot of the most consequential computational studies have come from folks who are not computer scientists. Example: medical sociologist Christakis and political scientist Fowler showed that obesity is contagious (NY Times article, their paper).

What is this course about?

Discover the joy of programming: It's not restricted to computer scientists!

Learn Python and R: Two of the most widely used languages, these are the Swiss army knives in your toolbox (for the good).

Acquire some additional tools: Tools like Gephi (for network analysis) are valuable for interdisciplinary studies. No GIS, however (check out an array of DCS courses on GIS).

Course Description:

Computational tools, including programming, are increasingly important across the liberal arts. Such tools, however, cannot be effectively created or used without a fundamental understanding of computation. This course provides a foundation for the use of these tools in conjunction with the critical framework of DCS. A major goal of the course is to teach introductory programming in Python and R, but with a focus on how programming can be used to complement and even to implement methodologies including text analysis, network analysis, and visualization. Students will use these methods in the service of critically engaging with data. E.g., where computer science focuses mainly on problem solving, this course is fundamentally about exploration and often problem discovery. No prior programming knowledge is required.

Prerequisites:

None. If you already know pogramming well, this course is not for you.

Learning Goals

Even after 5 years:

  • Know: the fundamentals of programming.
  • Able to do:
    (1) exercise computational thinking,
    (2) code in Python and R with some reference, and
    (3) understand others' code, including code generated by AI tools.
  • Find value in: whatever major you're pursuing now or job you'll do in the future, you'll do it better by utilizing computational methods.


What does it look like on a day-to-day basis?

  • This is an active-learning course with in-class activities designed for student engagement and learning. Most often, I'll code examples in Python and R, and you'll follow along.
  • Due to active learning, you need to come to the class to succeed in this course. Notes from classmates will not help.
  • The work for the course consists of two major chunks - labs and projects. The labs are formative in nature, designed to help you build basic skills and practice programming. The projects are summative in nature, designed to require more planning and design.
    • In a normal course week we will have one major topic. Each topic will have an associated lab. That lab will normally be due the following week.
    • There will be three projects, including a final project. The projects will require a lot more work than the labs.
  • There is no final exam. Students will do a final project.


How is it different from Intro to CompSci?

  • We'll approach this class as a group. We'll help each other and collaborate along the way in ways that are not allowed in Intro to CompSci. You are not competing with your classmates, you should be pulling each other along.
  • Our objective is different, too. Whereas Intro to CompSci prepares students for the next CompSci course, goal of this course is to learn computational methods to excel in whatever major you're pursuing.

What are the main units?

Unit 1: Computational thinking using Python (9 weeks)

We'll start with computational thinking and its applications using Python programming. Our focus will be on a variety of data, including network data. We'll finish this unit by connecting Python with Gephi for network analysis and visualization (9 weeks). There will be two projects on this unit.

The social network and color-coded communities among the dolphins living in Doubtful Sound, New Zealand. Gephi visualizations like this often requires working with data using a language like Python.

Unit 2: "Data science" using R (5 weeks)

We'll learn R pretty quickly,thanks to our knowledge of Python. We'll then see how R can be used to extract information from raw data. It's true that whatever we can do using R, we can do the same thing with Python. The reason we'll learn R is twofold.
(1) Oftentimes, we must work in an existing echosystem where different languages are used to code different components, and related to this point,
(2) some stuff is just easier to do using R (e.g., plotting, which looks prettier in R, too).

A snapshot of some plots showing the impact of our social influence on contagious disease dynamics. The study was done by Juliana Taube '21 and Profs. Irfan and Zeeman. Complicated plots like these can be conveniently created using R.

Instructor

Professor: Mohammad T. Irfan
Email: mirfan@bowdoin.edu
Office Hrs:
Wed 3-5:30pm
Fri 10am-12pm
Office room: Mills 209
LA: Narmer Bazile & Emily Simons
LA hrs:
Tue & Wed 7-9pm (Emily)
Thu 7-9pm (Narmer)
LA hrs room: Mills 105

Time & Place

Lectures: MW 11:40-1:05
Room: Mills 210

Course Details

Textbooks:

All our textbooks are freely available online.


Software:

Media:

  • This course website for syllabus, slides, etc.
  • Canvas for projects and other deliverables, except Python labs
  • Coderunner for Python labs

Evaluation:

  • 60% points on formative assessment: Labs, other formative assignments, class participation, and attendance

  • 40% points on summative assessment: Three projects, including a final project

  • Points to letter grade conversion: 94% A, 90% A-, 85% B+, 80% B, 75% B-, 70% C+, 65% C, 60% C-, 55% D, below 55% F


Late Policy:

Extensions will be given if there is any health or other emergency situation. Otherwise, late submissions will be accepted up until 24 hours after the deadline with a penalty. Each hour after the deadline would cost 4%.

Course Schedule

Week Unit Topics Work Due Links and Notes
Week 1
(1/22, 1/24)
Unit 1: Python Intro and Python Basics Lab 0 Slides (Intro-Python)
Week 2
(1/29, 1/31)
Unit 1: Python 1. VS Code and first program
2. Brief intro to functions
Lab 1
Week 3
(2/5, 2/7)
Unit 1: Python Flow control: conditional Lab 2
Week 4 (2/12, 2/14)
Unit 1: Python Flow control: while loop Lab 3
Week 5 (2/19, 2/21) Unit 1: Python Flow control: for loop
More on functions
Lab 4
Week 6 (2/26, 2/28) Unit 1: Python Lists and strings Lab 5
Week 7
(3/4, 3/6)
Unit 1: Python Dictionaries and structured data Lab 6
Project 1
Spring Break        
Week 8
(3/25, 3/27)
Unit 1: Python Files: processing text files
Week 9
(4/1, 4/3)
Unit 1: Python Files (continued)
(1) CSV files
(2) JSON files
(3) API programming
Lab 7
Week 10
(4/8, 4/10)
Unit 2: R
Misc. Python topics
Intro to R: data visualization
Project 2 out
Week 11
(4/15, 4/17)
Unit 2: R
Intro to R: data visualization (cont.)
Basics of R programming
Data transformation
R Lab 1
Week 12
(4/22, 4/24)
Unit 2: R
Data analysis R Lab 2
Week 13
(4/29, 5/1)
Unit 2: R
Data analysis (cont.) R Lab 3
Week 14
(5/6, 5/8)
Asynchronous: Prof. Irfan in NZ for conf.
Unit 2: R
Asynchronous activities for the final project R Lab 4
Final Project Presentation Unit 2: R
Presentation date/time TBA,
between 5/13 - 5/18


Collaboration Policy

Students are expected to follow this course's collaboration policy and Bowdoin's Academic Honor Code.

The specific level of collaboration will be mentioned in every assignment. For individual assignments, you are encouraged to discuss ideas and techniques broadly with your classmates, but not specifics of assigned problems. Discussions should be limited to questions that can be asked and answered without using any written medium (e.g., pencil and paper, email, etc.). This means that at no time should a student read anything written by another student. Violation of this policy is grounds for me to initiate an action that would be filed with the Dean's office and would come before the J Board. If you have any questions about this policy, PLEASE do not hesitate to contact me. This will be a zero-tolerance policy.

It is permissible to use software and materials available from other sources (understanding that you get no credit for using the work of others on those parts of your assignment) as long as: 1) You acknowledge explicitly which aspects of your assignment were taken from other sources and what those sources are. 2) The materials are freely and legally available. 3) The material was not created by a student at Bowdoin as part of this course this year or in prior years. To be absolutely clear, if you turn in someone else's work you will not receive credit for it - on the other hand, if you acknowledge it, at least you will not go to the J Board.

All code, write-ups, reviews, documentation, and other written material must be original and may not be derived from other sources, including AI tools like ChatGPT, Bard, etc. (unless directed otherwise).

If in the future you provide your work to other students, this will also constitute a violation of Bowdoin's honor code.


Github Policy:

Making assignment solutions publicly available through Github or other media will constitute a violation of the honor code for this course.

If Winter comes, can Spring be far behind? -- Percy Bysshe Shelley