You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(radar): clarify positional mapping for dateRange filter arrays and 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.
Copy file name to clipboardExpand all lines: apps/radar/src/radar.context.ts
+50-3Lines changed: 50 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -44,17 +44,64 @@ This server provides tools powered by the Cloudflare Radar API for global Intern
44
44
45
45
## Making Comparisons
46
46
47
-
Many tools support **array-based filters** for comparisons. Each array index corresponds to a distinct data series.
48
-
Example: Compare HTTP traffic between Portugal and Spain over the last 7 days:
47
+
Many tools support **array-based filters** for comparisons. Filter arrays (location, asn, continent, geoId) map **positionally** to dateRange arrays - each array index corresponds to a distinct data series.
48
+
49
+
### Cross-Location Comparison (Same Time Period)
50
+
Compare HTTP traffic between Portugal and Spain over the last 7 days:
49
51
- \`dateRange: ["7d", "7d"]\`
50
52
- \`location: ["PT", "ES"]\`
51
53
52
-
## Geographic Filtering
54
+
Result: \`summary_0\` = Portugal (7d), \`summary_1\` = Spain (7d)
55
+
56
+
### Time Period Comparison (Same Location)
57
+
Compare Portugal bandwidth this week vs last week:
58
+
- \`dateRange: ["7d", "7dcontrol"]\`
59
+
- \`location: ["PT", "PT"]\` *(repeat the location for each dateRange)*
Filter arrays must match the length of dateRange for consistent filtering. If you provide fewer filter values than dateRange values, unmatched periods default to worldwide/unfiltered data.
65
+
66
+
**Correct** (comparing Portugal across time periods):
Use \`summary/*\` dimensions (e.g., \`summary/browser\`) for snapshots and \`timeseriesGroups/*\` (e.g., \`timeseriesGroups/browser\`) for trends over time.
0 commit comments