The Python Users’ Group (PUG) meets every other week in the Digital Scholarship Lab to help individuals with questions and projects related to Python. This is not a typical GC Digital Fellows Workshop: there is no outline, no presentation, and no curated problem sets. What the PUG does offer is targeted, in-depth support for anything Python related (broadly defined). As a participant there are two ways to take advantage of the PUG. The first way is to come to learn Python independently with a group of tutors nearby. The second way is to come with a specific Python-related question or project that you want help with.
The first option is really a flipped-classroom model, allowing you to cover the basics outside and get help when you get stuck. There are a lot of resources to get you started, and a whole post about them here. Another option in this vein is to use the PUG as dedicated time to work through the tutorials with a knowledgeable user nearby. This gives you a chance to explore the basics and focus on the packages you are going to use for your field. In this way, you develop your programming knowledge with a focus on the types of questions and projects you might do.
The second option is to come with a project you are working on and get specific, in-depth help. This week I had a chance to work with someone on a fascinating text-analysis project. He came to the PUG with a general question about setting up directories and where and how to run Python (the shell, Idle, iPython Notebook, etc.). After talking for a couple minutes, we realized that his question actually started one step back, at data collection. If you have ever worked with data collection from the web, you know how frustrating it could be. He had spent two weeks trying to figure out how to get these texts. There was no direct solution except copy-and-pasting each page individually, which was not going to work for a 600-700 page document. This is not a Python problem, but it is an interesting problem that I was excited to work through with him and the PUG is flexible enough that we could sit down and focus on it together.
First we talked through what he wanted to do to figure out the steps he would have to take. Once we understood and could articulate what he needed, we started googling for solutions. At this point, we were exploring together. I have tackled a similar project, but researchers’ problems are often very specific and nuanced, and require custom-made solutions. Since his priority is to learn how to do text analysis, not webscraping, we decided that any WYSIWYG solution would be just fine if it worked. Through a combination of the Google Chrome Scraper plugin, Open Refine, and Excel, we figured out how to scrape all of the pages he needed.
Talking through the project and goals took us about 30 minutes, figuring out the webscraping took us a solid hour. That 90 minutes was probably the most fun I’ve had all week. As anyone who has approached a technology or programming problem knows, it can be very emotional. He had been staring at the screen, frustrated, for two weeks. I’ve been there: It’s painful, usually I threaten to quit, give up, decide the project isn’t worth it. But then the breakthrough comes, and I’m elated, dancing for joy, jumping around my apartment. Working through that problem together, I got to experience all of the joy and thrill of finally figuring it out (without the frustration of thinking I’ll never be able to do it). We were both exclaiming with excitement, overjoyed to have found the solution. I had always thought that feeling of elation was just a response to the hours of frustration. Turns out that it’s the feeling of learning something new, making something happen, and solving a problem. It’s the best part of “doing digital” – the joy of sitting at the edge of your knowledge and pushing it just a teeny bit further.
The PUG meets every other Monday from 2-4pm in the Digital Scholarship Lab (7414). The next meeting is November 16th.