DH140: Coding for Humanists
Winter 2021
Wednesdays 2pm - 5pm
Instructor:
Yoh Kawano (yohman@gmail.com)
Special Technology Assistant:
Ben Winjum (bwinjum@ucla.edu)
Office Hours:
Please email in advance for appointments
- Yoh: Fridays 1PM - 3PM and by appointment
Course Description
Welcome to the world of coding and spatial thinking in the digital humanities. In recent years, our relationship with digital data and spatial visualization has changed dramatically. No longer are we limited to a mode of map-making that is dominated by industry giants like Google and ESRI. Instead, a suite of data-science tools have matured to a point where they allow us to produce similar, if not, more powerful and creative ways that advance digital data exploration.
Our understanding of social phenomena through digital and spatial constructs in urban data allow us to address questions on social justice, the environment, transportation, urban histories, community development and design, amongst many other themes, and how these factors may affect different population groups in different ways. This course prepares you for challenges in urban data beyond off-the-shelf cartographic approaches. It looks at the various components of data’s journey—acquisition, exploration, modeling, and communication through visualization—and how it enables and advances your research from a coding and data science perspective.
The goal for this course is to expose you to the foundations of coding and data science. Where once there was a dearth of available digital information, we now live in a world of too much data. How can these data be transformed to human expressions and narratives that are utilized in the humanities? We begin with an introduction to various data science tools, and review the basics of programming with Python. Once a foundation of Python programming and data wrangling is achieved, data analysis through Python Libraries, and subsequently, through advanced spatial analysis will be introduced. All lessons will be based on “real” data with analytical methods addressing relevant and contemporary urban problems. At the conclusion of this course, students will be able to critically describe, analyze, and visualize digital data for humanistic practices and research.
While there are no prerequisites for taking this course, people who are approaching programming for the first time will admittedly find the course to be intense and challenging.
Learning Objectives
At the conclusion of this course, students will be able to critically describe, analyze, and visualize digital data for humanities research.
Specifically, students will learn to:
- Demonstrate the value of data for humanistic inquiry through discovery, exploration, and analysis
- Critically evaluate data and create frameworks to prepare data for research
- Apply data science programming techniques to produce relevant visualizations that inform humanistic research
- Learn to visualize data geo-temporally to communicate the importance of place-based and time-based informatics
- Learn to produce publication-ready scholarly materials in the form of tables, charts, and maps
Inspirations
I would be remiss if I do not mention various inspirations that have led to the creation of this course. First and foremost, the late and great Leo Estrada, my mentor and confidant over the years (sorry, decades!), who taught GIS at our department for many decades. Leo and I spoke extensively about modifying this course to a more “modern” approach, and I am delighted and honored to uphold his legacy moving forward.
Second, I have taken the liberty (with permission) to borrow ideas and materials from other courses. I specifically took inspiration from Paul Waddell’s “Urban Informatics and Visualization” course at UC Berkeley, and Geoff Boeing’s “Data, Evidence, and Communication for the Public Good” at the Department of Urban Planning and Spatial Analysis at USC’s Sol Price School of Public Policy.
Course materials
The course will almost entirely be conducted on Jupyter Notebooks. A JupyterHub, a web-based Jupyter Notebook environment, has been set up specifically for this class, and is available at the following URL. Note that you will need multi-factored authentication to login:
- JupyterHub (choose UCLA)
Weekly course materials, including presentations, interactive notebooks (.ipynb), and data will be made available through a course github repository (here) that you will interact with through your JupyterHub account.
Assignments and Evaluation
All assignments, unless otherwise specified, must be posted on your individual GitHub accounts or on CCLE by midnight of the Sunday prior to our class on Monday. Assignments are posted in each week’s page, so make sure to read them carefully.
- Participation, individual progress, coding and reading assignments 10%
- Group assignments 40%
- There will be four group assignments throughout the quarter. Each assignment will be worth 25% of the total group assignment grade.
- Mid-term 20%
- Final report 30%
Task | Number of items | Points |
---|---|---|
Participation and individual assignments | 7-10 | 100 |
Group Assignments | 4 | 400 |
Mid-term | 1 | 200 |
Final report | 1 | 300 |
Grading criteria
All assignments are graded on the following criteria:
- Timeliness: Unless otherwise specified, all assignments are due at midnight of the day before the next class. For most assignments, you will be asked to submit them as files on your github account. The timestamp on the files on your github account will be used to determine whether they were submitted on time. Any late assignments will be marked down.
- Cleanliness: Nobody wants to go through unreadable code! Make sure to document your work accordingly, providing markdown cells and comments throughout.
- Does it work?: Unless you purposefully created code cells that produce errors to make a point, notebook assignments must run from top to bottom without any errors. Verify this by restarting the kernel, and running all cells.
- Thinking out of the box: It is easy to copy an existing notebook, and replace datasets and parameters to fulfill an assignment. But how well have you/your group grasped the underlying concepts? This can be demonstrated by your ability to think outside the box, and applying rather than copying each step of a given assignment. For example, you may experiment with functions not demonstrated in class, or create your own workflow that borrows certain concepts learned in class to make them your own.
Remote zoom learning expectations
Welcome to the new normal. It is expected that the quarter will be conducted remotely and via zoom in its entirety. The good news is that this course—coding, data, maps!—is situated perfectly for remote learning. Nevertheless, there are some expectations and guidelines I would like to enforce in order to make this experience as fruitful and productive for all of us. First, make sure that your Internet connection and equipment are set up to use Zoom and able to share audio and video during class meetings. Let me know if there is a gap in your technology set-up as soon as possible, and we can see about finding solutions.
Recording of class sessions
All synchronous classes will be recorded via Zoom so that students in this course (and only students in this course) can watch or re-watch past class sessions. Please note that breakout rooms will not be recorded. I will make the recordings available on CCLE as soon as possible after each class session (usually the day after the class meeting). Recordings will live in our CCLE website.
Please note that you are not allowed to record the class yourself or share the class recordings. This is to protect your FERPA rights and those of your fellow students.
Sharing video
In this course, being able to see one another helps to facilitate a better learning environment and promote more engaging discussions. Therefore, our default will be to expect students to have their cameras on during lectures and discussions. However, I also completely understand there may be reasons students would not want to have their cameras on. If you have any concerns about sharing your video, please email me as soon as possible and we can discuss possible adjustments.
Note: You may use a background image in your video if you wish; just check in advance that this works with your device(s) and internet bandwidth. Also, having a profile picture on your Zoom account helps humanize your presence in the course at times when you need to shut the camera off.
Parents
Parents deserve access to education. At all times, I strive to be inclusive to parents, and now, in our virtual learning space, with many children learning from home or schools facing sudden closures, we can expect children to be present in class from time to time.
- All breastfeeding babies are welcome in our synchronous sessions as often as is necessary to support the breastfeeding relationship. I’d never want students to feel like they have to choose between feeding their baby or continuing their education.
- Children may be visible onscreen during class sessions, either in your lap or playing in the background. Alternatively, you may turn your camera off if more privacy is required.
- Parents or caregivers who anticipate having a child(ren) with them during class sessi ons are encouraged to wear a headset to help minimize background noise. You may mute your microphone and communicate through the chat feature at any point necessary.
- Stepping away momentarily for childcare reasons is completely understandable and expected. Simply mute and/or turn off your camera as necessary, and rejoin us when you are able.
- I ask that all students work with me to create a welcoming environment that is respectful of all forms of diversity, including diversity in parenting status.
- I hope that you will feel comfortable disclosing your student-parent status to me. This is the first step in my being able to accommodate any special needs that arise. While I maintain the same high expectations for all student in my classes regardless of parenting status, I am happy to problem solve with you in a way that makes you feel supported as you strive for school-parenting balance.
How to ask a technical question
Given the nature of the course, you will have many, many questions along the way. However, we ask that you adhere to the following guidelines in order to make consultations as productive as possible. Students who do not follow these guidelines will be asked to reschedule.
Before asking a question:
- Close all open programs, restart your computer, then try your task again
- Search google and stackoverflow for the topic/problem (for example, the name of the function you’re struggling with or the error message you are seeing)
- Go back through the relevant lecture materials to look for any insights
- Go back through the assigned reading materials to look for any insights
If the above steps haven’t solved your problem, send an email (or attend office hours) and include the following information:
- A detailed description of what you’re trying to do, why, and how
- A complete minimal reproducible example of your code so far (never send screenshots of code)
- What you’ve already tried to do to solve your problem and what you have learned from it (specifically, explain the results of steps 1-4 above, including relevant links from stackoverflow etc)
Readings and Resources
- Geographic Data Science with PySAL and the PyData Stack
- Spatial Analysis Methods and Practice by George Grekousis
- Think Python 2nd Edition by Allen B. Downey
- Jupyter Notebooks
Weekly Schedule
Weekly content is subject to change, and will be modified as needed based on class discussions, needs, and progress.
Preparation
- Fill out the pre-class survey
- If you do not have a GitHub account, create one for the class
- Make sure you can log into the class JupyterHub
- JupyterHub (choose UCLA)
Week 1 (1/6): Introduction to coding and data science
Week 2 (1/13): Data in the digital humanities: The challenge in data acquisition
Week 3 (1/20): Understanding communities: Census data profiles
Week 4 (1/27): Open Street Maps
Week 5 (2/3): Open data and APIs
Week 6 (2/10): Mid-terms
Week 7 (2/17): Geocoding, multiple overlays, and functions
Week 8 (2/24): Twitter scraping
Week 9 (3/3): Qualitative analysis, sentiment analysis
Week 10 (3/10): Story maps and interactive web mapping
Final Presentations (3/17)
Resources:
- gboeing/ppd534: USC PPD534: Data, Evidence, and Communication for the Public Good
- University of Southern California
- Professor: Geoff Boeing
- CP255: Urban Informatics and Visualization
- University of California, Berkeley Department of City and Regional Planning
- Professor: Paul Waddell
- Automating GIS-processes 2019
- University of Helsinki, Finland
- Computing for the Social Sciences (R focused)
- University of Chicago
Statement of Affirmation
I intend to make this classroom a space that affirms all identities and perspectives, including your race, color, national origin, ethnic origin, ancestry, marital status, religion, age, sex, gender, gender expression, gender identity, transgender status, pregnancy, physical or mental disability, medical condition, genetic information (including family medical history), sexual orientation, political ideology and affiliations, citizenship, or service in the uniformed services. Regardless of background, all students have a right to an equitable education. Because of the multi-faceted and complex nature of our identities, it is imperative that we are committed to affirming one another’s perspectives as a community for all enrolled in this course. I encourage all members to embrace and learn from the diversity in this classroom, school, and university. I want to highlight that discrimination, harassment, or forms of hateful transgressions will not be tolerated in our learning environment. If you have any recommendations about how to make our environment more inclusive please feel free to let me know.
Accommodations based on disability
If you are already registered with the Center for Accessible Education (CAE), please request your Letter of Accommodation on the Student Portal. If you are seeking registration with the CAE, please submit your request for accommodations via the CAE website. Please note that the CAE does not send accommodations letters to instructors–you must request that I view the letter in the online Faculty Portal. Once you have requested your accommodations via the Student Portal, please notify me immediately so I can view your letter.
Students with disabilities requiring academic accommodations should submit their request for accommodations as soon as possible, as it may take up to two weeks to review the request. For more information, please visit the CAE website (www.cae.ucla.edu), visit the CAE at A255 Murphy Hall, or contact by phone at (310) 825-1501.
Covid-19 information
The Luskin School has a Covid-19 FAQ resource page compiling information relevant to Covid-19 and its impacts. The page is updated periodically.