Skip to content

[R] Test result data transformation functions #240

@Amasus

Description

@Amasus

Part of #235. Depends on #237.

Tests for functions that transform solver output data in `graph_functions.R` and `regression_functions.R`.

A minimal fixture result data.table should be added to `helper.R` (from #237) matching the column schema of the `residence_distances`, `edes`, and `precinct_distances` output files.

Functions to cover:

  • `set_results_column_names()` — column present, column absent (no-op)
  • `ede_with_pop()` — correct population scaling calculation
  • `demographically_weighted_distances()` — weighted distance computation
  • `bg_data()` — density and percentage columns added correctly; NULL input with historic flag returns NULL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions