Description
Sum duration for selectedTerritory and its supported subset, dividing or returning zero with defined false for no selected duration.
Cross-source records often use different labels, time spans, and support conventions. Exact equality and overlap checks describe the supplied metadata; they do not prove that sources measure the same social or geographic concept.
Sum duration for selectedTerritory and its supported subset, dividing or returning zero with defined false for no selected duration.
When to use this tool
Use Public Territory Period Share when you need a literal source comparison or coverage diagnostic.
How to use the tool and how it works
- Enter territoryIds, durations, sourceValid, selectedTerritory. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read territoryDuration, supportedDuration, share, defined. Inspect defined before interpreting the associated values.
Require aligned territoryIds, nonnegative durations, and sourceValid flags. Sum duration for selectedTerritory and its supported subset, dividing or returning zero with defined false for no selected duration.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| territoryIds | Territory Ids | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| durations | Durations | Required. Array of finite number; minimum 0; maximum items 256. |
| sourceValid | Source Valid | Required. Array of boolean; maximum items 256. |
| selectedTerritory | Selected Territory | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| territoryDuration | Territory Duration | Required. Finite number. |
| supportedDuration | Supported Duration | Required. Finite number. |
| share | Dimensionless share on the numerator and denominator basis stated above. | Required. Finite number. |
| defined | Whether the stated denominator or normalization exists; inspect before interpreting a zero placeholder. | Required. Boolean. |
{
"input": {
"territoryIds": [
"A",
"A",
"B"
],
"durations": [
2,
3,
5
],
"sourceValid": [
true,
false,
true
],
"selectedTerritory": "A"
},
"output": {
"territoryDuration": 5,
"supportedDuration": 2,
"share": 0.4,
"defined": true
}
} Limitations and assumptions
- Support is duration weighted and supplied flags are not verified; the result does not authenticate territorial status, source interpretation, or geographic continuity.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Inspect the original source definitions and collection methods. Harmonize conceptual scope and timing before treating matching labels or overlapping records as comparable evidence.
References
Similar or alternative tools
- Country Series Valid Period Share
Count expected records and the valid expected subset, returning their ratio or zero with defined false for no expected records.
- Territory Code Effective Gap
Return queriedAt-start and end-queriedAt and test start-inclusive/end-exclusive active membership.