Part I - Data import

1. Creating a new dataframe

Part II - Data processing

1. Peak Finding

1.1 Peak Finding Function

1.2 Peak Finding Example Plot

2. Algorithm Explained (Pseudo)

Below the main algorithm of finding overlapping peaks can be found. It is chosen to find common peaks between 1 activity of two municipalities and 1 covid data of two muncipalities. As it is interesting to see if peaks overlap in other areas.

The input data is the activity/covid data column that will be researched. Also the peaks found are used as input and the provinces of interest.

The algorithm starts with taking the first peak within province 1 and applying a offset to the date of this peak. Then the peaks of province 2 are compared with the offsetted date. If the condition results in True, we can append the index to the common indexes list for this activity/covid data. If we run this for all province 2 data we have compared the first province 1 peak (with date offset) with all province 2 peaks. We can now continue to the second peak of province 1 and so on.

Notice that this dictionary is called peak data but this also implies valley data. As the peak dictionary will be used, which both consist of max indexes and min indexes (so valleys and peaks).

algo.png

3. Common Peak of 1 Activity and 2 Provinces

Above the function is created that finds common peaks with a certain date offset in mind. Then this function is called to find the overlapping indexes of workplace peaks for Limburg and Groningen.

The example of Limburg, Groningen and the workplaces is also plotted (with a small date range) to visualize the results. The code is ommited but the result is shown below to clarify the results. Both the Limburg workplace line and the Groningen workplace line is plotted. The indexes of the peaks (not valleys) that overlap with a date offset of two days are shown. You see that the data goes up almost equally and overlapping peaks are found.

overlap.png

4. Common Peak 1 Covid Data Between 2 Provinces

5. Common Peak Covid Data and Movement Data within Zuid Holland

5.1 Common Peak Finding

5.2 Common Peak Plotting

Part III - Data visualisation

Mobility and Hospitality

Zuid-Holland will be investigated as I'm interested in this area. It is interesting to see if there is a real relation between the activities of people and the development of COVID. As within the Netherlands a lot of decision are made based on the current covid developments in term of hospitality rates, this data is likely leading to new statements or locksdowns and the data possibility correlates. This relation will therefore be explored. This can best be done by a first initial exploration with a correlation matrix, quickly giving an overview of all the numerical correlations.

The resulting plot above is interesting, it looks like there is a negative correlation between retail/transit movements and hospitality rates as it shows a value of around -0.66 and 0.61 respectively within the correlation matrix. Therefore the relation will be plotted seperatly below, a regression plot is appropriate. We can observe the data points and a possible fitted line, giving a lot of information about the correlations. You can observe that indeed retail and transit movements show a negative correlation with hospitality rates. This is likely influenced by the opposed lockdowns during these periods, which will be investigated more thoroughly below.

Interesting is to compare the strongest correlation of retail and hospitality in seperate line graphs and see if we can discover the story behind the numbers. By plotting seperate line graphs we can see the movements of the data over time and investigate the possible realtions of these movements with COVID regulations/rules within the Netherlands.

From these graphs the story becomes clear, a steep hospitaly rate is observed half of march 2020, which is in line with news articles about the hospitaly rate during this period. This was also the period that the 'intelligent lockdown' was introduced in the Netherlands. Sport clubs closed, people where advised to stay home as much as possible and work should be done remotely. The intelligent lockdown ended around may, which can be ovserved from the decrease in hospitality rates (2020-05) and the increase in retail movements. The lockdown half of october is also clear within the retail change graph, as less movements where observed during this period. The large drop in December 2020 and January 2021 can be attributed to the hard lockdown of 12-2020, when almost all stores (except neccessary stores like supermarkets) needed to close down. These key data points are again annotated in the interactive plot below together with the data of retail movements on a weekly basis. This plot is appropriate as it allows to zoom in specific data point and cleary annotates important dates.

Sources:

Covid Hospitality and Deaths

Another interesting observation is to see that the data about people who passed away of covid is following the same curves related to hospitality rates. This indicates that indeed hospital admisions is a good indicator for new guidelines from the government as hospitality in a lot of cases can lead to more deaths within the population. As multiple lines are plotted and we want to zoom in on the graph the plot below is appropriate for this data.