Skip to content

Comments

feat(radar): clarify positional mapping for filter arrays and dimension types#274

Merged
andre-j3sus merged 1 commit intomainfrom
ajesus/radar
Jan 8, 2026
Merged

feat(radar): clarify positional mapping for filter arrays and dimension types#274
andre-j3sus merged 1 commit intomainfrom
ajesus/radar

Conversation

@andre-j3sus
Copy link
Collaborator

Summary

  • Fix documentation gap that caused incorrect data comparisons when using dateRange with filter arrays
  • Add explanation of dimension types (timeseries, summary, timeseriesGroups) to help users choose the right response format

Problem

When using multiple dateRange values (e.g., ["7d", "7dcontrol"]) with a single filter value (e.g., location: ["IR"]), the API returns worldwide data for unmatched periods instead of the expected filtered data. This led to incorrect analysis conclusions.

Root cause: Filter arrays map positionally to dateRange arrays. A single location value only filters the first period; subsequent periods default to worldwide.

Solution

Improved documentation in two places:

  1. Parameter descriptions (apps/radar/src/types/radar.ts): Added "IMPORTANT" notes to DateRangeArrayParam, LocationArrayParam, AsnArrayParam, ContinentArrayParam, and GeoIdArrayParam explaining positional mapping behavior.
  2. Base instructions (apps/radar/src/radar.context.ts):
    • Expanded "Making Comparisons" section with correct/incorrect examples
    • Added new "Dimension Types" section explaining timeseries vs summary vs timeseriesGroups

Testing

Verified that an LLM correctly uses location: ["IR", "IR"] when asked to compare Iran's bandwidth between this week and last week.

…nd dimension types

Improve documentation to explain that filter arrays (location, asn,
continent, geoId) map positionally to dateRange arrays. When comparing
time periods for the same location, users must repeat the filter value
for each dateRange element, otherwise unmatched periods default to
worldwide data.
Also adds documentation for dimension types (timeseries, summary,
timeseriesGroups) and includes ASN in filtering options.
@andre-j3sus andre-j3sus self-assigned this Jan 8, 2026
@devandrepascoa
Copy link

lgtm

@andre-j3sus andre-j3sus merged commit ac8ea3d into main Jan 8, 2026
6 checks passed
@andre-j3sus andre-j3sus deleted the ajesus/radar branch January 8, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants