finish writing the basic data process of view counts by time period