Evaluation of the Effects of the COVID-19 Lockdown on Water Consumption, v1.1.

The recent COVID-19 pandemic has forced government to implement protective and restrictive measures to contain contagion, changing people’s habits and lifestyle. This study investigates the effects of the lockdown due to the COVID-19 pandemic on water consumption with reference to a DMA in the city of Rovigo (northern Italy). Thanks to smart-meter monitoring, the hourly water consumption is available for all the users, allowing to conduct analyses at high temporal and spatial level of detail.

Content of the folder:
Hourly cumulative water consumption data (m3) are included in xlsx files in which the first row contains the date-time references, while the first column contains the serial number of the users’ meters. Specifically:
-	data (in m3) for the period 4 April – 3 May 2019 are included in dataset2019.xslx;
-	data (in L) for the period 1 February – 3 May 2020 are included in dataset2020.xslx. 

A preliminary cleaning of the data was conducted and the users to be removed are listed in the following files:
-	the txt file closed.txt contains the serial numbers’ meters of the users with no consumption or with a closed meter or subjected to a contract transfer;
-	the txt file userwithnan.txt contains the serial numbers’ meters of the users with missing or incorrect data;
-	the txt file leakage.txt contains the serial numbers’ meters of the users affected by internal leakages.

For the division in residential and commercial user, the txt file commercial.txt contains the serial numbers’ meters of all the commercial users.

Regarding the analysis of the time period with the identification of the weekdays, and weekends/holydays, the following file was used:
-	the Microsoft Excel® file day2019.xlsx and day2020.xlsx identified respectively for April 2019 and April 2020 the weekdays (with number 0) and the weekends/holidays (with number 2).

The main code reporting all the figure and the results is DataAnalysis.m.

Requirements
The code has been developed on MATLAB® R2019b and MATLAB® R2020b and requires both the Deep Learning Toolbox and the Statistics and Machine Learning Toolbox to successfully run.

How to run the tool
The main MATLAB® file to run the is DataAnalysis.m. All the previously described files are required in the same folder.