Professor Alan Liu, Visiting Fulbright Specialist: a 6-week festival of Digital Humanities in Aotearoa-New Zealand

The University of Canterbury Digital Humanities (UCDH) Programme is excited to announce six weeks of Digital Humanities activity, anchored by the visit of Professor Alan Liu from the University of California Santa Barbara. Professor Liu will be visiting as a Fulbright Visiting Specialist from October 19 to November 29, with the generous support of the Fulbright Scholar Program.

Professor Patricia Fumerton (UC Santa Barbara) will also stay with us as a Visiting Scholar in Residence, for the last two weeks of Alan’s visit. Patricia’s research interests centre on Early Modern culture and literature, and she will lead a trans-Tasman workshop on Early Modern digital humanities during her stay. We’re also delighted to have two Australian visitors who will be contributing to our conversations during this period: Assoc. Professor Tim Sherratt (University of Canberra, Trove), and  Professor Paul Arthur (University of Western Sydney). Dr. Sydney Shep, Reader in Book History at Wai-te-Ata Press, Victoria University of Wellington, will participate in our discussion on cyberinfrastructure on November 12th. Details of these talks are listed in the schedule below, and we’ll be posting more about our visitors soon.

Background on Alan Liu

from http://liu.english.ucsb.edu/

Alan is a Professor in the English Department at the University of California, Santa Barbara, and an affiliated faculty member of UCSB’s Media Arts & Technology graduate program. Previously, he was on the faculty of Yale University’s English Department and British Studies Program.

events-liuHe began his research in the field of British romantic literature and art. His first book, Wordsworth: The Sense of History (Stanford Univ. Press, 1989), explored the relation between the imaginative experiences of literature and history. In a series of theoretical essays in the 1990s, he explored cultural criticism, the “new historicism,” and postmodernism in contemporary literary studies. In 1994, when he started his Voice of the Shuttle web site for humanities research, he began to study information culture as a way to close the circuit between the literary or historical imagination and the technological imagination.  In 2004, he published The Laws of Cool: Knowledge Work and the Culture of Information (University of Chicago Press). He also published his Local Transcendence: Essays on Postmodern Historicism and the Database (University of Chicago Press) in 2008.

Everyone is welcome to attend our series of seminars and discussions, which will take place at the University of Canterbury, the University of Otago, and Victoria University of Wellington. Come prepared to extend both your own thinking, and ours!

See below for details of the upcoming events. Please note, time and location for some events are yet to be confirmed.

Date / Room Title Description Location
Wed. 21st October, 1-2pm

Undercroft 101

A manifesto for tactical DH research infrastructure A seminar by Assoc. Prof. Tim Sherratt, U. Canberra / Trove. University of Canterbury, Christchurch.
Wed. 28th October, 4-5.30

Undercroft 101

Key Trends in DH & their challenge to the idea of the Humanities A public lecture by Prof. Alan Liu, UC Santa Barbara. University of Canterbury, Christchurch.
Wed. 28th October, 1-3pm

Seminar Room, Ground Floor, Science Library

Digital Interventions A seminar by Assoc. Prof. Tim Sherratt, University of Canberra / Trove. University of Otago, Dunedin.
Thurs. 5th November, 3-5pm

Undercroft 101

The Future of the Humanities A workshop led by Prof. Alan Liu, UC Santa Barbara. University of Canterbury, Christchurch.
Thurs. 12th November, 1-5 pm

James Hight 210

Alan Liu, ‘Against the Cultural Singularity’, James Smithies, ‘Towards a Systems Analysis of the Humanities’, Paul Arthur ‘Smart Infrastructures for Cultural and Social Research’ followed by workshop The Frontiers of DH: Humanities Systems Infrastructure: Alan Liu, Paul Arthur, James Smithies followed by workshop discussion. University of Canterbury, Christchurch.

 

Fri. 13th November, 10am-12pm

Popper 413

Open meeting Follow-up from Humanities Systems Infrastructure workshop University of Canterbury, Christchurch.
Wed. 18th November

Undercroft 101

Early Modern DH: A Trans-tasman Conversation A workshop led by Prof. Patricia Fumerton, UC Santa Barbara. University of Canterbury, Christchurch.
Thurs. 26th November

Time & Place TBC

Broadside Ballads and Tactical Publics: ‘The Lady and the Blackamoor,’ 1570-1789 A public lecture by Prof. Patricia Fumerton, UC Santa Barbara. University of Otago, Dunedin.
Fri. 27th November, 2-3 pm.

