<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sam Harrison</title><link>https://samharrison.science/</link><description>Recent content on Sam Harrison</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 08 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://samharrison.science/index.xml" rel="self" type="application/rss+xml"/><item><title>Retrieving water quality data from the Environment Agency's new API</title><link>https://samharrison.science/posts/ea-water-quality-api/</link><pubDate>Sun, 08 Mar 2026 00:00:00 +0000</pubDate><guid>https://samharrison.science/posts/ea-water-quality-api/</guid><description>&lt;p>The Environment Agency has a treasure trove of data on water quality in English rivers, made openly available via a &lt;a href="https://environment.data.gov.uk/water-quality" target="_blank">web portal&lt;/a>, with an accompanying &lt;a href="https://environment.data.gov.uk/water-quality/api-docs" target="_blank">API&lt;/a>.&lt;/p>
&lt;p>Back at the end of last year (2025) the EA &lt;a href="https://environment.data.gov.uk/support/announcements/275811286/785973249" target="_blank">refreshed the web portal&lt;/a>, removing a handy option to bulk download data. At the same time, they committed the cardinal sin of &lt;a href="https://environment.data.gov.uk/support/announcements/275811447/1156939777" target="_blank">completely changing their API&lt;/a>, deprecating their old API at the same time, with very little notice. Those of us that used the old API were left with broken scripts and fair barrier to accessing the data, compounding by &lt;a href="https://environment.data.gov.uk/water-quality/api-docs" target="_blank">rather opaque documentation&lt;/a>.&lt;/p></description></item><item><title>Publications: Biodegradable Polymers</title><link>https://samharrison.science/publications/biodegradable-polymers/</link><pubDate>Sun, 08 Feb 2026 17:57:23 +0000</pubDate><guid>https://samharrison.science/publications/biodegradable-polymers/</guid><description>&lt;p>Publications relating to the Biodegradable Polymers project.&lt;/p></description></item><item><title>Creating a Conda package from Fortran using fpm and rattler-build</title><link>https://samharrison.science/posts/conda-package-fortran-rattler-fpm/</link><pubDate>Sat, 02 Nov 2024 20:11:48 +0000</pubDate><guid>https://samharrison.science/posts/conda-package-fortran-rattler-fpm/</guid><description>&lt;p>A while ago, I wrote a &lt;a href="https://samharrison.science/posts/conda-package-fortran-python/">post on how to create a Conda package from Fortran and Python code&lt;/a>. Though the main point of the post was to explore including Fortran code in Python, I also delved into Conda build as a way of building Conda packages. There is now a new kid on the block - &lt;a href="https://prefix-dev.github.io/rattler-build/latest/" target="_blank">rattler-build&lt;/a> - which offers a much faster and cleaner build experience for building Conda packages. I thought it was time for a blog post on that.&lt;/p></description></item><item><title>Scheduling a Python script using PythonAnywhere and cron-job.org</title><link>https://samharrison.science/posts/scheduling-python-scripts/</link><pubDate>Tue, 02 Jul 2024 10:07:12 +0100</pubDate><guid>https://samharrison.science/posts/scheduling-python-scripts/</guid><description>&lt;p>Scheduling a script is one of those jobs that sounds like it should be easy, but is surprisingly tricky. Here, I walk you through one of the easier ways of doing so, by hosting the script on &lt;a href="https://www.pythonanywhere.com/" target="_blank">PythonAnywhere&lt;/a> to give it a URL, and scheduling it to run using &lt;a href="https://cron-job.org" target="_blank">cron-job.org&lt;/a>, both of which offer free services.&lt;/p>
&lt;h2 id="whats-so-difficult">
 What&amp;rsquo;s so difficult?
 &lt;a class="heading-link" href="#whats-so-difficult">
 &lt;i class="fa fa-link" aria-hidden="true">&lt;/i>
 &lt;/a>
