Whoa There! The Data Community and Covid-19

The coronavirus pandemic and its affect on our daily lives do not need an introduction - we are all living through it this rather surreal situation. So, I'll just get right to it:

 What can the data science/analytics community do to help in this crisis? 

I think this is actually a really tough question. Given that, in this article I wan't to try and chew over some of my thoughts on this. I'm keen to get the conversation going in the wider analytics community, so please comment with thoughts and suggestions on electricweegie.com, Twitter, LinkedIn. Wherever you find this article and/or me, let's get chatting.

 

The Dangers of Being a Convincing Amateur

The global (and my local) data community consists of an amazing, diverse bunch of supremely talented and passionate people, who often want to go out and "make the world a better place" (as corny as that sounds). They want to do this through building analyses, products, services and technologies that entertain, guide and enable us in ways we never thought possible before. Just think where we were 10 or even 5 years ago in terms of big data, IOT, machine learning and the cloud to get a sense of how our capabilities and reach have grown as data professionals.

Now, when something like a global pandemic hits in this glittering age of data and technology, what are this community going to do other that roll up their sleeves and get analysing and building? Exactly.

I absolutely commend this, and I am desperate to get stuck into this problem myself, but I think we must tread carefully as a community. It is very easy to convince yourself that because you know your way around industrial or academic data problems you can just start creating analyses on Covid-19 datasets and that this will automatically be helpful.

I think there are a few things that can quite quickly go wrong if we, as a community, get ahead of ourselves and do not do the necessary and important groundwork.

Basically, on an important topic like this one, there is nothing more dangerous than convincing amateurs. And let's be honest, if you do not already work in epidemiology or have some training in that area, you are an amateur. It will be a new topic, but because of your years churning out data science and analytics solutions you will be able to build something sophisticated that looks great and uses cool sounding techniques. In other words, you'll be a very convincing amateur.

This can be really dangerous because if we in the analytics community start churning out analyses left, right and centre without key knowledge of this field, we could be coming to conclusions or making suggestions that are very convincing but potentially dangerous. And, as we all know, this is definitely a dangerous situation.

This week I have already seen analyses published on LinkedIn looking at things like case rates and calculated fatality rates for Covid-19 data from across the world where the authors drew some stark conclusions about the efficacy of state interventions or extrapolated outbreaks with some interesting (but ultimately misleading) exponential functions. I am not saying here that these analyses shouldn't have been done, but what I am saying is that

a) there are better things we could/should be doing as a community and

b) we will all need to be careful about the language we use and how we communicate.

Fine, Andy, you aren't happy - so what do we do?

 

Levelling Up & Leveraging What You Know

First, let's consider the case where you really have your heart set on analysing the outbreak data (who doesn't love an armchair epidemiologist?).

In this case, the least you can do is level up your knowledge before you go drawing strong conclusions from your data. At a base level read this thread from Adam Kucharski on Twitter. Kucharski is an associate professor at the London School of Hygiene and Tropical Medicine where he works on, you guessed it, epidemiology. I'd really also recommend his book, The Rules of Contagion (not sponsored btw). You can also do the usual and audit a MOOC, for example I am currently doing the 'Epidemics' course from UPenn on Coursera. Doing this sort of reading will at least get you comfortable with the basics of the field.

I would then suggest that when exploring the Covid- 19 datasets, don't try to do too much interpretation or extrapolation. This way you won't fall into the trap of over-reaching or making any drastic suggestions. I still think doing some exploratory and statistical analysis super useful so by all means get stuck in. Just check yourself as you go though and be mindful of how you communicate your results - if you think you've discovered some weird quirk of the pandemic or some previously unknown intervention side effect, you probably haven't*.

If you are keen to look at the relationships between interventions and case rates or fatalities then please try and work in collaboration with someone who knows what they are talking about (but obviously be mindful that if they are indeed a disease modeller, they may be working flat out already and will not have much to give you an education).

The other very important way we can all help is by leveraging what skills we have and what fields we know inside out. It might require some thought, but I am almost certain that all of you out there have skill-sets you can apply in a way that will genuinely help people in this pandemic.

Some ideas to get the ball rolling:

1. Dashboarding & Visualisation: I think one of the ways we can absolutely help other scientists working on this is to bring together the datasets they need and provide them with the tools they need to interact with it dynamically and easily. This is  something that so many of you out there will be world class at. If you have developed Power BI or Tableau dashboards for organisations, if you're a whizz at building R Shiny or Flask Apps for customers then you can probably build something that will allow researchers to interact with relevant Covid-19 datasets and to glean insights from them.

