Tag Archives: science workflow

A call for help: (open) science tools

As I announced in my first blog post: I am working on creating a list of all kinds of science services on the web, in the hopes of creating a low-threshold open science workflow. I try to stay on top of all kinds of tools, but I find new ones each day—creating the feeling that I am not as encompassing as I would like to be.

To improve this, I would like to request the (scientific) community to help and check out the spreadsheet in which I show all the services I have found thus far. You can find it here, and it can be freely edited. If you think you have a service that should be on the list, please put it on there. If you are not sure, put it on there and I will see its applicability. Better to have too many input than too little at the moment. If its initial use for research is unclear, please put something in the notes so I know how it might be a valuable tool, even though it is initially not aimed towards research (e.g. Github). Feel free to contact me on twitter (@chartgerink) if you have any questions.

Please note that, if signed in to your Google account, your name will appear on the revision history. If you prefer this not to happen, please log out of your Google account or open a private session in your browser (often Ctrl+Shift+N).

Merging Mendeley and Zotero bib files (Windows)

UPDATE: @mrgunn informed me of a native function in Mendeley to merge the libraries, making the steps below redundant. The setup is trivial: in Mendely, go to Tools–>Options–>Zotero/CiteUlike tab. Open the SQL database from Zotero and it will automatically import the data (including attached PDFs). If you do not know where to find your Zotero library, go to (within Zotero standalone) to Tools–>Options–>Advanced–>Files and Folders–>Show data directory.

The original post can be found below.


I recently started using Zotero next to Mendeley for my reference management, but I was sort of agitated about maintaining two libraries in two different programs. I like Zotero’s quicksave too much and Mendeley’s auto import too much to give up either one, so I decided to figure out how to make it easy for me to cite from both libraries when writing up papers in LaTeX. Below I will outline how to make one full library file on a semi-automatic basis (i.e. requires only one key press to update your library).

Step 1—Set Mendeley and Zotero to automatically sync your references into a BibTeX file
Mendeley has a default option to sync the library into a BibTeX file. This option can be found under the menu option Tools–>Options–>BibTeX. I recommend syncing your entire library into one file and not per collection, otherwise you will have to update the script (explained in step 2) everytime you create a new collection.
For Zotero, an add-on needs to be installed, which can be found here. This is a Zotero to BibTeX plugin developed by Robin Wilson. Installing it is easy (just follow the steps on his website) and it will allow you to sync your Zotero library into the folder of your choosing. I recommend syncing it into the same folder as the Mendeley file.

Step 2—Make a script for merging the .bib files
This step sounds much more difficult than it is. We need only two lines of code to make the script run. The first line changes the working directory (you will need to fit this to the folder you sync the Mendeley- and Zotero .bib files to) and the second creates the merged .bib file. All you need to do is open notepad and type in:

cd C:\Users\Chris Hartgerink\Dropbox\Bibs\
copy library.bib+Zotero.bib fulllib.bib

Note that you will have to check whether the path file and file names correspond to your personal settings. You subsequently save this file as merge.bat (or any other filename, but with extension .bat), and run it to merge your libraries.

Step 3—Use AutoHotKey to create a keyboard shortcut for running the script
This step is optional, but highly recommended. AutoHotKey is a program where you can write map keyboard shortcuts to virtually any action you want. Installing AutoHotKey is a breeze, and the only thing you need to do is create a .ahk file that contains your key mappings. I personally keep one file where I maintain ‘all’ the code (use only 30 lines) and automatically run this at startup (see here for a how-to). I mapped the script to the control + F7 key, resulting in the ‘code':


The ! stands for the control key (^ stands for alt, see here for an introductory tutorial). Everytime I use this keyboard shortcut the merge script runs and updates my library BibTeX file.

My apologies for the Mac and Linux users who I leave in the dark with this tutorial.


R: Quickly installing and opening multiple packages

Often when doing analyses in R you need to install and load many packages, and it can be tedious to type \texttt{install.packages()} and \texttt{library()} a thousand times. The code below illustrates an efficient way of installing and opening up many packages instantly. You only need to change vector x and possibly comment out the second line of code if you have already installed the packages. Efficiency for installing packages could be improved by not reinstalling packages, but I have not checked into this yet.

#Insert packages you want to install and open in vector x

Introduction to Chris H.J. Hartgerink’s Open Science Notebook

My name is Chris H.J. Hartgerink, from the Netherlands. I am currently in a Research Master in Methodology and Statistics program at Tilburg University and have a background in Social Psychological research. I am currently inspecting possible PhD topics.

My current work focuses on indexing academic tools available to make open science easier and writing a (short) piece on one possible workflow for researchers, which I am currently developing myself. My main motivation for this project is to help researchers who are interested in open science, but are mindboggled by the amount of tools available and do not know how to integrate these into their workflow. This leads to the possibility of foregoing open science partially or entirely, due to lack of time and/or motivation to look into this. Lowering this threshold might provide researchers with a proper starting point, on which they can build their own workflow if needed. Any work on this will be Version Controlled on github (see here)

Any feedback on posts is greatly appreciated, even if it just a typo :-)

My other academic profiles that might be a valuable addition to this notebook in due time (sparseness of the profiles is due to the fact that I am only starting in research just now):
Open Science Framework