&lt;/h2>
&lt;p>Scheduling scripts is when, instead of manually running a script whenever you need to, you tell a scheduler to run it at a given frequency or based on other events. There are many uses, such as running a forecasting model to provide regular forecasts, or pulling in the latest observations data to parameterise that model.&lt;/p></description></item><item><title>Getting more out of your Tado heating system with Python and the Tado API</title><link>https://samharrison.science/posts/tado-heating-python-api/</link><pubDate>Mon, 30 Oct 2023 00:00:00 +0000</pubDate><guid>https://samharrison.science/posts/tado-heating-python-api/</guid><description>&lt;p>We have recently installed a Tado thermostat to control our heating system. Tado is a &amp;ldquo;smart&amp;rdquo; heating system, in the sense that it is internet connected and lets you control your heating via its own app. The app is surprisingly good, but lacking in a few places, and so this got me wondering whether Tado had an API, and whether I could leverage this to get a bit more out of our heating system. The two specific things I wanted to achieve were:&lt;/p></description></item><item><title>An honest review of going on holiday in an electric vehicle</title><link>https://samharrison.science/posts/ev-holidaying/</link><pubDate>Sat, 23 Sep 2023 08:19:00 +0000</pubDate><guid>https://samharrison.science/posts/ev-holidaying/</guid><description>&lt;p>There seems to be a concerted push amongst right-leaning media outlets recently to dial up the rhetoric around the downsides of electric vehicles. The same old, already-disproven arguments are being dragged to the surface for a last breath of air: they’re worse for the environment because of battery manufacturing and power generation (&lt;a href="https://www.epa.gov/greenvehicles/electric-vehicle-myths" target="_blank">not true&lt;/a>), they’re more likely to spontaneously catch fire (quite the opposite, and &lt;a href="https://thedriven.io/2023/05/16/petrol-and-diesel-cars-20-times-more-likely-to-catch-fire-than-evs/" target="_blank">by a significant margin&lt;/a>) and that inadequate charging infrastructure and low ranges make them a practical nightmare for anything but popping to the local supermarket.&lt;/p></description></item><item><title>Creating a Conda package for a project with Fortran and Python code</title><link>https://samharrison.science/posts/conda-package-fortran-python/</link><pubDate>Fri, 06 Jan 2023 16:02:35 +0000</pubDate><guid>https://samharrison.science/posts/conda-package-fortran-python/</guid><description>&lt;p>Creating a Conda package is a great way to package and distribute your project’s software and its dependencies in a platform- and language-agnostic way. As Conda packages distribute compiled binaries, rather than your source code, they are not limited to specific programming languages (e.g. unlike Python packages distributed via PyPI). This makes them particularly suited to complex projects that might use a selection of different languages.&lt;/p>
&lt;p>One common paradigm in scientific computing is the combined use of Fortran and Python. Fortran is often used for underlying models and algorithms that are computationally intensive, whilst the plethora of data processing packages available in Python are leveraged to provide advanced data parsing and visualisation capabilities. This is a paradigm I often use in my own work.&lt;/p></description></item><item><title>Publications: DEPICTION</title><link>https://samharrison.science/publications/depiction/</link><pubDate>Wed, 30 Nov 2022 15:51:23 +0000</pubDate><guid>https://samharrison.science/publications/depiction/</guid><description>&lt;p>Publications relating to the DEPICTION project.&lt;/p></description></item><item><title>Microplastics2022 conference wrap-up</title><link>https://samharrison.science/posts/microplastics2022-wrap-up/</link><pubDate>Tue, 15 Nov 2022 11:32:00 +0000</pubDate><guid>https://samharrison.science/posts/microplastics2022-wrap-up/</guid><description>&lt;p>Sitting on the TGV from Zurich to Paris, returning from an exciting and educational week spent at the &lt;a href="https://microplastics2022.ch/" target="_blank">Microplastics2022 conference&lt;/a> in Monte Verità in Switzerland, I thought I should jot down some scattered thoughts on the conference. Things I learnt, themes I saw emerging, new science appearing and old science being adapted.&lt;/p>
&lt;p>And then I thought these thoughts might just about be useful enough to others to warrant publishing, and so here is a brief post along those lines. I’ve tried to categorise into somewhat arbitrarily chosen categories, but really this is just a disparate collection of things that popped into my head as I read through my notes. Enjoy 🙂&lt;/p></description></item><item><title>Create and hosting an interactive app with Jupyter, Voilà and Heroku</title><link>https://samharrison.science/posts/interactive-app-jupyter-voila-heroku/</link><pubDate>Sat, 11 Jun 2022 09:17:22 +0100</pubDate><guid>https://samharrison.science/posts/interactive-app-jupyter-voila-heroku/</guid><description>&lt;p>In this article, I will demonstrate how easy it is to create an interactive web app using Jupyter Notebooks, Voilà and Heroku. We will use Jupyter to create a simple notebook that plots a graph based on user input, turn this into an interactive dashboard using Voilà, and host it online using Heroku.&lt;/p>
&lt;p>Before we get started, there are a few prerequisites:&lt;/p>
&lt;ul>
&lt;li>I am presuming that you already have Jupyter installed and are familiar with using it and Python in general.&lt;/li>
&lt;li>I am also presuming you&amp;rsquo;re familiar with Git and package managers Conda and Pip. Having Git and Conda installed is needed to follow all of the steps.&lt;/li>
&lt;li>We are using ipywidgets to provide the interactivity, so familiarity with these would be useful.&lt;/li>
&lt;/ul>
&lt;h2 id="the-app">
 The app
 &lt;a class="heading-link" href="#the-app">
 &lt;i class="fa fa-link" aria-hidden="true">&lt;/i>
 &lt;/a>
