refactor weekly_statistics for calculate statistics
adding the power condition calculation