Advanced Computational Communication Methods (Summer 2023)

= Course Information =
 * COM 682: Advanced Computational Communication Methods
 * Location: Discord
 * Class Hours: Tuesdays, 10–12 ET in the #General channel on Matrix

Instructor

 * Instructor: Jeremy Foote
 * Email: jdfoote@purdue.edu
 * Office Hours: By appointment

= Course Overview and Learning Objectives =

I teach an Intro to Programming and Data Science course that gives students an introduction to programming in Python, and some basic skills for gathering and analyzing data from the web.

There are many, many aspects of computational communication research that we don't cover in that class. This class is intended to take the next step in providing resources for students who want to do computational social science research.

That next step typically looks different for different students, depending on what they want to research. One goal of this class is to collect useful resources for learning many of the types of tools and methods that computational social scientists typically use. Some of these will be explicitly discussed in class, but others will not.

In particular, following conversation with group members, we will focus on a fairly deep dive into computational text analysis and reproducible workflows. Other topics will be more self-organized and self-directed.

I will consider this class a complete success if, at the end, every student can:


 * Understand in and engage in creating open, reproducible workflows for their academic research
 * Understand some of the key tools for doing computational text analysis, including topic models, word embeddings, machine learning classifiers, and LLMs
 * Learn how to identify the key texts, software libraries, and resources for learning a new computational method

= Required resources and texts =

Laptop
Most of this class will be asynchronous, so you will need access to your own laptop. It is assumed that you have experience running Python programs on your computer, and have the needed hardware and software to do so. We will mostly be using Jupyter Notebooks, but you are welcome to use other IDEs.

In order to participate in class, you will need to sign up for our Matrix "space", using this link. If you haven't used Matrix before (most people haven't), then you will need to create an account and choose software to use to connect to the room. The default software is Element, which I highly recommend using. There is a web version of Element, but I'd recommend downloading desktop and mobile apps at https://element.io/download.

Readings

 * We will be working together to identify readings, videos, and other resources

= Course logistics =

Note About This Syllabus
This is a very collaborative class, and one of the outcomes of the class will be to update this wiki with resources regarding topics of interest to class members. Therefore, the syllabus will be in flux both before the class and during the class.

Lectures
Our class time will follow a "flipped" classroom model. We will identify asynchronous materials (readings, recorded lectures, assignments, etc.) which you will work on before class and we will use our class time to review concepts, identify confusion, and synthesize.

Because we only have a few hours a week, some of this work will also happen outside of class, through conversations in the Matrix space.

For the first ~half of class we will all be working on the same topics. For the second half, we will use part of class time for students to present on either a topic or a project that they are working on.

Office hours and email

 * I will be traveling for much of June and part of July. I'm happy to make time to meet, but my schedule will be much less consistent than during a typical semester.
 * I am also available by email. You can reach me at [mailto:jdfoote@purdue.edu jdfoote@purdue.edu].

= Assignments =

There will be two primary assignments for this class: one topic exploration, and a final project.

Topic exploration
One goal of this class is to learn to identify and assess tools, libraries, and learning resources. Each student will identify a topic that they would like to be in charge of. This will involve researching the conceptual background of the topic, identify and evaluating resources related to the topic, and sharing the best resources on this wiki page.

Ideally, this will include at least:
 * one or more academic papers about the topic
 * one or more Python libraries
 * one or more walkthroughs of using the method in Python (text and/or video)

Final Project
The final project can take one of two forms: either an explainer of a computational method or a research project.

Explainer
For the explainer, you will create a polished explainer of one of the topics covered in class. This should include an explanation of the topic/method, with a focus on how and why the topic is useful for doing social science research, as well as its limitations. You should also include an explanation of how to use the associated method, probably using public data.

Ideally, this explainer will fill a gap in the resources that already exist about a topic. One gap that often exists is resources specifically designed for communication scholars or social scientists more broadly. Or, resources to help more novice programmers, etc.

The format of this explainer is up to you, but it will likely at least include a Jupyter Notebook (or similar); I think that a video walkthrough of a notebook is also nice, but I'm open to other options.

Research Project
The other option for a final project is to push forward one of your quantitative research projects that would benefit from one or more computational methods. I strongly urge you to work on a project that will further your academic career outside of the class. There are many ways that this can happen. Some obvious options are to prepare a project that you can submit for publication, that you can use as pilot analysis that you can report in a grant or thesis proposal, and/or that fulfills a degree requirement. I prefer that you do projects on your own but it may be possible to work as a small team (maximum 3 people). Team projects are expected to be more ambitious than individual projects.

Planning Document
If you would like to take this option, you will submit a 2-4 page planning document of what you would like to do within the first few weeks of class, just to make sure we are on the same page about the scope of what you want to accomplish and so that I can give some initial feedback.

The project planning document is a basic shell/outline of an empirical quantitative research paper. The planning document should focus around three big questions:
 * Why are you planning to do this analysis? Make sure to introduce any background information about the topic, the community, your business, or anything else that will be required to properly contextualize your study.
 * How will you get the data to analyze? Describe the data sources will you collect and how they will be collected.
 * How will you analyze the data? Describe the visualizations, tables, or statistical tests that you will produce.