&lt;/h2>
&lt;p>The goal of our app is to let the user explore how changing the coefficients $a$, $b$ and $c$ to the quadratic equation alters the shape of the curve:&lt;/p></description></item><item><title>How to compare two empirical distributions</title><link>https://samharrison.science/posts/how-to-compare-two-distributions/</link><pubDate>Sat, 14 May 2022 00:00:00 +0000</pubDate><guid>https://samharrison.science/posts/how-to-compare-two-distributions/</guid><description>&lt;p>The world is full of distributions - people&amp;rsquo;s height, incomes, exam results, average temperatures, heights of trees, sizes of microplastic particles in the environment. It stands to reason that there will be times when we need to compare these distributions to see how similar (or different) they are. For example, were summer temperatures similar this year to last year? Do two groups of people who buy different products make similar incomes? Do modelled size distributions of microplastics match what we expect from observations?&lt;/p></description></item><item><title>Welcome! 👋</title><link>https://samharrison.science/posts/welcome/</link><pubDate>Mon, 25 Apr 2022 16:24:40 +0100</pubDate><guid>https://samharrison.science/posts/welcome/</guid><description>&lt;p>Hey - welcome to my site! This is just a little post to say hello and because no blog would be complete without a &amp;ldquo;this is my first post&amp;rdquo; post.&lt;/p>
&lt;p>In the future, this blog will be adorned with lots of useful tidbits about all things software, the environment, and environmental software. In the meantime, why not:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://samharrison.science/my-research/">Check out my research&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://samharrison.science/publications/">Have a look at my publications&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://twitter.com/samharrison7" target="_blank">Follow me on Twitter&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/samharrison7" target="_blank">Have a nosey at some of my code on GitHub&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>About</title><link>https://samharrison.science/about/</link><pubDate>Mon, 25 Apr 2022 14:28:01 +0100</pubDate><guid>https://samharrison.science/about/</guid><description>&lt;h3 id="how-this-site-was-built">
 How this site was built
 &lt;a class="heading-link" href="#how-this-site-was-built">
 &lt;i class="fa fa-link" aria-hidden="true">&lt;/i>
 &lt;/a>
&lt;/h3>
&lt;p>This website was built using &lt;a href="https://gohugo.io" target="_blank">Hugo&lt;/a> and lovingly adapted from the &lt;a href="https://github.com/luizdepra/hugo-coder/" target="_blank">Coder theme&lt;/a>. On top of these, I use &lt;a href="https://github.com/vlunot/nb2hugo" target="_blank">nb2hugo&lt;/a> to convert Jupyter Notebooks to a Markdown format supported by Hugo. I use Jupyter Notebooks to write blog articles that contain a lot of code, to make sure bugs are kept to a minimum (because I can test the code prior to converting to Markdown).&lt;/p></description></item><item><title>Publications: Defra intentionally added microplastics</title><link>https://samharrison.science/publications/defra-microplastics/</link><pubDate>Fri, 07 Jan 2022 17:57:23 +0000</pubDate><guid>https://samharrison.science/publications/defra-microplastics/</guid><description>&lt;p>Publications relating to the Defra project costing risk mitigation options for intentionally added microplastics.&lt;/p></description></item><item><title>Publications: ETERNAL</title><link>https://samharrison.science/publications/eternal/</link><pubDate>Fri, 07 Jan 2022 17:57:23 +0000</pubDate><guid>https://samharrison.science/publications/eternal/</guid><description>&lt;p>Publications relating to the ETERNAL project.&lt;/p></description></item><item><title>Publications: FRAGMENT-MNP</title><link>https://samharrison.science/publications/fragment-mnp/</link><pubDate>Fri, 07 Jan 2022 17:57:23 +0000</pubDate><guid>https://samharrison.science/publications/fragment-mnp/</guid><description>&lt;p>Publications relating to the FRAGMENT-MNP project and model.&lt;/p></description></item><item><title>Publications: NanoFASE</title><link>https://samharrison.science/publications/nanofase/</link><pubDate>Fri, 07 Jan 2022 17:57:23 +0000</pubDate><guid>https://samharrison.science/publications/nanofase/</guid><description>&lt;p>Publications relating to the NanoFASE project and &lt;a href="https://github.com/nerc-ceh/nanofase" target="_blank">model&lt;/a>.&lt;/p></description></item><item><title>Publications: NanoSolveIT</title><link>https://samharrison.science/publications/nanosolveit/</link><pubDate>Fri, 07 Jan 2022 17:57:23 +0000</pubDate><guid>https://samharrison.science/publications/nanosolveit/</guid><description>&lt;p>Publications relating to the NanoSolveIT project.&lt;/p></description></item><item><title>Publications: SAbyNA and ASINA</title><link>https://samharrison.science/publications/sabyna_asina/</link><pubDate>Fri, 07 Jan 2022 17:57:23 +0000</pubDate><guid>https://samharrison.science/publications/sabyna_asina/</guid><description>&lt;p>Publications relating to the SAbyNA and ASINA projects.&lt;/p></description></item><item><title>Publications: UKSCAPE SPEED</title><link>https://samharrison.science/publications/speed/</link><pubDate>Fri, 07 Jan 2022 17:57:23 +0000</pubDate><guid>https://samharrison.science/publications/speed/</guid><description>&lt;p>Publications relating to the UK-SCAPE SPEED project.&lt;/p></description></item><item><title>My Projects</title><link>https://samharrison.science/projects/</link><pubDate>Sun, 02 Jan 2022 17:58:27 +0000</pubDate><guid>https://samharrison.science/projects/</guid><description>&lt;p>Projects that I am currently or have previously been involved in.&lt;/p>





