// adding a comment
$data2 = navigate parent-child descendants from ferc:MonthlyTransmissionSystemPeakLoadLineItems role
"http://ferc.gov/form/2020-01-01/roles/Schedule/F1/ScheduleMonthlyTransmissionSystemPeakLoad" returns list (target-name);
$systemsList = set({covered @concept in $data2 @ferc:NameOfTransmissionSystemAxis = *}.dimensions-typed().values);
$systemsUnique1 = sum($systemsList).to-list;
$systemsUnique = if $systemsUnique1.length == none
list("Enter System")
else
$systemsUnique1
$members = navigate parent-child descendants from ferc:MonthDomain role
"http://ferc.gov/form/2020-01-01/roles/Schedule/F1/ScheduleMonthlyTransmissionSystemPeakLoad" returns list (target-name, preferred-label, order);
$data = navigate parent-child descendants from ferc:MonthlyTransmissionSystemPeakLoadLineItems role
"http://ferc.gov/form/2020-01-01/roles/Schedule/F1/ScheduleMonthlyTransmissionSystemPeakLoad" where $relationship.target.name != ferc:NameOfSystem returns list (target, preferred-label, order);
$allSystems = list(for $system in $systemsUnique
$monthlyOutput = list(
for $row in $members
$concept=taxonomy().concept($row[1]);
$row_num = (filter $concept.references("http://ferc.gov/form/2020-01-01/roles/reference/formLocation") where ($item.part-by-name(ferc-part:Schedule).part-value == "400 - Schedule - Monthly Transmission System Peak Load" and $item.part-by-name(ferc-part:ValueType).part-value.string == "Label")).to-list;
$rowID = if ($row_num.part-by-name(ferc-part:Row)).length > 0
($row_num.part-by-name(ferc-part:Row))[1].part-value
else
"";
$abstractLabel = list($rowID.number, $concept.label($row[2].role.uri).text);
$dataRow1 = list(for $y in $data
if list([covered @concept = $y[1].name @ferc:NameOfTransmissionSystemAxis = $system @ferc:MonthAxis = $row[1] @unit @period = $currentDuration]).length > 0
first(list([covered @concept = $y[1].name @ferc:NameOfTransmissionSystemAxis = $system @ferc:MonthAxis = $row[1] @unit @period = $currentDuration]))
else
none);
$abstractLabel + $dataRow1
);
$total = list(list(17,taxonomy().concept(ferc:MonthDomain).label("http://ferc.gov/form/2020-01-01/roles/label/F1Total").text) + list(for $t in $data
if list([covered @concept = $t[1].name @ferc:NameOfTransmissionSystemAxis = $system @unit @period = $currentDuration]).length > 0
first(list([covered @concept = $t[1].name @ferc:NameOfTransmissionSystemAxis = $system @unit @period = $currentDuration]))
else
none
));
list(list(0,"NAME OF SYSTEM: " + $system.string,none,none,none,none,none,none,none,none,none,none)) + $monthlyOutput + $total
);
for $system in $allSystems
for $rowl in $system.sort
if $rowl[1] == 0 none else $rowl[1]
if $rowl[1] == 0 "data-heading" else ""
1
|
$rowl[2]
if $rowl[1] == 0 "data-heading" else ""
January
|
$rowl[4]
if $rowl[1] == 0 "data-heading" else ""
300,000
|
$rowl[5]
if $rowl[1] == 0 "data-heading" else ""
7
|
$rowl[6]
if $rowl[1] == 0 "data-heading" else ""
1300
|
$rowl[7]
if $rowl[1] == 0 "data-heading" else ""
13,000,000
|
$rowl[8]
if $rowl[1] == 0 "data-heading" else ""
14,000,000
|
$rowl[9]
if $rowl[1] == 0 "data-heading" else ""
15,000,000
|
$rowl[10]
if $rowl[1] == 0 "data-heading" else ""
16,000,000
|
$rowl[11]
if $rowl[1] == 0 "data-heading" else ""
17,000,000
|
$rowl[12]
if $rowl[1] == 0 "data-heading" else ""
18,000,000
|