One approach that I have found helpful is outlined on this wiki page.

Project report
Final projects will likely look different, depending on the stage of the project when beginning the class. Typically, you will write a document or a Jupyter Notebook that will ideally provide the foundation for a high quality short research paper that you might revise and submit for publication. I do not expect the report to be ready for publication, but it should contain polished drafts of all the necessary components of a scholarly quantitative empirical research study. In terms of the structure, please see the page on the structure of a quantitative empirical research paper.

The great thing about a Jupyter Notebook is that it allows you to provide data, code, and any documentation sufficient to enable the replication of all analysis and visualizations. If you choose to write the report as a Word document, then you will need to include the code in a separate file.

Because the emphasis in this class is on methods and because I'm not an expert in each of your fields, I'm happy to assume that your paper, proposal, or thesis chapter has already established the relevance and significance of your study and has a comprehensive literature review, well-grounded conceptual approach, and compelling reason why this research is important. As a result, you do not need to focus on these elements of the work in your written submission. Instead, feel free to start with a brief summary of the purpose and importance of this research followed by an introduction of your research questions or hypotheses. If you provide more detail, that's fine, but I won't give you detailed feedback on these parts and they will not figure prominently in my assessment of the work.

Jupyter Notebooks do not have all of the tools for citations that Word or LaTeX or even Google Docs have, so while I expect you to cite related work your references section does not need to be as polished as citation management software would make it.

= Grades =

This course will follow a "self-assessment" philosophy. I am more interested in helping you to learn things that will be useful to you than in assigning grades. The university still requires grades, so you will be leading the evaluation of your work. At the beginning of the course, I will encourage you to think about and write down what you hope to get out of the course. Halfway throughthe course you will reflect on what you have accomplished thus far, how it has met, not met, or exceeded expectations, based both on rubrics and personal goals and objectives. At each of these stages you will receive feedback on your assessments. By the end of the semester, you should have a clear vision of your accomplishments and growth, which you will turn into a grade. As the instructor-of-record, I maintain the right to disagree with your assessment and alter grades as I see fit, but any time that I do this it will be accompanied by an explanation and discussion. These personal assessments, reflecting both honest and meaningful reflection of your work will be the most important factor in final grades.

I suggest that we use the following rubric in our assessment:


 * 30%: class participation, including attendance, participation in discussions and group work
 * 30%: topic exploration
 * 40%: Final Project paper/Jupyter notebook.

My interpretation of grade levels (A, B, C, D/F) is the following:

A: Reflects work the exceeds expectations on multiple fronts and to a great degree. Students reaching this level of achievement will:
 * Do what it takes to learn the programming principles and techniques, including looking to outside sources if necessary.
 * Engage thoughtfully with an ambitious final project.
 * Take intellectual risks, offering interpretations based on synthesizing material and asking for feedback from peers.
 * Share work early allowing extra time for engagement with others.

B: Reflects strong work. Work at this level will be of consistently high quality. Students reaching this level of achievement will:
 * Be more safe or consistent than the work described above.
 * Ask meaningful questions of peers and engage them in fruitful discussion.
 * Exceed requirements, but in fairly straightforward ways
 * Compose complete and sufficiently detailed reflections.
 * Complete nearly all of the programming assignments at a high level

C: This reflects meeting the minimum expectations of the course. Students reaching this level of achievement will:
 * Turn in and complete required assignments on time.
 * Be collegial and continue discussion, through asking simple or limited questions.
 * Not complete assignments or turn some in in a hasty or incomplete manner.

D/F: These are reserved for cases in which students do not complete work or participate. Students may also be impeding the ability of others to learn.

= Schedule =

NOTE: This section will be modified throughout the course to meet the class's needs. Check back in often.

Each week will include the topic of the week. This is where we will gather and organize resources regarding each topic. Please be bold in editing this portion of the wiki to add or arrange resources.

Week 1: Welcome! (May 16)
Assignment Due:
 * None

Required Readings:

Agenda:
 * Class overview and expectations — We'll walk through this syllabus.
 * Make assignments for topic exploration

Week 2: Reproducible Research I (May 23)
Resources:


 * Paper: Wilson G, Bryan J, Cranston K, Kitzes J, Nederbragt L, Teal TK (2017). Good enough practices in scientific computing. PLoS Comput Biol 13(6): e1005510.
 * Paper: Gentzkow M, Shapiro JM. Code and Data for the Social Sciences: A Practitioner's Guide; 2014. https://web.stanford.edu/~gentzkow/research/CodeAndData.pdf.
 * Video: Reproducible Research: Concepts and Ideas. Roger Peng. YouTube

Organization
Key ideas: my_cool_project
 * Folder structure
 * Different options, but separate code from data
 * Jeremy's approach:
 * -- README.md # Explanation of project and how to navigate it
 * -- Snakefile # Or Makefile - workflow tool
 * -- data/
 * |-- raw_data/
 * |-- processed_data/
 * -- code/
 * -- results/
 * |-- figures/
 * -- papers/
 * -- presentations/
 * -- results/
 * |-- figures/
 * -- papers/
 * -- presentations/
 * -- presentations/
 * -- presentations/

