Calculate number of battery cycles
The formula is basically calculating the total charge.

Since you sampled current at 1 second intervals for the duration, it is a simple matter to calculate the integral from the formula. You simply multiply each current sample by 1 second and take the absolute value. The units will be Amp-seconds which is the same as Coulombs.

Add up all the Coulombs from the entire data set, from 1 to n seconds. That is the integral part of the formula. Then divide by the battery capacity (Qnom) in Coulombs. Then divide by 2.

Multiplying by 1 second doesn't change the number, it only changes the units from Amp to Coulomb. So in reality, all you have to do is add up the absolute value of all the current readings in your data set.

Hope that helps.