2. Getting the Message Out: Whatever country you are in just now you have no doubt been watching a lot of press conferences, briefings and announcements by world leaders, health experts and of course the World Health Organisation (WHO). The greatest weapons we have in the fight against Covid-19 are the advice, suggestions and knowledge being expounded by WHO and other scientific bodies on an almost daily basis. Can you help get their message across? Perhaps you can build some web scraper that brings together all of the relevant health body advice in your country, or can you build automated alerts that link to different government sources to help people keep track? Could you even use those skills you developed in marketing analytics to work out the best ways to re-share, plug and package all this information so that the message gets out to the most people and the advice is followed?

3. Support the System: By far I think the best thing we can do is support the organisations and people who will both fight the disease and also keep your country running throughout this crisis. In the UK we've already seen some of the systems and processes we rely on in our daily lives being stretched and strained. For example we've had people panic buying and leaving supermarket shelves empty, even when there is no shortage of food or essential items. We've had to call up thousands of retired and lapsed medical staff to make sure we can cope with the coming surge in Covid-19 cases and the government have had to step in with a promise to pay people's wages. This is all unprecedented stuff and will not be solved by creating another Jupyter notebook that tracks the cases of Coronavirus. These are challenges to the system that supports our way of life. So what we need to is find the people that are working to solve problems in logistics, economics, communications, transport, energy, social care and so on and ask if they need data produced or analysed, and help them if we can. If we can do this guided by their expertise (similar to my point on epidemiology above) then we will all automatically be so much more effective and our voluntary efforts will have more of an impact.