Data Management
Key ideas:
 * Back up raw data
 * Keep raw data (and make it read-only)
 * Step one is to clean the data: create the data you wish you received
 * Name variables well
 * Use a tidy data structure
 * Share data (when possible)

Code management
Key ideas:
 * Version control
 * Don't repeat yourself (DRY)
 * Build at least a few high-level test cases

Week 3: Reproducible Research II (May 30)
Resources:
 * Blog post: Reproducible Workflows by Justin Kitzes

Reproducible analyses and papers
Key ideas:
 * Some big benefits (and some drawbacks) to using text-based tools (Markdown or LaTeX)
 * Can be put in version control
 * Tools like knitr can be used to put code directly into a document
 * Make figure creation part of your workflow, have documents point to your figures directory
 * Use citation management software that integrates with your document (use Zotero)

Sharing
Key ideas:
 * Share your code and data whenever possible!
 * Lots of options - OSF.io, Harvard Dataverse, etc.
 * Share preprints online

Advanced: Workflow Management
Key ideas:
 * Tools to reproduce as much of the workflow as possible
 * README file is much better than nothing
 * Even better is a "wrapper" script that runs everything
 * Very clear exactly what is run and how
 * Some fairly simple options:
 * Python file
 * GNU Make
 * Snakemake

Week 4: Computational text analysis: entity extraction, topic models (June 6)
Resources:

Week 5: Computational text analysis: word embedding models (June 13)
Resources:

Week 6: Computational text analysis: using LLMs for research (June 20)
Resources:

Agenda:
 * Discuss how things are working and a plan for the rest of the course.

Week 7: TBD (June 27)
I'm leaving this week open because I think we may want one more week on shared topics.

Assignment Due: self-assessment reflection

Resources:

Week 9: Share and discuss works-in-progress (July 11)
Students:

Week 10: Share and discuss works-in-progress (July 18)
Students:

Week 11: Share and discuss works-in-progress (July 25)
Visit from Bill Rand, an expert in agent-based moedeling.

Students:

Week 12: Share and discuss works-in-progress (August 1)
Students:

Assignment Due:
 * Final project due

= Additional Topics =

This is a key goal of this page - a curated collection of resources around computational social science topics. I'll start with a list of topics, but please add others.

Network analysis

 * Network Analysis

Object-oriented programming

 * Classes and Object-oriented programming (This is a set of videos)

Screen scraping

 * Mini course on screen scraping

Regular expressions

 * Regular Expressions

= Administrative Notes =

Attendance Policy
Attendance is very important and it will be difficult to make up for any classes that are missed. It is expected that students communicate well in advance to faculty so that arrangements can be made for making up the work that was missed. It is the your responsibility to seek out support from classmates for notes, handouts, and other information.

Incomplete
A grade of incomplete (I) will be given only in unusual circumstances. The request must describe the circumstances, along with a proposed timeline for completing the course work. Submitting a request does not ensure that an incomplete grade will be granted. If granted, you will be required to fill out and sign an “Incomplete Contract” form that will be turned in with the course grades. Any requests made after the course is completed will not be considered for an incomplete grade.

Academic Integrity
While I encourage collaboration, I expect that any work that you submit is your own. Basic guidelines for Purdue students are outlined here but I expect you to be exemplary members of the academic community. Please get in touch if you have any questions or concerns.

Nondiscrimination
I strongly support Purdue's policy of nondiscrimination (below). If you feel like any member of our classroom--including me--is not living up to these principles, then please come and talk to me about it.

Purdue University is committed to maintaining a community which recognizes and values the inherent worth and dignity of every person; fosters tolerance, sensitivity, understanding, and mutual respect among its members; and encourages each individual to strive to reach his or her own potential. In pursuit of its goal of academic excellence, the University seeks to develop and nurture diversity. The University believes that diversity among its many members strengthens the institution, stimulates creativity, promotes the exchange of ideas, and enriches campus life.

Students with Disabilities
Purdue University strives to make learning experiences as accessible as possible. If you anticipate or experience physical or academic barriers based on disability, you are welcome to let me know so that we can discuss options. You are also encouraged to contact the Disability Resource Center at: drc@purdue.edu or by phone: 765-494-1247.

Emergency Preparation
In the event of a major campus emergency, I will update the requirements and deadlines as needed.

Mental Health
If you or someone you know is feeling overwhelmed, depressed, and/or in need of mental health support, services are available. For help, such individuals should contact Counseling and Psychological Services (CAPS) at 765-494-6995 during and after hours, on weekends and holidays, or by going to the CAPS office of the second floor of the Purdue University Student Health Center (PUSH) during business hours.

= Acknowledgements =

This course is heavily based on earlier courses taught by Tommy Guy and Mako Hill at the University of Washington as well as a course taught by Laura Nelson at Northeastern University.