Archives for admin

Setting up my new MacBook

We are going to move to a new building, which means we are leaving the beautiful Bushuis/Oostindisch Huis in the Center of Amsterdam. Once we arrive there, probably in September (although there are some protests), we will all have to work on so-called flexplekken, meaning that we won’t have an own office any more. That’s why all of us got a laptop. I chose the MacBook Air: For my own research, I would probably be best off with a Linux machine, but for teaching and for collaboration with others, I need some programs (like SPSS or Office) that wouldn’t run (well) on Linux. And you never know if the IT department again implements a new VPN or something that is not compatible. So for me, MacOS was the best compromise between a “mainstream” computer and being able to run some UNIX-like software.

While teaching courses like Big Data and Automated Content Analysis, I realized that I often assume that some software just is installed on everyone’s computer, which of course is not true (Last week again, I realized that normal people don’t have a c-compiler an thus cannot install everything from source…). So I decided that this time, I’ll take notes and write down which programs I installed to turn my brand new computer into something I can work with. Of course, it is sometimes highly subjective which programs one prefers, but maybe this lists hints you to something you can use. And otherwise, I’ll just use it for looking things up next time I have to set up a laptop ;-).

Installing everything on my new MacBook

That’s how my desk looks like…

But now, in the order in which I installed everything.

  • XCode
    The developer tools by Apple. I installed them via the App Store. I don’t really use them directly, but I install a lot of packages from sources, so I need things like a C compiler and the like. This means that you also need the XCode command-line tools. They can be installed by typing sudo xcode-select –install in the Terminal. Don’t forget to sign the license, otherwise you won’t be able to use the tools. You can do so with sudo xcodebuild -license.
    Even if you think you don’t need this, as you are not a programmer, you might be wrong. Some really useful programs I’ll describe below can be installed with not too much effort, but might require a C compiler for installation – one of the ingredients of XCode.This is also why it is the first thing I installed.
  • Dropbox
    I use intensively to sync my data and to share data with colleagues.
  • Some useful Python-packages
    I use Python in teaching and research. MacOS comes with Python 2.7 pre-installed, but I need some additional packages. I installed pip first, a very useful tool to install additional packages. If they are from source, you might need XCode (see above) as well. On my old MacBook with MacOS 10.6, I had gcc instead (which I installed from a pre-compiled package), that worked fine as well. I install pip and the packages by typing the following commands in the Terminal:
    sudo easy_install pip
    sudo pip install nltk
    sudo pip install pattern
    sudo pip install twitter
    NLTK and pattern are packages vor natural language processing, twitter allows to access the Twitter API.
    Later, I installed two packages for parsing XML and HTML-files:
    sudo pip install BeautifulSoup4
    That one went well, but
    sudo pip install lxml
    did not. I tried a lot of things, but finally found out the reason: MacOS 10.9 changed the compiler settings in a way that instead of a warning for unknown parameters, you get a hard error. The workaround to install lxml (which is great for parsing, e.g., reviews from consumer sites and the like, something my students like to do):
    sudo bash
    export ARCHFLAGS=”-Wno-error=unused-command-line-argument-hard-error-in-future”
    pip install lxml
  • R and RStudio
    For teaching, I am kind of forced to use SPSS as statistics program, and for some research projects, I use STATA, but I want I try to do more and more with R and RStudio (for idealistic reasons [because it’s free, and scientific software should be free], but also because you can to some cool stuff with it).
  • TexShop & TexLive
    I sometimes use LaTeX to make slides. What I like about it is that it takes me less times than messing around with Powerpoint. And especially for some of my courses, it is really useful that I can use things like line numbering to display source code (using the lstlisting environment). TexShop is pretty OK for making them. (But nevertheless, I use Apple Keynote or Microsoft Powerpoint as well). I actually don’t use LaTeX it for writing articles, as in my field, many journals and virtually all collaborators work with Microsoft Office.
  • Gimp
    My choice for manipulating images is gimp. It offers many of the function that all-mighty Adobe Photoshop offers. It might be a bit less intuitive and some things are missing, but for most tasks it’s just fine. And, of course, it is open source and free.
  • Skype
    Can you imagine working today without Skype? I actually cannot recall when I called an international collaborator via the Phone the last time, but I do so regularly on Skype. Even my parents  only call me on Skype.
  • Microsoft Office
    Definitely not my favorite program and some things drive me crazy (like the fact that Excel for Mac completely messes up UTF-8 encoded csv-files), but I’m kind of forced to use it, as everyone is using it, so I installed from a UvA software repository.
  • Acrobat Pro
    Also from the UvA repository. As I work a lot with PDF files, it’s pretty cool to have the Pro version.
  • Symantec Endpoint protection
    From the UvA repository. Alerted me already several times about viruses on students’ pen drives.
  • Cyberduck
    I have to connect to a lot of different services using protocols like FTP, Webdav, SSH, … – for example to get access to data on a virtual sever I am running for data collection purposes. Cyberduck is a good client.
  • Firefox
    Nobody wants to have Safari as only browser, right?
  • wget
    The tool for downloading stuff, mirroring whole website and the like. MacOS comes with curl, which is kind of similar, but as I use wget on Linux servers as well, I wanted it on my laptop, too. And my students use it as well. Luckily, I already installed XCode (see above), so I can easily install wget from source (explanation here).
  • Java 6
    You might wonder why this is necessary. The thing is that it was shipped with earlier versions of MacOS, but it’s not any more – however, Gephi (see next point) doesn’t run without it. You get Java 6 for MacOS directly from Apple.
  • Gephi
    OK, this one is complicated (if you are not aware of the instructions below – and if you haven’t instaled Java yet). Gephi is kind of the upcoming star among network visualization tools, and I use it both in research and in teaching. This is how you install it:
    1. Download it and run it one time. Close it again.
    2. Move the App from the image to your program files folder. It won’t run anymore, you have to do the following steps once:
    3. Open the terminal and enter the following commands:
    cd /Users/damian/Library/Application\ Support/
    rm -r gephi
    (of course you replace damian by your name)
    You’re done. But if you additionally want Gephi to be able to use more memory than the 512 MB it gets by default, you can do the following:
    1. Right-click on the Gephi app and choose “Toon pakketinhoud” (probably something like “Show package content” in the English version).
    2. Within the package content, open Ressources/etc/gephi.conf in an editor.
    3. It somewhere says 512 (for the amount of memory allocated). Change it to a higher amount.
  • Mendeley
    I use Mendely for organizing my literature. There where some people who stopped using it after it was taken over by Elsevier, but for me, it still is the best solution, as it also allows me to read the PDF’s of the articles on my iPad.
  • Evernote
    Some people love Evernote for taking notes, I’m still not so sure, as I very often just put plain-text files with notes in my dropbox, which works fine. But I’m kind of using it, although not as systematically as I should to really make sense.
  • Teamviewer
    Teamviewer is not only great for logging on to your Desktop computer at the Office (which I, admittedly, will note have much longer) when you are sitting somewhere in the sun, but also great for helping parents with computer problems. Just work on another computer as if you were sitting in front of it.
  • git
    I’m still at the beginning, but I try to share more and more code on github, so I need git to upload stuff.
  • Scribus
    Like gimp is an open-source alternative to Photoshop, scribus is something you can use instead of InDesign. It is much less powerful, but I still great for making conference posters – or fake newspaper articles as stimulus material for experiments. Get it here.
  • The last (and, maybe, most important!) program: Spotify!
    Of course, you cannot work without music. I have a spotify-account for that.

