Code Explainers

Code explainers tagged #time-series

rust
use chrono::{DateTime, Duration, Utc};
 
#[derive(Debug, Clone)]
pub struct Sample {

Forward-filling a time series in Rust

time-series forward-fill btreemap
Intermediate 7 steps
java
public List<DailySample> backfillMissingDates(List<DailySample> samples, double fillValue) {
    if (samples.isEmpty()) {
        return List.of();
    }

Backfilling gaps in a daily time series in Java

streams time-series treemap
Intermediate 5 steps
php
<?php
 
namespace App\Services;
 

Computing rolling averages in Laravel

rolling-average date-ranges collections
Intermediate 8 steps