Place TBC

Literature+ A conversation about Alan Liu’s Literature+ course. University of Otago, Dunedin.
Fri. 27th November, 5.15-6.15 pm.

Place TBC

What Everyone Says – 4Humanities A public lecture by Prof. Alan Liu, UC Santa Barbara. University of Otago, Dunedin.
Tues. 1st December, 1-2:30 pm

Stout Centre, Kelburn Campus

Key Trends in DH & their challenge to the idea of the Humanities A public lecture by Prof. Alan Liu, UC Santa Barbara. University of Victoria at Wellington
Tues. 1st December, 3-4:30 pm

Stout Centre, Kelburn Campus

Samuel Pepys and “Greensleeves”: A DH Perspective A public lecture by Prof. Patricia Fumerton, UC Santa Barbara. University of Victoria at Wellington

 




2015 Kiwi Pycon

A few weeks ago, CEISMIC Digital Content Analyst Lucy-Jane Walsh attended the first day of the Kiwi PyCon Conference. This year the conference was held at the University of Canterbury with Catalyst IT as a Platinum Sponsor. Lucy-Jane discusses her experiences below:

Being a little late to the game, I was only able to attend the first day of Kiwi PyCon, a day mostly consisting of sprints and tutorials, with the usual format of talks left to the Saturday and Sunday. This suited me well – as a bit of a Python fanatic, I was itching to sit down and write some code, to learn new tricks, and perfect my old ones.

To put things in context, I learnt to code with Python, transferring from Javascript after several muddled attempts. After Javascript, Python seemed like a dream: no clumps of brackets and semi-colons, no need to define the conditions of a loop. What I like about Python is that it emphasizes code readability – indentation is used instead of curly brackets, and English words instead of punctuation. As summarized by the principals laid out in PEP (The Zen of Python): ‘beautiful is better than ugly’ and ‘simple is better than complex’.

My favourite tutorial was with Yuriy Ackermann, system administrator at Mount Maunganui College and JS Game developer at SLSNZ. Ackermann taught us how to scrape the web using Python, leading us through a script he had written to gather information about games on the digital game store, Steam. He broke the problem into three key steps – connecting, parsing, and parallelising – explaining the reasons each step were necessary and the libraries and tools he used to do them. I have summarised each steps below:

Connect

Ackermann used the urllib library to handle urls in Python. Using url.request (in Python3), he showed us how to open a url and decode and read the contents. He also showed us a cool trick for convincing google that you are not a robot. This is necessary for sites like google who reject requests made from outside a browser (encouraging developers to use their API instead). One way to get around this is to place a ‘user-agent’ in the header of the request which reflects browser behaviour. The value for the User-Agent can be found in the develop tools in your browser when you load a url (under the network tab):

2015-09-10 11_57_01-monty python - Google Search

Parse

Once the html content has been retrieved, the next step is to parse it. This means finding the parts of a string (in this case a string of html) that we are interested in and organising them into a useful structure. Ackermann used BeautifulSoup4 for this step of the scraping – a Python library built for pulling data out of HTML and XML pages. In particular, the .find() and .find_all() methods are incredible useful, the first allowing you to retrieve the first instance of a tag, and the second retrieving every instance of a tag and storing it in a list.

Ackermann used both of these methods to create a function for parsing urls from Stream. This function takes a string, such as the html from the url of one of stream’s games, and finds the name, price, currency, tags, and rating for that game. He also added some error exception to deal with 404s, timeouts, and pages not have price, tags, and names, and to clean up the data.

Parallelising

Once we had a script that could parse data for one of Steam games, it was time to run it across all of the games. The simplest way of achieving this would be to write a for-loop, but this would require a lot of requests (around 100,000) and a lot of time (7 hours at 250ms per request). On top of this, most websites check logs and will ban IPs that make too many requests. Ackermann’s solution was to move to a parallel process.

This part was somewhat harder for me to understand, having never tried parallel computing myself, and unfortunately we ran out of time. Basically Ackermann set up a server and created a bunch of online virtual machines (VMs). He got the server to send unique urls from Steam to the VMs and set them to retrieving and parsing the information. The VMs would then send it back to his server through a post request. This allowed him to run 100s of requests at once, cutting the time from hours to minutes.

For a step by step guide to this tutorial, check out Ackerman’s slides.

A huge thanks to Catalyst for sponsoring this year’s Kiwi PyCon. I really enjoyed the tutorials and meeting all the other python fans and developers. I hope next year I can attend again and get to hear the talks this time.