Refactored code for tracking time series and tracking emissions intensity