<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>bocklund.io</title><link href="https://bocklund.io/" rel="alternate"></link><link href="https://bocklund.io/feeds/all.atom.xml" rel="self"></link><id>https://bocklund.io/</id><updated>2018-07-29T00:00:00-04:00</updated><entry><title>Why Jupyter Notebooks Won't Replace Academic Papers</title><link href="https://bocklund.io/jupyter-notebooks-papers.html" rel="alternate"></link><published>2018-07-29T00:00:00-04:00</published><updated>2018-07-29T00:00:00-04:00</updated><author><name>Brandon Bocklund</name></author><id>tag:bocklund.io,2018-07-29:/jupyter-notebooks-papers.html</id><summary type="html">&lt;p&gt;Recently there has been some buzz around Jupyter Notebooks in science, especially in light of the LIGO team sharing their &lt;a href="https://losc.ligo.org/tutorials/"&gt;detection and analysis of gravitational waves&lt;/a&gt; in Jupyter Notebooks. Others have claimed that Jupyter Notebooks will &lt;a href="https://www.theatlantic.com/science/archive/2018/04/the-scientific-paper-is-obsolete/556676/"&gt;render traditional academic journal articles obsolete&lt;/a&gt;. The notebook or literate programming format improves on …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Recently there has been some buzz around Jupyter Notebooks in science, especially in light of the LIGO team sharing their &lt;a href="https://losc.ligo.org/tutorials/"&gt;detection and analysis of gravitational waves&lt;/a&gt; in Jupyter Notebooks. Others have claimed that Jupyter Notebooks will &lt;a href="https://www.theatlantic.com/science/archive/2018/04/the-scientific-paper-is-obsolete/556676/"&gt;render traditional academic journal articles obsolete&lt;/a&gt;. The notebook or literate programming format improves on the reproducibility and disseminating of scientific work, however several key factors limit the notebook as a way to communicate science. In the article, I'll touch on these issues and explain why I believe that the current model of sharing computational science is here to stay.&lt;/p&gt;
&lt;p&gt;Note: throughout this article I might refer to Jupyter Notebooks as notebooks, or the method as literate programming. I'm talking about the same thing, despite the second two terms being more generic.&lt;/p&gt;
&lt;h2&gt;Why Jupyter Notebooks Are So Promising&lt;/h2&gt;
&lt;p&gt;There are completely valid reasons to want to improve on the current publishing situation and Jupyter Notebooks are capable or have solved some of these problems.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Notebooks are open. Under the hood, notebooks are plain text formatted as JSON. They can technically be run or rendered by anyone who can reproduce an appropriate environment. There's no vendor lock-in. JOSS, the &lt;a href="http://joss.theoj.org"&gt;Journal of Open Source Software&lt;/a&gt; is a completely open publisher for scientific software that could support dissemination by Jupyter Notebook.&lt;/li&gt;
&lt;li&gt;Arfon Smith, Editor-In-Chief of JOSS said on &lt;a href="https://talkpython.fm/episodes/show/157/the-journal-of-open-source-software"&gt;Talk Python to Me #157&lt;/a&gt; shared a common sentiment that journal articles can sometimes be more like advertisements for the research. As a consumer of knowledge and software tools, literate programming allows me to not only run and reproduce the scientific result, but to use software as an application. Reproducibility is such a well known issue and for results generated by computer programs, there's no excuse to not share the exact recipe to reproduce a result.&lt;/li&gt;
&lt;li&gt;As a producer of knowledge and tools, I can provide a resource so people can use (and cite!) my work. I can use feedback and create a community around tools and techniques to make them better.&lt;/li&gt;
&lt;li&gt;Notebooks can provide more features to papers, such as interactivity with visualizations or datasets, sorting tables, or extracting data.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Why Notebooks Won't Take Over Yet&lt;/h2&gt;
&lt;p&gt;I want to avoid any discussion of compatibility, trendiness, environment or  the technical choices of Python/Markdown, institutional publication models, and so on. These have been covered &lt;a href="https://www.oliversherouse.com/2018/04/17/notebooks_arent_papers.html"&gt;elsewhere&lt;/a&gt;. Some of these are valid arguments and others are part of the inertia that fights change. I think there are more fundamental problems with the literate programming as science model than these issues. If anything, the scientific community has proven its willingness to hang its hat on what some might consider to be legacy software: new FORTRAN code is still be written today.&lt;/p&gt;
&lt;h3&gt;Technical Issues&lt;/h3&gt;
&lt;p&gt;The main issue is that there's no balance to hide complexity or abstraction. Scientific methods can be complex and to "stand on the shoulders of giants" implies that we build knowledge and tools on top of each other into more and more advanced approaches. The notebook format is limiting for this. Scientific software should be packaged and not flattened into a notebook script. See most of the &lt;a href="http://joss.theoj.org/papers/accepted"&gt;JOSS papers&lt;/a&gt; for examples of good software. Many of these projects contain notebooks to show how to run or use the software, but few of them have the software in the notebook, even though that's the key part we're supposed to be sharing.&lt;/p&gt;
&lt;p&gt;There are many best practices lists for writing scientific software. The &lt;a href="https://nsls-ii.github.io/scientific-python-cookiecutter/guiding-design-principles.html"&gt;Scientific Cookiecutter project&lt;/a&gt; and the &lt;a href="http://drivendata.github.io/cookiecutter-data-science/#opinions"&gt;Data Science Cookiecutter project&lt;/a&gt; both give good ones. Some highlights are keeping I/O separate, writing for readability, functional programming approaches, and managing data separate from code. All of these conflict with the notebook model, which promises convenience of putting everything in one place. It's hard to write flexible, sustainable software in a notebook which encourages lumping everything together in what boils down to a script with inline outputs.&lt;/p&gt;
&lt;p&gt;In addition, notebooks are challenging to maintain and iterate on. If I want to test a different idea, then I am copying cells, changing things and running them over and over. To share the notebook, I have to restart the kernel several times and make cleanup passes to make sure that everything is consistent. A scientist who comes along later might want to integrate their changes with my own, but they are suddenly stuck because everything has changed in my test and cleanup loop. This is a problem if we are expecting collaborators and derivative works to improve on the approach a publish the results, especially because usage and citations are key metrics for many academics.&lt;/p&gt;
&lt;p&gt;A lot of software uses data. If not to gain insight, then at least as a comparison to validate a model or approach. How should this data be controlled? Where should the schema be described and validated? How can users supply their own data or extend the format schema?&lt;/p&gt;
&lt;h3&gt;Cultural Issues&lt;/h3&gt;
&lt;p&gt;Adam Rule discussed his work on seeing how Jupyter Notebooks are actually on &lt;a href="https://talkpython.fm/episodes/show/171/1m-jupyter-notebooks-analyzed"&gt;Talk Python to Me #171&lt;/a&gt;. They analyzed a dataset of over 1 million notebooks and found several interesting conclusions that are discussed in their &lt;a href="http://adamrule.com/files/papers/chi_2018_computational_notebooks_final_web.pdf"&gt;paper&lt;/a&gt; and on the podcast.&lt;/p&gt;
&lt;p&gt;They found that people often used the notebooks for exploration and iteration, leaving behind messy notebooks without an overarching narrative. There's also no real guidelines or ideas of what the best practices are. What should a publication quality notebook look like? Once we have exposed all of the underlying steps in the notebook (distraction aside, see above), how do we strike a balance between letting data and methods speak for themselves and clarifying what part of a work is new knowledge? Academics with PhDs have arguably at least 10 years of training in writing more scientifically. As pointed out by Rule *et al.#, there's hardly formal training to use a Jupyter Notebook to the same standard of training to use a lab notebook.&lt;/p&gt;
&lt;p&gt;There's also cultural inertia to what is considered scientific contribution. Rule mentioned in the podcast and the paper that PIs and group members alike see notebooks as half-baked, preferring slide decks and results over code. Much of scientific community largely seems to agree that the currency for sharing ideas in talks and at conferences is a polished slide deck. Even among the community at JOSS, I have seen that reviewers are much more critical of the software design and utility, even to go so far as requesting new features before recommending work for acceptance. Detailed vetting can lead to better reproducibility than the current status quo, but clearly a balance should be struck. Time will tell how efforts like JOSS or growing conferences like SciPy (see my favorite talks from &lt;a href="https://bocklund.io/scipy-2017-talks.html"&gt;2017&lt;/a&gt; and &lt;a href="https://bocklund.io/scipy-2018-talks.html"&gt;2018&lt;/a&gt;) will shape the scientific community's view on software contributions, citations, and meaningful work.&lt;/p&gt;
&lt;p&gt;In my experience, some people just don't like working in the open. Academia is competitive in jobs and funding. Not everyone wants to share. People seem to be getting better at publishing their software or data at the same time as their paper, but I have gotten pushback when suggesting that software and data be open from the start as we are doing with &lt;a href="https://pycalphad.org"&gt;pycalphad&lt;/a&gt; and &lt;a href="https://espei.org"&gt;ESPEI&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Notebooks are a promising paradigm to share computational science, however there are some large and small roadblocks to overcome before they can be considered a replacement for current academic papers.&lt;/p&gt;
&lt;p&gt;I want to mention that Jupyter Notebooks are a key part of my own daily workflow as a PhD student working in a computational science and as a maintainer of Python packages. Sketching ideas in a notebook that I can factor into a package is a huge productivity boost for me. I fully endorse the use of literate programming tools for doing science, but I don't think they are the right medium for sharing knowledge.&lt;/p&gt;
&lt;p&gt;I am in complete support of the Jupyter team and highly suggest using Jupyter Lab, which has been &lt;a href="https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906"&gt;ready for daily use&lt;/a&gt; since February 2018.&lt;/p&gt;</content><category term="academia"></category><category term="science"></category><category term="python"></category><category term="jupyter"></category></entry><entry><title>SciPy 2018 Talk Highlights</title><link href="https://bocklund.io/scipy-2018-talks.html" rel="alternate"></link><published>2018-07-29T00:00:00-04:00</published><updated>2018-07-29T00:00:00-04:00</updated><author><name>Brandon Bocklund</name></author><id>tag:bocklund.io,2018-07-29:/scipy-2018-talks.html</id><summary type="html">&lt;p&gt;Last year I gave a list of my favorite &lt;a href="https://bocklund.io/scipy-2017-talks.html"&gt;SciPy 2017 talks&lt;/a&gt;.
The SciPy 2018 conference took place from July 9 to 15 and the talks and tutorials are now in a &lt;a href="https://www.youtube.com/playlist?list=PLYx7XA2nY5Gd-tNhm79CNMe_qvi35PgUR"&gt;YouTube playlist&lt;/a&gt; created by Enthought.
I have gone through all of this years talks and watched through any …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Last year I gave a list of my favorite &lt;a href="https://bocklund.io/scipy-2017-talks.html"&gt;SciPy 2017 talks&lt;/a&gt;.
The SciPy 2018 conference took place from July 9 to 15 and the talks and tutorials are now in a &lt;a href="https://www.youtube.com/playlist?list=PLYx7XA2nY5Gd-tNhm79CNMe_qvi35PgUR"&gt;YouTube playlist&lt;/a&gt; created by Enthought.
I have gone through all of this years talks and watched through any that seemed interesting.
Read on for my suggestions!&lt;/p&gt;
&lt;p&gt;Overall, it felt like there were a lot of machine learning and geoscience/geo-related talks and packages. A lot of the ML talks seemed to be missing practical insight into applying a specific method or seeing how someone solved a problem in a way that generalizes to other problems. The geoscience ones weren't very interesting to me, but might be worth checking out if you're interested.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/gMW9ubTvUwQ"&gt;Keynote: Democratizing Data - Tracy Teal&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;iframe align="center" width="560" height="315" src="https://www.youtube.com/embed/gMW9ubTvUwQ" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;Tracy's keynote gave a great perspective on how we see and value data in science. It was fascinating to me that she showed results from a survey of Bioinformatics Resource Australia that training and community building were more requested than funding! &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/RTyHP_PiX9M"&gt;Recipe2Vec: How word2vec Helped us Discover Related Tasty Recipes - Meghan Heintz&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;iframe align="center" width="560" height="315" src="https://www.youtube.com/embed/RTyHP_PiX9M" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
&lt;p&gt;Your user knows they want a healthyish but tasty pasta for dinner but aren't quite sure exactly which recipe to choose. How can you help narrow their search and show them closely related recipes to give them enough options without making their search exhausting? This talk will show you BuzzFeed/Tasty tech's solution to creating a consistent method for finding similar Tasty recipes using word2vec.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This talk gave an application of machine learning in industry and gave a great example of how ML was used to add value to a product.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/IzXxTeQhdO0"&gt;Data Visualization for Scientific Discovery - Zan Armstrong&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;iframe align="center" width="560" height="315" src="https://www.youtube.com/embed/IzXxTeQhdO0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
&lt;p&gt;Choosing the visual form for a visualization is a decision about what aspects of the data matter most. Highlight or ignore outliers? Look at values, differences, or changes? Compare to 0, median, or mean? &lt;/p&gt;
&lt;p&gt;In scientific analysis we risk missing discoveries by failing to notice important features of our data, yet we often use default parameters and charts without realizing what we might miss. &lt;/p&gt;
&lt;p&gt;I will demonstrate how to translate questions about your data into chart parameters. Using Python examples, I'll illustrate powerful techniques like using color intentionally and creating 'small multiples' of charts that vary visual form or data.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This talk had a lot of really great practical tips for producing good visualizations for yourself and for others.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SciPy Tools Plenary &lt;a href="https://youtu.be/R5Qya7apbu8"&gt;Session 1&lt;/a&gt;, &lt;a href="https://youtu.be/b_2oVFPG-tk"&gt;Session 2&lt;/a&gt;, and &lt;a href="https://youtu.be/qFiG-K1_e4Y"&gt;Session 3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;iframe align="center" width="560" height="315" src="https://www.youtube.com/embed/DPJAAhsjans" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
&lt;p&gt;Session 1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;iframe align="center" width="560" height="315" src="https://www.youtube.com/embed/b_2oVFPG-tk" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
&lt;p&gt;Session 2&lt;/p&gt;
&lt;/blockquote&gt;
&lt;iframe align="center" width="560" height="315" src="https://www.youtube.com/embed/qFiG-K1_e4Y" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
&lt;p&gt;Session 3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;These were a series of 5 minute lightning talks from core packages in the SciPy ecosystem. They are definitely worth a watch to get up to speed in all that's happening in the ecosystem.&lt;/p&gt;</content><category term="science"></category><category term="python"></category><category term="education"></category></entry><entry><title>Filling ILLiad forms</title><link href="https://bocklund.io/filling-illiad-forms.html" rel="alternate"></link><published>2017-08-20T00:00:00-04:00</published><updated>2017-08-20T00:00:00-04:00</updated><author><name>Brandon Bocklund</name></author><id>tag:bocklund.io,2017-08-20:/filling-illiad-forms.html</id><summary type="html">&lt;p&gt;You may have seen my other post on quickly &lt;a href="https://bocklund.io/getting-papers-remotely.html"&gt;getting papers remotely&lt;/a&gt; through your own library with JavaScript.
This method works well if your paper is easy to find and you just need to get around the paywall using the access your institution pays for.
Sometimes, especially with older papers …&lt;/p&gt;</summary><content type="html">&lt;p&gt;You may have seen my other post on quickly &lt;a href="https://bocklund.io/getting-papers-remotely.html"&gt;getting papers remotely&lt;/a&gt; through your own library with JavaScript.
This method works well if your paper is easy to find and you just need to get around the paywall using the access your institution pays for.
Sometimes, especially with older papers, you may be able to find a reference, but not a paper.
Libraries can offer great utilities to supporting finding original research articles, but they can sometimes be clunky and slow to use.
This post will give an example of using JavaScript to file requests on ILLiad, an article requesting service from &lt;a href="https://www.oclc.org/en/illiad.html"&gt;OCLC&lt;/a&gt; used at Penn State, from only a bibtex reference to the article.&lt;/p&gt;
&lt;h2&gt;Too long, didn't read&lt;/h2&gt;
&lt;p&gt;See my JavaScript &lt;a href="https://gist.github.com/bocklund/367935f1b9fa1883e83616326ab9f184"&gt;Gist&lt;/a&gt; with the code and/or bookmark this
&lt;a href="javascript:(function()%7B%2F*%20Submit%20requests%20to%20ILLiad%20by%20populating%20different%20fields%20from%20a%20bibtex%20reference*%2F%2F*%20We%20want%20to%20do%20some%20parsing%20of%20input%20bibtex%2C%20files%2C%20so%20we'll%20include%20the*%2F%2F*%20following%20JS%20code%20in%20our%20bookmarklet*%2F%2F*%20keys%20are%20the%20ILLiad%20field%20names%2C%20values%20are%20the%20bibtex%20entry%20keys*%2Fvar%20replacementDict%20%3D%20%7B'PhotoJournalTitle'%20%3A%20'JOURNAL'%2C'PhotoJournalTitle'%20%3A%20'JOURNAL'%2C'PhotoJournalVolume'%20%3A%20'VOLUME'%2C'PhotoJournalIssue'%20%3A%20'NUMBER'%2C'PhotoJournalMonth'%20%3A%20'MONTH'%2C'PhotoJournalYear'%20%3A%20'YEAR'%2C'PhotoJournalInclusivePages'%20%3A%20'PAGES'%2C'PhotoArticleAuthor'%20%3A%20'AUTHOR'%2C'PhotoArticleTitle'%20%3A%20'TITLE'%2C'ISSN'%3A%20'ISSN'%7D%3Bfunction%20loadScript(url%2C%20callback)%7B%2F*%20code%20for%20loading%20from%3A%20https%3A%2F%2Fstackoverflow.com%2Fquestions%2F950087%2Fhow-do-i-include-a-javascript-file-in-another-javascript-file*%2F%2F*%20url%20is%20the%20url%20to%20load*%2F%2F*%20callback%20is%20my%20custom%20code%20to%20run%20after%20loading*%2F%2F*%20Adding%20the%20script%20tag%20to%20the%20head%20as%20suggested%20before*%2Fvar%20head%20%3D%20document.getElementsByTagName('head')%5B0%5D%3Bvar%20script%20%3D%20document.createElement('script')%3Bscript.type%20%3D%20'text%2Fjavascript'%3Bscript.src%20%3D%20url%3B%2F*%20Then%20bind%20the%20event%20to%20the%20callback%20function.*%2F%2F*%20There%20are%20several%20events%20for%20cross%20browser%20compatibility.*%2Fscript.onreadystatechange%20%3D%20callback%3Bscript.onload%20%3D%20callback%3B%2F*%20Fire%20the%20loading*%2Fhead.appendChild(script)%3B%7Dvar%20replaceValues%20%3D%20function()%20%7B%2F*%20Here%2C%20do%20what%20ever%20you%20want*%2Fvar%20bibJSON%20%3D%20doParse(bibliographyText)%3Bfor%20(var%20key%20in%20bibJSON)%20%7B%2F*%20go%20through%20all%20of%20the%20replacement%20dict%20fields%20and%20populate%20the%20field*%2F%2F*%20of%20the%20form%20with%20they%20corresponding%20key%20from%20the%20bibtex*%2Fif%20(bibJSON.hasOwnProperty(key)%20%26%26%20key%20!%3D%20'%40comments')%20%7Bfor%20(var%20field%20in%20replacementDict)%20%7Bvar%20el%20%3D%20document.getElementById(field)%3Bel.value%20%3D%20bibJSON%5Bkey%5D%5BreplacementDict%5Bfield%5D%5D%3Bif%20(el.value%20%3D%3D%20'undefined')%20%7Bel.value%20%3D%20''%3B%7D%7D%7D%2F*%20finally%2C%20set%20the%20notes%20value%20to%20the%20input%20bibtex%2C%20for%20later%20reference*%2Fvar%20el%20%3D%20document.getElementById('Notes')%3Bel.value%20%3D%20bibliographyText%3B%7D%7D%3B%2F*%20get%20the%20input%20from%20the%20user*%2Fvar%20bibliographyText%20%3D%20window.prompt('Enter%20the%20bibliography%20(bibtex%20format)%20string'%2C%20'%40article%7B...%7D')%3B%2F*%20load%20the%20script%20and%20do%20the%20replacement*%2FloadScript(%22https%3A%2F%2Fcdn.rawgit.com%2Fmikolalysenko%2Fbibtex-parser%2F7feff8a3%2Fparse-bibtex.js%22%2C%20replaceValues)%7D)()"&gt;Fill ILLiad&lt;/a&gt;
link.
Run the script or bookmarklet on an ILLiad request page (possible &lt;a href="https://psu-illiad-oclc-org.ezaccess.libraries.psu.edu/illiad/upm/illiad.dll?Action=10&amp;amp;Form=22"&gt;PSU link&lt;/a&gt;) and fill the prompt with the BibTeX entry of the reference you'd like to fill.&lt;/p&gt;
&lt;h2&gt;Motivation&lt;/h2&gt;
&lt;p&gt;In thermodynamic modeling, it is desirable to have original references to experimental studies in order to properly interpret the results and prevent propagating mistakes.
For many alloy systems, especially binaries, many of the original articles were written between (roughly) 1900 and 1950.
Despite these being indispensable for modeling work, digital versions of the paper can be challenging to track down.&lt;/p&gt;
&lt;p&gt;ILLiad is an &lt;a href="https://www.oclc.org/en/illiad.html"&gt;InterLibrary Loan&lt;/a&gt; software service from OCLC offered by many institutions including &lt;a href="https://libraries.psu.edu/services/interlibrary-loan-services"&gt;Penn State&lt;/a&gt;, allows research articles (and book chapters) that are not accessible through the usual library resources.
A typical ILLiad request page is below.
The form serves its purpose well for requesting single papers, but is tedious for beginning literature searches for many articles that must be requested.
Even for well formatted references, it is tedious to copy and paste seven or more fields in to request just one paper.&lt;/p&gt;
&lt;p&gt;&lt;img alt="ILLiad request page" src="https://bocklund.io/images/illiad-request-page.png"&gt;&lt;/p&gt;
&lt;p&gt;It would naturally be ideal to try to automate this.
For serious automation of on the order of a hundred or more citations, it would be efficient to a script in Python to make submissions automatically.
Since I'm not sure what type of systems other institutions use, I thought it might be helpful to write something more general in JavaScript that could be adapted to any kind of webform.&lt;/p&gt;
&lt;h2&gt;Getting our bearings&lt;/h2&gt;
&lt;p&gt;We need three pieces to be able to fill the above form (or any like it) automatically:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A standard citation format that will easily fill the forms fields&lt;/li&gt;
&lt;li&gt;A way to convert the standard citation into a useful form in JavaScript&lt;/li&gt;
&lt;li&gt;A place to fill our nicely formatted data&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We'll stitch these together in a useful, portable bookmarklet, just like in my &lt;a href="https://bocklund.io/getting-papers-remotely.html"&gt;getting papers remotely&lt;/a&gt; post.&lt;/p&gt;
&lt;h2&gt;Reference format&lt;/h2&gt;
&lt;p&gt;More than any citation format, BibTeX files are the digital common denominator.
Any reference management software worth using should be able to read and export to BibTeX.
The fact that it can be stored and used as plain text makes it a natural choice to use for any digital reference management.&lt;/p&gt;
&lt;p&gt;We will use BibTeX as input to our JavaScript bookmarklet.
For Mendeley users, that will mean finding your reference, right-clicking and selecting &lt;code&gt;BibTeX entry&lt;/code&gt; from the &lt;code&gt;Copy As&lt;/code&gt; menu.
See the reference software you use for instructions.&lt;/p&gt;
&lt;p&gt;In our script, we'll just use a simple JavaScript prompt to prompt for user input.&lt;/p&gt;
&lt;h2&gt;Conversion&lt;/h2&gt;
&lt;p&gt;Another benefit of choosing an open format like BibTeX is that we should not have to worry about the syntax ourselves.
I choose to use &lt;a href="https://github.com/mikolalysenko/bibtex-parser"&gt;@mikolalysenko's&lt;/a&gt; parser and load it directly in the browser by using this accepted &lt;a href="https://stackoverflow.com/questions/950087/how-do-i-include-a-javascript-file-in-another-javascript-file"&gt;StackOverflow answer&lt;/a&gt; and &lt;a href="http://rawgit.com/"&gt;rawgit&lt;/a&gt;.
The &lt;a href="https://gist.github.com/bocklund/367935f1b9fa1883e83616326ab9f184#file-illiad-js-L16"&gt;loadScript function in the Gist&lt;/a&gt; is directly from that SO answer.&lt;/p&gt;
&lt;p&gt;This parser will convert BibTeX entries into a JSON where each top-level key is the BibTeX citation key and the values are all the BibTeX fields, such as &lt;code&gt;AUTHOR&lt;/code&gt;, &lt;code&gt;TITLE&lt;/code&gt;, etc.
We can assume that a user will only enter just one entry (and choose the last one if they enter more than one) just by using a simple loop through the keys and filling the form fields.
See the &lt;a href="https://gist.github.com/bocklund/367935f1b9fa1883e83616326ab9f184#file-illiad-js-L37"&gt;replaceValues function&lt;/a&gt; to see the looping in action.&lt;/p&gt;
&lt;p&gt;Though before we do this, we need to know where to fill these values.&lt;/p&gt;
&lt;h2&gt;Filling&lt;/h2&gt;
&lt;p&gt;Finally, we need targets to fill our data.
All modern browsers have build in development tools.
Here we've used Chrome to drill down through the elements and find the relevant &lt;code&gt;textarea&lt;/code&gt; fields.
You can see that the highlighted &lt;code&gt;textarea&lt;/code&gt; has the id &lt;code&gt;PhotoJournalTitle&lt;/code&gt;.
From the inspection tree on the right, it appears that the other fields follow a similar format, e.g. &lt;code&gt;PhotoJournalInclusivePages&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="ILLiad dev tools" src="https://bocklund.io/images/illiad-dev-tools.png"&gt;&lt;/p&gt;
&lt;p&gt;We can use JavaScript's &lt;code&gt;getElementById&lt;/code&gt; function to grab each of these elements and let us change the values.
For brevity and lack of creativity, I've hardcoded these in the &lt;a href="https://gist.github.com/bocklund/367935f1b9fa1883e83616326ab9f184#file-illiad-js-L5"&gt;Gist as the replacementDict&lt;/a&gt;.
The &lt;code&gt;replacementDict&lt;/code&gt; simply maps the name of the element id to the name of the key in the BibTeX JSON.
If you don't use the same ILLiad system, you can inspect the page and you should only need to update the &lt;code&gt;replacementDict&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Making it a bookmarklet&lt;/h2&gt;
&lt;p&gt;This example is only &lt;em&gt;slightly&lt;/em&gt; more complicated than the &lt;a href="https://bocklund.io/getting-papers-remotely.html"&gt;getting papers remotely&lt;/a&gt; because it's not obvious how to squeeze down the content of the Gist to one line.
Tools like &lt;a href="http://mrcoles.com/bookmarklet/"&gt;Peter Coles' bookmarklet creator&lt;/a&gt; take a JavaScript script and condense it down to oneline and put it in a function to give things the correct scope.
Though, notable this mangles the input with &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding"&gt;percent encodings&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;See it in action&lt;/h2&gt;
&lt;p&gt;The input:&lt;/p&gt;
&lt;p&gt;&lt;img alt="ILLiad input" src="https://bocklund.io/images/illiad-input.png"&gt;&lt;/p&gt;
&lt;p&gt;And the resulting filled form:&lt;/p&gt;
&lt;p&gt;&lt;img alt="ILLiad filled form" src="https://bocklund.io/images/illiad-filled.png"&gt;&lt;/p&gt;
&lt;p&gt;Note that the reference you entered is nicely put in the &lt;code&gt;Notes&lt;/code&gt; section, in case your reference manager tries to pull the wool over your eyes when you import your ancient PDF.&lt;/p&gt;
&lt;p&gt;Again, the link to the &lt;a href="https://gist.github.com/bocklund/367935f1b9fa1883e83616326ab9f184"&gt;Gist&lt;/a&gt; and the 
&lt;a href="javascript:(function()%7B%2F*%20Submit%20requests%20to%20ILLiad%20by%20populating%20different%20fields%20from%20a%20bibtex%20reference*%2F%2F*%20We%20want%20to%20do%20some%20parsing%20of%20input%20bibtex%2C%20files%2C%20so%20we'll%20include%20the*%2F%2F*%20following%20JS%20code%20in%20our%20bookmarklet*%2F%2F*%20keys%20are%20the%20ILLiad%20field%20names%2C%20values%20are%20the%20bibtex%20entry%20keys*%2Fvar%20replacementDict%20%3D%20%7B'PhotoJournalTitle'%20%3A%20'JOURNAL'%2C'PhotoJournalTitle'%20%3A%20'JOURNAL'%2C'PhotoJournalVolume'%20%3A%20'VOLUME'%2C'PhotoJournalIssue'%20%3A%20'NUMBER'%2C'PhotoJournalMonth'%20%3A%20'MONTH'%2C'PhotoJournalYear'%20%3A%20'YEAR'%2C'PhotoJournalInclusivePages'%20%3A%20'PAGES'%2C'PhotoArticleAuthor'%20%3A%20'AUTHOR'%2C'PhotoArticleTitle'%20%3A%20'TITLE'%2C'ISSN'%3A%20'ISSN'%7D%3Bfunction%20loadScript(url%2C%20callback)%7B%2F*%20code%20for%20loading%20from%3A%20https%3A%2F%2Fstackoverflow.com%2Fquestions%2F950087%2Fhow-do-i-include-a-javascript-file-in-another-javascript-file*%2F%2F*%20url%20is%20the%20url%20to%20load*%2F%2F*%20callback%20is%20my%20custom%20code%20to%20run%20after%20loading*%2F%2F*%20Adding%20the%20script%20tag%20to%20the%20head%20as%20suggested%20before*%2Fvar%20head%20%3D%20document.getElementsByTagName('head')%5B0%5D%3Bvar%20script%20%3D%20document.createElement('script')%3Bscript.type%20%3D%20'text%2Fjavascript'%3Bscript.src%20%3D%20url%3B%2F*%20Then%20bind%20the%20event%20to%20the%20callback%20function.*%2F%2F*%20There%20are%20several%20events%20for%20cross%20browser%20compatibility.*%2Fscript.onreadystatechange%20%3D%20callback%3Bscript.onload%20%3D%20callback%3B%2F*%20Fire%20the%20loading*%2Fhead.appendChild(script)%3B%7Dvar%20replaceValues%20%3D%20function()%20%7B%2F*%20Here%2C%20do%20what%20ever%20you%20want*%2Fvar%20bibJSON%20%3D%20doParse(bibliographyText)%3Bfor%20(var%20key%20in%20bibJSON)%20%7B%2F*%20go%20through%20all%20of%20the%20replacement%20dict%20fields%20and%20populate%20the%20field*%2F%2F*%20of%20the%20form%20with%20they%20corresponding%20key%20from%20the%20bibtex*%2Fif%20(bibJSON.hasOwnProperty(key)%20%26%26%20key%20!%3D%20'%40comments')%20%7Bfor%20(var%20field%20in%20replacementDict)%20%7Bvar%20el%20%3D%20document.getElementById(field)%3Bel.value%20%3D%20bibJSON%5Bkey%5D%5BreplacementDict%5Bfield%5D%5D%3Bif%20(el.value%20%3D%3D%20'undefined')%20%7Bel.value%20%3D%20''%3B%7D%7D%7D%2F*%20finally%2C%20set%20the%20notes%20value%20to%20the%20input%20bibtex%2C%20for%20later%20reference*%2Fvar%20el%20%3D%20document.getElementById('Notes')%3Bel.value%20%3D%20bibliographyText%3B%7D%7D%3B%2F*%20get%20the%20input%20from%20the%20user*%2Fvar%20bibliographyText%20%3D%20window.prompt('Enter%20the%20bibliography%20(bibtex%20format)%20string'%2C%20'%40article%7B...%7D')%3B%2F*%20load%20the%20script%20and%20do%20the%20replacement*%2FloadScript(%22https%3A%2F%2Fcdn.rawgit.com%2Fmikolalysenko%2Fbibtex-parser%2F7feff8a3%2Fparse-bibtex.js%22%2C%20replaceValues)%7D)()"&gt;Fill ILLiad&lt;/a&gt;
bookmarklet.&lt;/p&gt;
&lt;p&gt;Happy (semi-)automating!&lt;/p&gt;</content><category term="javascript"></category></entry><entry><title>Atomate - reproducible computational materials science workflows in Python</title><link href="https://bocklund.io/atomate-paper.html" rel="alternate"></link><published>2017-08-05T00:00:00-04:00</published><updated>2017-08-05T00:00:00-04:00</updated><author><name>Brandon Bocklund</name></author><id>tag:bocklund.io,2017-08-05:/atomate-paper.html</id><summary type="html">&lt;p&gt;If you've done any computational work on a high-performance computing system, odds are you are very familiar with shell scripting and running code in at least 3 different languages that was passed down through the years. You know the theory of how it all works, but can never find the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you've done any computational work on a high-performance computing system, odds are you are very familiar with shell scripting and running code in at least 3 different languages that was passed down through the years. You know the theory of how it all works, but can never find the time to weed through, organize and update someone else's FORTRAN code (that was out of date when it was written in 2002) to use the latest techniques. &lt;a href="https://hackingmaterials.lbl.gov/atomate/"&gt;Atomate&lt;/a&gt; aims to solve these problems by leveraging the community developed materials science tools and analyses in &lt;a href="http://pymatgen.org/"&gt;pymatgen&lt;/a&gt; and the workflow management/database creation of &lt;a href="https://materialsproject.github.io/fireworks/"&gt;FireWorks&lt;/a&gt; to document and allow for easy execution of community standardized and easily customizable workflows managed and written using Python.&lt;/p&gt;
&lt;p&gt;Link to the paper: &lt;a href="https://doi.org/10.1016/j.commatsci.2017.07.030"&gt;Mathew, K. et al. Atomate: A high-level interface to generate, execute, and analyze computational materials science workflows. Comput. Mater. Sci. 139, 140–152 (2017).&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/about"&gt;My other publications&lt;/a&gt;&lt;/p&gt;</content><category term="science"></category><category term="publications"></category></entry><entry><title>SciPy 2017 Talk Highlights</title><link href="https://bocklund.io/scipy-2017-talks.html" rel="alternate"></link><published>2017-07-17T00:00:00-04:00</published><updated>2017-07-17T00:00:00-04:00</updated><author><name>Brandon Bocklund</name></author><id>tag:bocklund.io,2017-07-17:/scipy-2017-talks.html</id><summary type="html">&lt;p&gt;The full SciPy 2017 conference took place from July 10 to 16.
The talks and tutorials are now live in a &lt;a href="https://www.youtube.com/playlist?list=PLYx7XA2nY5GfdAFycPLBdUDOUtdQIVoMf"&gt;YouTube playlist&lt;/a&gt; created by Enthought.
I have watched most of the available talks that seemed interesting from a materials science perspective, specifically talks geared towards building scientific packages and …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The full SciPy 2017 conference took place from July 10 to 16.
The talks and tutorials are now live in a &lt;a href="https://www.youtube.com/playlist?list=PLYx7XA2nY5GfdAFycPLBdUDOUtdQIVoMf"&gt;YouTube playlist&lt;/a&gt; created by Enthought.
I have watched most of the available talks that seemed interesting from a materials science perspective, specifically talks geared towards building scientific packages and computational tools like &lt;a href="https://pycalphad.org"&gt;pycalphad&lt;/a&gt;.
Read on to see the four talks I found most interesting&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/eVDDL6tgsv8"&gt;Keynote - Coding for Science and Innovation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;iframe align="center" width="560" height="315" src="https://www.youtube.com/embed/eVDDL6tgsv8" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
&lt;p&gt;Computing has been driving forward a revolution in how science and technology can solve new problems. Python has grown to be a central player in this game, from computational physics to data science. I would like to explore some lessons learned doing science with Python as well as doing Python libraries for science. What are the ingredients that the scientists need? What technical and project-management choices drove the success of projects I've been involved with? How do these demands and offers shape our ecosystem?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Gael offered some interesting insights into how we should be developing packages and APIs for science that people actually want to use and are able to use.
One takeaway for me was on slide 34, where Gael suggests to use example-driven development.
Example-driven development is about writing codes and APIs that solve problems that people want to do.
In my mind, this is a guiding principle behind pycalphad development.
There are so many things to do in the CALPHAD space that the best path forward is to enable things that are hard or impossible with other software tools and iterate on those features to make them intuitive and easy to use.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/ZxNPVTHQwGo"&gt;Dask - Advanced Techniques&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;iframe align="center" width="560" height="315" src="https://www.youtube.com/embed/ZxNPVTHQwGo" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
&lt;p&gt;Dask enables parallel computing in Python. While commonly used for its parallel and NumPy, Pandas implementations, Dask is also capable of a variety of more advanced parallel computing workflows. This talk dives into these advanced features features and applications beyond the typical distributed dataframe to talk about asynchronicity, dynamic and self-building computations, multi-user workflows, and more.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This covered some of the advanced usage that we us in pycalphad and ESPEI with the distributed scheduler and Client.
Note: you should be familiar with Dask or watch an &lt;a href="https://youtu.be/RA_2qdipVng"&gt;introductory talk&lt;/a&gt; (from PyCon 2017) first.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/sea2K4AuPOk"&gt;Dash - A New Framework for Building User Interfaces for Technical Computing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;iframe align="center" width="560" height="315" src="https://www.youtube.com/embed/sea2K4AuPOk" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
&lt;p&gt;If you are a data scientist today, it's actually pretty tough to build a data visualization web-application. If you're not a full-stack developer, you're practically out of luck.&lt;/p&gt;
&lt;p&gt;But GUIs like sliders, dropdowns, and text inputs are extremely helpful to the data scientist or engineer. If you're an R programmer, you're in luck with Shiny. If you're a MATLAB programmer, you can use GUIDE (but good luck sharing it!). The dash project introduces a framework for building web-based technical computing apps (GUIs). It's like a Shiny for Python. dash is built off of plotly.js and react.js to provide rich interactive graphing and user interfaces and Python's flask to provide a simple but scalable web server.&lt;/p&gt;
&lt;p&gt;This talk will introduce the scientific community to Dash. We'll go over motivations behind the project, the basic architecture of the framework, several interactive examples, and leave with a vision for the future of interactive and sharable technical computing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Dash is a newly released package from the folks at &lt;a href="https://plot.ly"&gt;Plot.ly&lt;/a&gt;.
I like the idea of Dash because of its potential to generate interactive GUIs with visualizations in the browser.
Easily, the best and most interesting part is that there is tooling to use JavaScript plugins so that all of the work building browser tools in that space can be reused.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="three"&gt;Introducing JOSS The Journal of Open Source Software&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;iframe align="center" width="560" height="315" src="https://www.youtube.com/embed/DPJAAhsjans" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
&lt;p&gt;JOSS is "A developer friendly journal for research software packages."&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The Journal of Open Source Software (JOSS) is operated entirely in the open and offers an alternative for publishing software to the traditional 'write a paper with results' that also includes a description of the software.
JOSS is mostly operated on GitHub and is transparent about the cost of publishing (free for authors).
They have achieved several milestones since starting in May 2016 and Kyle Niemeyer discusses those milestones and the future of JOSS in this talk.&lt;/p&gt;
&lt;p&gt;Bonus: I haven't watched any of the tutorials, but the &lt;a href="https://youtu.be/FepqwPI6U80"&gt;Cython tutorial&lt;/a&gt; seemed interesting and new this year.
If you're still looking for more talks, &lt;a href="https://www.youtube.com/channel/UCrJhliKNQ8g0qoE_zvL8eVg/videos"&gt;PyCon 2017&lt;/a&gt; had a ton of interesting content.
Specifically this &lt;a href="https://www.youtube.com/watch?v=HYVr-b46VJo"&gt;4d topology visualization&lt;/a&gt; by David Dumas and Jake VanderPlas's talk on the &lt;a href="https://youtu.be/FytuB8nFHPQ"&gt;Python visualization landscape&lt;/a&gt;.&lt;/p&gt;</content><category term="science"></category><category term="python"></category><category term="education"></category></entry><entry><title>Getting Papers Remotely</title><link href="https://bocklund.io/getting-papers-remotely.html" rel="alternate"></link><published>2017-07-06T00:00:00-04:00</published><updated>2017-07-06T00:00:00-04:00</updated><author><name>Brandon Bocklund</name></author><id>tag:bocklund.io,2017-07-06:/getting-papers-remotely.html</id><summary type="html">&lt;p&gt;Whether you are at home or traveling to a conference, it can be helpful to have access to all of the literature online that you would have at your institution.
This article covers some easy and practical ways to connect to your institution's library easily.
Some of these techniques work …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Whether you are at home or traveling to a conference, it can be helpful to have access to all of the literature online that you would have at your institution.
This article covers some easy and practical ways to connect to your institution's library easily.
Some of these techniques work on any website, and others are for Google Scholar, or with the Alfred app for the Mac.
The examples here are specifically for connecting to the Penn State library, but the methods are general enough to work at many or all institutions.&lt;/p&gt;
&lt;p&gt;This might seem trivial because it is.
The time investment to figure out these things and write them up took much more time than going through the PSU library website for any article I was looking up at the time.
Luckily there's an xkcd comic to justify my work (and your short investment to implement these!):&lt;/p&gt;
&lt;p&gt;&lt;img alt="xkcd is it worth the time" src="https://imgs.xkcd.com/comics/is_it_worth_the_time.png"&gt;&lt;/p&gt;
&lt;p&gt;I'd say that it usually takes me a minute or so per paper to track down the link when I'm away from home.
Usually I look things up in bursts, but maybe I could average it out to once per day.
So over 5 years (roughly the length of a PhD) you give yourself an entire 24 hour day of reading papers instead of acquiring them.&lt;/p&gt;
&lt;h2&gt;Setting up the Get-It! button in Google Scholar&lt;/h2&gt;
&lt;p&gt;If you are on a university's campus network, you probably have seen the &lt;code&gt;Get-It! @ University&lt;/code&gt; button around the web, including on Google Scholar.
The &lt;code&gt;Get-It!&lt;/code&gt; button will immediately take you to that university's page for the article.
Clicking this button is often unnecessary on campus because you are often redirected automatically, but it is helpful to have this button while off campus.
To set this up on Google Scholar, first visit the &lt;a href="https://scholar.google.com/scholar_settings"&gt;Google Scholar Settings&lt;/a&gt; page.
Navigate to the Library Links setting and search for &lt;code&gt;PSU&lt;/code&gt; and check the box for Pennsylvania State University.
Now any Google scholar searches should show the &lt;code&gt;Get-It!&lt;/code&gt; button, which will send you to the PSU authenticated journal article pages.&lt;/p&gt;
&lt;h2&gt;Bookmarklet for the library version of the article&lt;/h2&gt;
&lt;p&gt;When doing literature searches on any website you will likely end up on a web page for the paper you want, on ScienceDirect for example.
Typically, if you are away from your institution, you can access the institution specific versions of any article through a library website.
Penn State's library website is &lt;a href="https://libraries.psu.edu"&gt;libraries.psu.edu&lt;/a&gt;.
If you've already landed on the journal's website, it can be tedious to copy over the information to your library's website and click through to get to the article.
If you did click through, you might notice that you get the same page from the library website as you had originally visited, but there the URL is slightly modified.
At Penn State, the service changes the URL so that there is an &lt;code&gt;.ezaccess.libraries.psu.edu&lt;/code&gt; after the &lt;code&gt;.com&lt;/code&gt;, but before the rest of the URL to the specific page.&lt;/p&gt;
&lt;p&gt;To get to the PSU libraries page in one click, we're going to use a JavaScript bookmarklet.
Bookmarklets are supported in most browsers and are operate by executing a simple piece of JavaScript code.
If you use Mendeley's web importer bookmarklet, it also uses JavaScript.
Below are the steps to create the bookmarklet yourself, but you can also bookmark this link instead: 
&lt;a href='javascript:window.location = window.location.href.replace(/\.(com|org)/, ".$1.ezaccess.libraries.psu.edu");'&gt;PSUezaccess&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is only a very simple example of JavaScript in a bookmarklet, but the JavaScript can be complex.
Some browsers make it more challenging to create bookmarklets by hand. If you have trouble, try creating the bookmarklet in another browser.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In your browser, create a new bookmark&lt;/li&gt;
&lt;li&gt;In the URL for that bookmark, enter the following code:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nx"&gt;javascript&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/\.(com|org)/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;.$1.ezaccess.libraries.psu.edu&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The first part, &lt;code&gt;javascript:&lt;/code&gt; means that what follows will be JavaScript code, rather than a normal http URL.
Then we are setting the new URL of the current page (&lt;code&gt;window.location&lt;/code&gt;) to the old location (&lt;code&gt;window.location.href&lt;/code&gt;), except that we are replacing either &lt;code&gt;.com&lt;/code&gt; or &lt;code&gt;.org&lt;/code&gt; with whichever one was matched plus &lt;code&gt;ezaccess.libraries.psu.edu&lt;/code&gt;.
So when this code is run, it would replace &lt;code&gt;https://sciencedirect.com/stuff/to/page&lt;/code&gt; with &lt;code&gt;https://sciencedirect.com.ezaccess.psu.edu/stuff/to/page&lt;/code&gt;.
You can make the description/name of the bookmarklet whatever you want, I named mine &lt;code&gt;PSUezaccess&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In the replace function, the first argument is a &lt;a href="https://en.wikipedia.org/wiki/Regular_expression"&gt;regular expression&lt;/a&gt;.
You can test out different matching patterns &lt;a href="http://regexr.com/"&gt;several places online&lt;/a&gt;.
I've found that most journal websites are either &lt;code&gt;.com&lt;/code&gt; or &lt;code&gt;.org&lt;/code&gt; websites, but if you find others, e.g. &lt;code&gt;.net&lt;/code&gt;, you could simply add that to the regex in your bookmarklet and it will just work.
The second part uses &lt;code&gt;$1&lt;/code&gt; to take the first match, so either &lt;code&gt;.com&lt;/code&gt; or &lt;code&gt;.org&lt;/code&gt; in this example.
This allows us to easily use any arbitrary top level domain.&lt;/p&gt;
&lt;h2&gt;Easy searching with Alfred&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.alfredapp.com/"&gt;Alfred&lt;/a&gt; is a productivity tool for Mac that is similar to the recent iterations of Spotlight in macOS, but much more powerful.
There are many things that Alfred does and can be customized to do with Alfred Workflows, but most often I use it to open files, applications, and as a calculator.
An interesting aspect of Alfred for getting papers is to set up DOI searches and Google Scholar searches.&lt;/p&gt;
&lt;p&gt;Often I find that either from a paper or somewhere online, I have a plain text reference for a paper I want to look up or I have the DOI, but not the link.
If you go to the Alfred preferences and the web searches page
&lt;img alt="Alfred web searches page" src="https://bocklund.io/images/alfred-searches.png"&gt;
you can create a Custom Search in this dialog
&lt;img alt="Alfred custom web search dialog" src="https://bocklund.io/images/alfred-custom-dialog.png"&gt;&lt;/p&gt;
&lt;p&gt;Above is an example for creating a DOI search if you only have the DOI, e.g. &lt;code&gt;10.5334/jors.140&lt;/code&gt; as it would appear in Mendeley.
You simply set up the link as you would to visit the website, but instead replace the actual DOI with &lt;code&gt;{query}&lt;/code&gt;.
Then typing &lt;code&gt;doi&lt;/code&gt; in Alfred, you can paste in the DOI (&lt;code&gt;10.5334/jors.140&lt;/code&gt;), hit &lt;code&gt;Return&lt;/code&gt; and go immediately to that article.
You could then use the bookmarklet method above if you are working remotely.&lt;/p&gt;
&lt;p&gt;Setting up a Google Scholar search works the same way, except you would use &lt;code&gt;https://scholar.google.com/scholar?q={query}&lt;/code&gt; as the search URL.
I set mine up to use the scholar keyword, so I can type &lt;code&gt;scholar&lt;/code&gt; and paste in the text citation to search Google Scholar:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;scholar Otis, R. &amp;amp; Liu, Z.-K. pycalphad: CALPHAD-based Computational Thermodynamics in Python. J. Open Res. Softw. 5, 1 (2017).&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Using Google Scholar searching and following links would work well with either the bookmarklet or the &lt;code&gt;Get-It!&lt;/code&gt; button methods above.
All of these solutions are relatively straightforward to implement and use.
The Penn State specific links for Google Scholar and the bookmarklet could easily be adapted to any institution that uses similar schemes for accessing paywalled journal articles.&lt;/p&gt;</content><category term="science"></category><category term="javascript"></category></entry><entry><title>Open-Source Learning</title><link href="https://bocklund.io/open-source-learning.html" rel="alternate"></link><published>2017-06-06T00:00:00-04:00</published><updated>2017-06-06T00:00:00-04:00</updated><author><name>Brandon Bocklund</name></author><id>tag:bocklund.io,2017-06-06:/open-source-learning.html</id><summary type="html">&lt;p&gt;New researchers, graduate and undergraduate students, spend much of their first 6 months to first year in their research group learning the techniques the lab uses to do their science. This is espeically true in computational fields, where there are numerous softwares (open- and closed-source) using in specific domains. Challenges …&lt;/p&gt;</summary><content type="html">&lt;p&gt;New researchers, graduate and undergraduate students, spend much of their first 6 months to first year in their research group learning the techniques the lab uses to do their science. This is espeically true in computational fields, where there are numerous softwares (open- and closed-source) using in specific domains. Challenges associated with joining computation-focused research groups are exacerbated by the fact that many undergraduate curricula in applied research fields tend to lag behind in the use of software tools. In my experience, relatively few undergraduates in engineering consider themselves to be proficent software developers (CS, CE, etc. aside). Research groups need better ways to teach new scientists software fluency.&lt;/p&gt;
&lt;p&gt;Most research groups have some kind of onboarding procedure for new members, which often involves an insurmountable stack of theory-filled textbooks and literature that are both too broad and too narrow to solve the introductory problems a new student should be exposed to. Eventually, these piles of literature are eschewed in favor of brute forcing the initial research tasks with heavy involvement and guidance from senior group members. This approach is wasteful for the student who may miss some key theoretical background or dwell too much on theory and be less productive, ultimately delaying the time to first publication. &lt;/p&gt;
&lt;p&gt;The more senior researcher(s) tasked with guiding the new student as they orient themselves towards their research goals also suffer from the inefficieny of this process. Heavily guided introductions by senior group members is a cornerstone of academic culture and every early, mid, and late career scientist has been a part of this process at one time or another. Passing of knowledge down academic trees is not going away anytime soon, but it can be made more efficient.&lt;/p&gt;
&lt;p&gt;Instead of teaching new students skills entirely case by case and in-person, each research group can develop a manual that couples theory and practice. Of course, this has been done many times over the years and is not at all a new idea and several models have been used for maintaining such documentation with varying degrees of success. In the past several years, better software development practices have become more accessible and more adopted by scientists. Scientists have readily adopted resources such as GitHub for hosting their code, but entire &lt;a href="https://github.com/openjournals/joss-reviews"&gt;academic journals&lt;/a&gt; exist on GitHub as well as the &lt;a href="https://github.com/jkitchin/dft-book"&gt;DFT book&lt;/a&gt; by John Kitchin. In particular, the DFT book and the &lt;a href="https://hackingmaterials.com/2017/01/08/our-group-handbook/"&gt;Hacking Materials group handbook&lt;/a&gt; by Anubhav Jain have served as inspiration to develop open guides to starting at the ground level with a new research group. &lt;/p&gt;
&lt;p&gt;Thus, I am proposing that other research groups join this effort for opening up the onboarding process of new researchers and maintain open documentation for how to get started as a researcher and a member of the group/institution/company. I have initiated such a project for the &lt;a href="https://phases.psu.edu"&gt;Phases Research Lab at Penn State&lt;/a&gt; where we have an &lt;a href="https://github.com/phasesresearchlab/prl-onboard"&gt;onboarding guide freely available on GitHub&lt;/a&gt;. The goals of the repository, called &lt;code&gt;prl-onboard&lt;/code&gt;, is to guide new researchers (and possibly new materials scientists) through learning Python in context of the tools we are using in our group: &lt;a href="https://pycalphad.org"&gt;pycalphad&lt;/a&gt; for computational thermodynamics and &lt;a href="http://pythonhosted.org/atomate"&gt;atomate&lt;/a&gt; for DFT calculations. Primarily this is accomplished by having a complete 'course' that students can progress through and alternate reading relevant material and actually &lt;em&gt;using&lt;/em&gt; what they are reading about. Other goals are to introduce people to foundational knowledge required for success in our field and to getting settled at Penn State. Eventually, we hope that the &lt;a href="https://github.com/phasesresearchlab/prl-onboard"&gt;prl-onboard repo&lt;/a&gt; will be useful to people outside of the Phases Research Lab. &lt;/p&gt;
&lt;p&gt;Besides just being open for the sake of being accessible to people outside of our research group, the increased visibilty, ease of navigation and rich formatting offered by markup languages on services like GitHub can be coupled with a tight feedback loop to ensure that the project doesn't die after the person who initated the effort leaves or becomes to busy to maintain the resource. &lt;/p&gt;
&lt;p&gt;This effort is still in its initial stages at the time of writing but I hope to address several long term goals and challenges in future posts. Some of these challenges are using closed-source software (we depend on VASP and Thermo-Calc) and textbooks for the reading material. We have access to these resources at the group scale, but scaling this beyond our group would make the time it takes to develop this material more worthwhile is currently a major challenge. &lt;/p&gt;</content><category term="education"></category><category term="science"></category><category term="python"></category></entry></feed>