I have seen two great examples of this the other day (and I'd be keen to hear if you have found more!):

1. Crowd Fight Covid19 : This initiative is acting as a market place for scientists to help one another and collaborate. Why not see if anyone needs a data scientist or data analyst? From the site:

"Our proposal: This is a service for COVID-19 researchers. They only need to state a wish or a task, which can go from a simple time-intensive task to be performed (e.g. transcribe data, manually annotate images), to answering a technical question which is beyond their expertise, or to setting up a collaboration. They only need to explain their request in a few lines. Then, another scientist makes the effort of understanding that request and making it reality."

2. UCL made a call for mathematical modellers and data scientists to help them with their research. The call was filled up pretty quickly, but I bet you there are others like it out there. Seek these sorts of partnerships out!

Conclusion

If I was to summarise what I have been saying in a few bullet points it would be this:

  • Data skills can definitely help people during this crisis
  • Do not be an armchair epidemiologist, but by all means support epidemiologists (and other health care professionals) with your experience and skill sets. Most preferably under their guidance
  • Do work on tools to enable relevant professionals
  • Work on getting the public health messaging out there
  • Think laterally about the problems you can help solve. You may not think that helping the NHS work out who to send their most urgent advice to is as sexy as predicting the number of cases in a country, but you will definitely save more lives.

*I mean you might have .... but you probably haven't.

 

We Are Stardust

Article originally published at http://isciencemag.co.uk/features/we-are-stardust/.

The human body consists of around 37.2 trillion cells, each made up of different kinds of molecules, and each containing several different types of atoms that are categorised into elements. These elements, built into molecules like DNA, RNA, enzymes, proteins, haemoglobin and others, constantly execute an array of processes within your body that keep you alive and functioning.

But where do all of these building blocks come from? The answer to this question may seem somewhat surprising. The simplest elements in the universe can be traced back to the Big Bang itself, but the majority of the elements inside our bodies can be traced back to processes that occur inside stars. We are all stardust.

Stellar Nucleosynthesis

Stars are huge thermonuclear power plants that release vast amounts of energy into space, mainly through the fusion of simple elements into heavier elements. For stars with a mass up to one and a half times that of our sun, the main process is the fusing of hydrogen to form helium. Energy released in this process counterbalances the effect of gravity such that as long as the star has hydrogen to burn, it does not collapse.

This process of nuclear fusion occurs in most stars over periods spanning billions of years. Our Sun has been burning hydrogen for around 4.5 billion years, and we estimate that it has about another 4.5 billion years of fuel left. Although the main nuclear reaction occurring in the star produces helium by fusing hydrogen atoms, sometimes the reaction goes further. In the core of stars with masses close to that of the Sun, helium atoms can fuse together to create beryllium, which can then fuse with helium to create carbon, the most important element for life on Earth. Heavier stars (more than eight times the mass of the sun) can create even heavier elements, such as the calcium and iron that are integral for your body to function.

Stellar Death, Terrestrial Life

As a star runs out of fuel and reaches the end of its life several things may happen, depending on its mass. If a star is large enough (about greater than three times the mass of the Sun), after it has used up its hydrogen fuel it begins fusing helium in a cooling, expanding outer shell. These ‘Red Supergiants’ continue burning for around a million years or so before instantly collapsing under their gravitational interactions. This collapse causes one final rebound due to energetic interactions within the core and the star explodes into a spectacular ‘supernova’, throwing elemental products out into interstellar space.

Smaller stars (of about the same mass as the sun) also expand as they use up their fuel. However, the end of their lives is a much tamer affair as they shed off their outer layers into a ‘planetary nebula’ – a cloud of dust that surrounds the core.

The dust that is left in the aftermath of stellar death contains a wide variety of elements, including those very heavy elements produced during the end stages of the star’s life. This interstellar debris then begins to collect under its own gravity: swirling, colliding and clumping together to create large pockets of gas which will eventually collapse under gravity to produce a new star. The heavier elements will similarly collect to produce rocky material and eventually form planets like the Earth. The elements that were created inside the star and expelled at the end of its life then reside throughout the planets formed. The majority of the time, these elements will have combined to form complex compounds, found as minerals in the Earth’s crust.

As life evolved on this planet, it used the raw materials in these compounds to build sophisticated biological systems. Fast forward approximately 4.5 billion years and you have the huge cornucopia of plant and animal life that we observe on Earth today, including ourselves. So whenever you think of the origins of life on this planet, and think of the origin of the parts that make up your own body, remember that you should thank your lucky stars that you are here. Literally.

Images: Tycho Supernova Remnant (NASA).

Sun, Waves and Carbon - Quick Points on Energy in 2018

A quick look at some of the trends and issue to watch out for in 2018 in energy and environment:

Solar Power

Solar power has been expanding rapidly these past couple of years due to advances in technology and uptake meaning that it is now cheaper than traditional fossil fuels . In fact, the drop in price of solar (and wind) energy infrastructure has been such that a study in late 2017 pointed out that it is actually cheaper to install new solar and wind energy that it is to run (already built) coal and nuclear power plants.

Projections for 2018 suggest that this positive trend will continue, with new  global solar installations expected to exceed 100 GW for the first time ever in 2018, with China dominating demand.

I also have to mention that it looks like the first commercial distribution contract for perovskite solar cells (which my PhD is on) has been signed between Saule technologies and Skanska group. This is an exciting step forward for a technology with huge potential which has continually had major questions asked about its commercialisation potential.

Wind Power

Although wind power often gets lumped into discussions about solar (I committed this same sin in the previous paragraph) it is important to note that the wind energy sector is different and has its own challenges and opportunities.

Among the opportunities are exciting developments like a report from the Global Wind Energy Council in Oct 2017, which suggested that wind could account for 20% of global energy capacity by 2030. There have also been some ambitious projects proposed like the super-sized North Sea wind farm Dutch Power are looking to build, with a possible generating capacity of 30GW and complete with its own artificial island.

I personally feel that the growth of offshore floating wind farms will be a very interesting trend, as explained in further detail in this report by Willis Towers Watson, a huge amount of potential wind energy is located above deep sea locations. For example, that report states that

"80% of the offshore wind resource in Europe is located in waters deeper than 60 meters and has a potential capacity of 4,000GW."

As a Scot, I'm also proud that the first offshore floating windfarm (a 30MW project run by Statoil) was opened off the North East coast of Scotland in Oct 2017. It will be exciting to see more projects like this come online both in Scotland, Europe and the rest of the world in 2018.

Carbon Trading

Finally, as I am currently reading "Earth: The Sequel" by Fred Krupp and Miriam Horn , which is an interesting though slightly outdated look at different enterprises in renewable technology and argues heavily for a carbon cap and trade scheme, I thought I'd finish with a point on carbon trading in 2018.

As this brief article on the David Suzuki Foundation website highlights, there are two clear ways to incorporate environmental damage due to release of carbon dioxide (or indeed other greenhouse gas emissions) into our current economic model that do not require governments attempting to choose specific technologies to back through subsidies: a carbon tax or a so called "cap and trade" scheme.

In a carbon tax model, every unit of CO2 emitted is taxed at some fixed rate. For example, in Sweden the rate is currently $150/tonne of CO2 emitted. This directly discourages the burning of fossil fuels and other activities which emit greenhouse gases and therefore stimulates the growth of the renewable sector. Of the two models, this is the easiest for governments to implement.

In a cap and trade system, the government sets an 'emissions ceiling' which the entire economy must fall below. Emissions quotas are then divided out among potential polluters, for example through auction, and polluters cannot exceed these quotas. If they do then they must buy pollution quotas from other parties who have spare quota to sell in order to cover the difference. As time progresses the government successively lowers the cap, thus reducing the overall emissions produced by the economy. This encourages polluters to reduce their carbon emissions so that they can potentially sell there remaining carbon quota on the market, the market of course also acting to set the price of these quotas. The cap and trade scheme allows businesses the freedom to choose how they reduce their emissions whilst also providing a direct economic incentive to do so.

Of these two I like the idea of cap and trade systems best, as the cap itself provides a certainty about the total amount of greenhouse gas emissions that will be emitted. To my mind this is the clearest way to lower carbon emissions as in line with the reductions agreed to in the Paris Climate Agreement.

Due to my interest in this, it was exciting to hear that China are moving to introduce a carbon cap and trade scheme which it is believed could reduce their peak emissions timescale from 2030 to even earlier. Since China having its peak emissions by 2030 or earlier will be key to the world meeting the Paris Climate Agreement targets of less than 2 degrees warming above pre-industrial levels, I think this is great news.

How did Newton know it was an inverse square law?

I passed a sign in Glasgow today** that told me I was on "Newton Street". I've passed it hundreds of times on my way to the Mitchell library, which I've been frequenting a lot as I race to finish my PhD thesis, and never noticed it before. This got me thinking about good ol' Isaac and his phenomenal contribution to our understanding of gravity. As a physicist, Newton's laws and theory of gravitation are among the main first lessons you learn at University (and even at school). Specifically, we learn that the force between two objects with masses M and m is proportional to the product of these masses and inversely proportional to the square of the distance between them, or in mathematics

Now, the more I think about this formula, the more something puzzles me. I can understand the supposition that the force is proportional to the mass of each object, it makes sense that a more massive object would provide more gravitational interaction than a smaller one. You could rationalise this from observing the solar system through telescopes since Galileo's day - larger planets have more moons and the Sun has everything in the solar system orbiting around it. And if you know it's proportional to some power of the mass, why not just assume the linear relationship (i.e no powers of 2 or 3 etc, I'm supposing this is how Newton's thinking went but the reasoning behind the linear dependence on mass may have been more subtle than this). But how did he know that the gravitational force followed an inverse square law? I think answering this question will be an interesting exercise in showing people how the scientific method works when applied to theoretical physics (I would argue that Newton's law of gravitation is the first example of pure theoretical physics that actually worked!).

Well, it turns out it seems that it's not too difficult to see where it comes from. The realisation that gravity came about from an inverse square law was through Newton doing the following:

1) supposing that gravity was universal, i.e the same law was responsible for an apple falling to Earth and for the moon orbiting the Earth and

2) knowing that he could rely on the most up-to-date observational data, which suggested that objects fell towards the Earth with an acceleration of 9.8 ms-2 and that the moon was accelerating towards the Earth at a rate of 0.00272 ms-2.  He also had to know that the moon was approximately 60 times further away form the centre of the Earth than the surface of the Earth was to the centre of the Earth.

Taking these two observations together Newton could just take the ratio of the two accelerations and observe that they are proportional to the relative distance squared

By the way it useful to note that taking a ratio like this is often a very clever idea, since it means that all the other stuff in Newton's law (which he didn't know yet!) cancels out, so he only needs to focus on the stuff he does know about (the accelerations and distances).

So this is a basic bit of theoretical physics (using your 'noggin' to work something out about how the universe works), but it is important to realise that Newton, and indeed all theoretical physicists, can't do this on their own. Remember, Newton had to rely on experimental data to feed into and check his reasoning. Theoretical physics without reference to experiment is not physics, it is just mathematics. This is important to remember, especially when you read articles in newspapers or popular science magazines about "genius theoretical physicists makes new discovery" - think Stephen Hawking, the people at CERN, Albert Einstein - they didn't, and couldn't, have done it without the most important thing in physics, experiments.

To continue this idea that theory isn't everything in physics, in a future post I will discuss how physics now has three "pillars", whereas before it had two,  theoretical, experimental and computational. Until then, Tschüss!

** Note: I wrote this aaages ago and forgot to publish it ... I'm no longer going to the Mitchell library every day.