Joanne Paterson bio photo

Joanne Paterson

Librarian

Email Twitter LinkedIn Github ORCID

Study Leave Tempus fugit “Time flies like an arrow; fruit flies like a banana” Clock being wound Winding Clock Circa 1811 by alex.ragone is licensed under CC BY-NC-SA 2.0

I cannot believe that three weeks of my Study Leave have already a passed. Time flies

Currently, I am focusing on three projects in particular. I am working my way through as many of the Programming Historian chapters as I can, especially those that focus on data capture and transformation, as well as Chuck Severance’s Python for Everyone(Py4e), although some days it feels like, py4 everyone, but me! and I just finished the Wikidata Summer Institute https://wikiedu.org/wikidata/, and have a fresh understanding of what we can do to not only enhance wikidata, but use it to visualise data in interesting ways. With luck I will also get to some more dataviz, but as usual I overestimated how much I can actually get done in a day!

My goal has been to improve my data curation skills, from data capture through transformation to preservation, especially in the context of publication data and Humanities data. I hope to be able to more easily and readily capture data to populate the Institutional Repository. This in turn will help the University to tell stories of impact, to let others see the great research being undertaken here, and to attract interest in the University from scholars at all levels.

I am approaching these new skills with some trepidation, especially when faced with errors such as the following!

Traceback (most recent call last): File “/…/Desktop/Documents/PHPython/trial-content.py”, line 10, in print((obo.stripTags(HTML))) File “/Users//Desktop/Documents/PHPython/obo.py”, line 3, in stripTags startLoc = pageContents.find(“<p>”) TypeError: argument should be integer or bytes-like object, not ‘str’

Oddly enough, I was able to fix it!

Things I have learned

I am persistent.

These bumps in the road caused me to pause, read and re-read, find other places for help, fix the problem and move forward. I don’t let initial set backs get me down and I stick with it until I can find a solution, or get help to uncover a solution. Despite some hurdles, (i.e., new Mac, older instructions for earlier versions of software and hardware) I created a static website using Jekyll which is how I am able to post this blog. It is a super way to begin to understand using Github, learn a bit about Markdown code and create your own website using open source platforms.

When you come to a fork in the road, take it! –(attr. to Yogi Berra)

As well, I was merrily working away at these:

Programming Historian modules:

Installing Python Modules with pip FRED GIBBS There are many ways to install external python libraries; this tutorial explains one of the most common methods using pip.

Code Reuse and Modularity in Python WILLIAM J. TURKEL AND ADAM CRYMBLE Computer programs can become long, unwieldy and confusing without special mechanisms for managing complexity. This lesson will show you how to reuse parts of your code by writing functions and break your programs into modules, in order to keep everything concise and easier to debug. From HTML to List of Words (part 1)

when BAM! Things came to a shuddering halt I ran into an issue with the version of MacOS I was running, Because I chose to use Atom as text editor, rather than Komodo as recommended in the PH set-up, I ran into a spot of bother. My lovely new Mac includes and runs Python 2.7 and I had downloaded and installed the most up-to-date version of Python is 3.8. therein lay the difficulty. When running the python code, defaulted to the older version I then installed an Atom package to run Python. Still was getting an error message. After writing to the folks at PH, we were able to sort it out. Well when I say we, I mean they :) I gave them intel and they found a solution which entailed me changing some of the settings in the Atom python packet. An explanation “Atom running Python2 not Python3” problem can be found at this URL here - https://stackoverflow.com/a/49955089

Fixed! Last login: Mon Jun 15 15:51:09 on ttys001 s-iMac ~ % …/.atom/packages/atom-python-run/lib/../cp/main.py –pause – python3 /Users/jo/Desktop/Documents/PHPython/trial-content.py

Which leads to second thing learned: there are a lot of helpful, amazing people out there! The Programming Historian folks were quick to respond to give feedback and to investigate my query. And they were so kind!

I must also note that I conferred with one of my librarian colleagues when I got stuck on a thorny (to me) Python problem. Matt was also very kind and spent some time talking through the Python task with me and even shared a new to me tool to check code! : https://www.onlinegdb.com/Sk94lC1aL

I have been really enjoying this experience, frustrating though it is at times! I look forward to applying my fledgling skills and put them to practical use, and to share with others what I have learned!

Study Leave was published on June 17, 2020 and last modified on Jun