That’s it!

Update: You might also want to have a look at the choices other people made.

“Following the News: Patterns of Online and Offline News Consumption” – PROJECT COMPLETED!

I’m very happy to announce that since today, all four articles that came out of my dissertation project are either published or accepted for publication. This means that I can finally close this research project. I enjoyed very much investigating how people use different news outlets in today’s media environment, but now it’s time for new challenging projects (which, in fact, I have already started with quite some time ago).
A PhD project is not finished on the day your PhD contract ends: Publication takes time, and the old project keeps chasing you: You have to wait, wait, revise the manuscript, wait, wait … You get the picture. So, while the project basically ended with me handing in my dissertation on 5 December 2012 (or maybe with my public defense on 4 June 2013), it still was not really finished. Now it is.

This is what came out of it:

Trilling D., & Schoenbach, K. (accepted for publication). Challenging selective exposure: Do online news users choose sites that match their interests and preferences? Digital Journalism.

Trilling, D., & Schoenbach, K. (accepted for publication). Investigating people’s news diets: How online news users use offline news. Communications: The European Journal of Communication Research.

Trilling, D., & Schoenbach, K. (2013). Patterns of news consumption in Austria: How fragmented are they? International Journal of Communication, 7, 929-953.

Trilling, D., & Schoenbach, K. (2013). Skipping current affairs: The non-users of online and offline news. European Journal of Communication, 28(1). 35-51. doi:10.1177/0267323112453671

Talk and short workshop at Coding Culture, Utrecht

Yesterday, I had the honor to give an invited talk at Coding Culture in Utrecht. Coding Culture is an initiative by graduate students from Utrecht University with a background in New Media and Digital Culture. They set up a group consisting of 15 graduate students who are eager to advance their skills by teaching themselves how to write computer programs. As people who know me will confirm, I really think this a skill that all social science students [and from related disciplines in the humanities, for that matter] should have, because it greatly advances our possibilities to understand the world – so I basically just had to accept the invitation to speak at their kickoff meeting. And it was great fun! I gave an introductory talk with some examples (slides here), and after that, we were playing around with the code.

Also I learned a bunch of things: About typical problems people unfamiliar with programs have, about the differences between academic disciplines, and about the pitfalls of certain not-to-be-named operating systems. Oh, and the English word for proefkonijn (guinea pig).

I promised the people from Utrecht to drop by again in some time to see what they made out of it. So keep up the good work, I’m looking forward to it!

Workshop on analyzing social media data with Python and Gephi

This week, I gave a one-and-a-half day workshop for faculty and PhD candidates at our department on how to analyze social media data, especially from Twitter and Facebook, using tools like the programming language Python, the network analysis tool Gephi, the data collection tools yourTwapperKeeper and netvizz. We talked about automated coding with regular expressions, using natural language processing toolkits for Python like nltk and pattern, about the possibility of running scripts on a virtual server in the cloud and much more. Much of it will come back in the Research Master course I’ll teach in April and May. I put four sets of slides on slideshare, here’s the first one:

And numer 2, 3, and 4.

New manual: Python for Communication Scientists

In preparation for two courses I’ll teach (a one-and-a-half day hands-on workshop for faculty and PhD candidates and a 8-week-4-hours-per-week methods course for Research Master students and PhD candidates), I drafted a manual called “Python for Communication Scientists: First Steps to Automated Content Analysis” (pdf). It is kind of a first draft, so I’m happy about all kind of feedback. Feel free to try it out!

Have a look at!

Some shameless (self-) promotion: On (in Dutch), started by my friend and colleague Marijn van Klingeren, we try to make social science accessible for everyone. Researchers tell in 500 words about their research – in normal and easy to understand language (well, the Dutch language, to avoid any misunderstandings). I joined the team and for the current versvak-issue on voter volatility, on which I wrote an editorial.