&lt;div class="projects">
 
 
 
 &lt;div class="project media">
 
 &lt;span class="media-img">
 &lt;img src="https://samharrison.science/images/paper-cup.jpg"> 
 &lt;/span>
 
 &lt;span class="media-body">
 &lt;h4>FRAGMENT-ARTICLE&lt;/h4>
 
 &lt;span class="dates">January 2026 to December 2027&lt;/span>
 
 &lt;p>In this project, we are further developing the FRAGMENT-MNP model to be able to model the degradation and fragmentation of plastic articles with different formulations. Our partners, Fraunhofer IME and BASF, will undertake degradation experiments in soils and ocean water, and these data will enable us to parameterise the FRAGMENT-MNP model to predict fragmentation under environmentally realistic conditions.&lt;/p></description></item><item><title>My Research</title><link>https://samharrison.science/my-research/</link><pubDate>Sun, 02 Jan 2022 17:58:27 +0000</pubDate><guid>https://samharrison.science/my-research/</guid><description>&lt;p>Hi &amp;#x1f44b;, I&amp;rsquo;m Sam - an environmental modeller and self-proclaimed research software engineer at the &lt;a href="https://ceh.ac.uk" target="_blank">UK Centre for Ecology &amp;amp; Hydrology&lt;/a> in Lancaster, with a background in quantum physics and software development. My main specialism is in the development of emissions, fate and exposure models of potential pollutants in soils and surface waters, including micro- and nanoplastics, pharmaceuticals, PFAS and nanomaterials. This work lays the foundation for environmental risk and impact assessment, helping us understand the chemical drivers of environmental change. Through this, I am particularly interested in integrating models to better quantify these impacts and provide deeper insight into human-environment interactions.&lt;/p></description></item><item><title>Contact</title><link>https://samharrison.science/contact/</link><pubDate>Sun, 02 Jan 2022 17:57:23 +0000</pubDate><guid>https://samharrison.science/contact/</guid><description>&lt;p>Got a question, an idea, a comment or just want to chat? I&amp;rsquo;m always happy to hear from new folk, so &lt;a href="mailto:sharrison@ceh.ac.uk">drop me an email&lt;/a> or &lt;a href="https://twitter.com/samharrison7" target="_blank">ping me a message on Twitter&lt;/a>.&lt;/p>
&lt;div>
 &lt;i class="fa fa-envelope fa-fw text-green">&lt;/i>
 &lt;span style="padding-left: 0.5rem;">&lt;a href="mailto:sharrison@ceh.ac.uk">sharrison@ceh.ac.uk&lt;/a>&lt;/span>
&lt;/div>
&lt;div>
 &lt;i class="fa fa-twitter fa-fw text-green">&lt;/i>
 &lt;span style="padding-left: 0.5rem;">&lt;a href="https://twitter.com/samharrison7" target="_blank">@samharrison7&lt;/a>&lt;/span>
&lt;/div>
&lt;div>
 &lt;i class="fa fa-phone fa-fw text-green">&lt;/i>
 &lt;span style="padding-left: 0.5rem;">+44 (0)1524 595882&lt;/span>
&lt;/div>
&lt;div>
 &lt;i class="fa fa-building fa-fw text-green">&lt;/i>
 &lt;span style="padding-left: 0.5rem;">UK Centre for Ecology &amp;amp; Hydrology, Lancaster Environment Centre, Lancaster University, LA1 4AP&lt;/span>
&lt;/div></description></item></channel></rss>