Question: PYTHON! I need a python code that computes a 1D histogram out of the date data. From the entries, observe that the date is represented

PYTHON!

I need a python code that computes a 1D histogram out of the date data. From the entries, observe that the date is represented as yyyy.mm.dd (day, month, and year) and the the data covers the earthquakes in between 02.12.2021 and 18.12.2021 (both included). Including the starting and the ending dates, our data covers 17 days in total.

Your first task is to count how many earthquakes per day and find the most active day in this interval. To build the histogram, you will allocate a bin for each day, i.e. the bin size will be one day. In the next step, you will count the number of earthquakes for each day. You can start from a list of zeros where the first index corresponds to the number of earthquakes that happened in 02.12.2021, the second index corresponds to 03.12.2021 and so on. After counting all of the entries in the date list, the resulting histogram should be as follows:

[3, 56, 45, 53, 53, 33, 53, 44, 37, 36, 25, 37, 35, 32, 51, 41, 42]

The most active day is in the second index with 56 earthquakes, which correponds to the date 2021-12-03.

Please note that using Python's DateTime library is allowed.

Final remark: Your code should work with ANY date/time range, not just the dates in the given example.

Here is the date list :

['2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.18', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.17', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.16', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.15', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.14', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.13', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.12', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.11', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.10', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.09', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.08', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.07', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.06', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.05', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.04', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.03', '2021.12.02', '2021.12.02', '2021.12.02']

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!