Python?

by

in

He started his COVID project with NetLogo as a workbench because he deals with something that can only be understood as a complex dynamic network. That may be the case, but to be able to emulate something like that meaningfully, you need to know a lot about it. And pictures of simple timelines are a big help. NetLogo can handle that, but there are a few barriers, especially if the COVID sample spreads around the world during the ride and continues to evolve.

Then it may be obvious to want something that can produce such timelines at will. For combinations of countries, periods and data sources of choice. Python (embedded in Anaconda’s Jupyter) is much more suitable for this than NetLogo.

He mastered Python’s eco-system enough to work with it at the level required. After all, he had been building computer programs since 1969, and the wonderful thing about Python is that the language still ties in seamlessly with the principles that Donald Knuth propagated in the first three volumes of his 1970s The art of computer programming.

It is useful for Python users to be interested in how elementary processes and data structures are handled. On that basis a crushing collection of building blocks has emerged. This is mainly intended for researchers and designers who need ad hoc computing power. Many glossy applications and games have been developed with it. He used Python to make comparisons between COVID-19 timelines.

An example is in fig. 1, which provides three timelines per jurisdiction, for six jurisdictions (NLD, BEL, USA, IND, KOR and NZL). The lines themselves are harmonized, they give numbers per million inhabitants. Because the numbers in Fig. 1 are difficult to read without enlarging the graphs, he presents a few numbers in a table:

CodepopulationTd.TdpM.DcpM.DdpM.
NLD17,134,8739,4535522681.58
BEL11,589,61616,6451436648.46
USA331,002,647268,0458094773.54
IND1,380,004,385137,621100230.35
KOR5,126,9185261090.00
NZL4,822,23325510.00
Table with a few numbers to compare six jurisdictions

He had previously looked at country differences. In the table, two jurisdictions are selected from the previously recognized policy brands. Belgium and the Netherlands represent the anti-cyclical approach, the US and India the fragmented approach and South Korea and New Zealand the controlling. (Td. = The total number of COVID deaths in a country, TdpM is that number per million, DcpM is the number of newly recorded infections per million yesterday and DdpM is the number of newly recordd COVID deaths per million yesterday.) In comparison with the size of the population, the last three columns are harmonized and calculated back to numbers per million (of a population).

The table suggests, for example, is that Belgium is doing considerably worse than the USA in terms of total number of COVID deaths per million, but that today’s number of infections (per million) is much better. That could be a signal that counter-cyclical policy is has been fiercely turned on of late. Plots are useful to see confirm (or falsify) such suggestions.

Fig. 1 Harmonized (per million) time-tines for six jurisdictions

Timelines as in Fig. 1 are useful for recognizing structure in the dynamics of and approaches by jurisdictions, the table is useful to compare the medical effectiveness of the different political realities. Timeline data is also suitable for testing insights about the medical properties of the virus, for example by checking whether the ratio of the number of COVID deaths versus the number of positive tests (if only people with symptoms have been tested) is constant at any fixed interval. He will look at that later.