{
 "endpoint": "https://otherworldlabs.com/budget-against-actual-by-line/api.json",
 "page": "https://otherworldlabs.com/budget-against-actual-by-line/",
 "what_it_answers": "For the lines a reader names, with a figure budgeted on each and a figure actually spent on each, what the difference is on every line, what that difference is as a share of that line's own budgeted figure, what the two columns come to, what the difference between the columns is, and which lines came in over. One subtraction and one division per line, with as many bases as there are lines, because a gap of forty dollars on a line of fifty and a gap of forty dollars on a line of four thousand are not one event and only the line's own base says so.",
 "shape": "A static document, not a service. There is no request to make, and nothing you type is posted anywhere: this file is the engine written out so that an agent re-doing the arithmetic gets the same answer the page gets. The page's own engine is the script with id core in the page above and returns the flat object named in outputs. One script on the page beside this file does post, and it is named here so that this description is exact about the page as well as about this file: the script with id funnel sends a stage event to events.otherworldlabs.com carrying the page path, the stage name (found, offer or checkout), a random per-visit id and, on found, the hostname the visit was referred from. It reads no field of the sheet and carries no figure the reader typed, and no output in this document is computed from it or reaches it.",
 "units": "United States dollars and percent, and counts of lines. No other unit: this engine computes no rate, no time, no weight and no length.",
 "the_page_supplies_no_figure": "Every figure in this arithmetic is the reader's own. The page carries no category list, no default split, no suggested line, no target, no acceptable range and no tolerance, it holds no typical, average or household figure for anybody, and it says nothing about what a difference means. It asks for no institution, no account number, no balance and no credential, it collects none and it stores none: there is no cookie and no web-storage call on the page at all.",
 "state": {
  "shape": "{ period, lineCount, lines: [ { name, budgeted, actual }, ... ] }",
  "lines": "An array of up to twelve lines. Only the first lineCount of them are read; a line object the array does not carry is read as a line with neither figure.",
  "lineCount_blank": "With lineCount blank or unreadable, the sheet is as long as the lines the state carries, up to twelve, and one line long when it carries none. That is how a fill of the workbook beside the page arrives here, where the rows themselves are the count.",
  "blank_is_not_zero": "A blank budgeted figure and a budgeted figure typed as nothing are two different states and this engine keeps them apart. A blank is a line no figure was set for: it adds nothing to the column total, it gets no difference and it gets no percentage. A figure typed as nothing is a figure: the line is finished, the difference is the whole of the actual figure, and no percentage exists because there is no base to divide by. The same holds of the actual figure, where a blank is a line not accounted for yet and makes the whole sheet incomplete.",
  "every_field_is_a_string_or_a_number": "Each field is read through the same reader: a blank, a whitespace-only value and anything that is not a finite number are read as that line having no figure of that kind. A dollar sign, a comma and surrounding space are stripped before the number is read.",
  "a_negative_entry": "The controls refuse a negative figure. A negative figure in a state handed to the engine directly is read as that line having no figure of that kind, which is an existing state - the blank - and not a new one.",
  "reading_at_a_limit": "min, max and step on a number control do not stop a keyboard, so every numeric field is read INSIDE the range its own control offers: a figure above the top of the range is read at the top, and lineCount is rounded and read inside 1 to 12.",
  "the_period": "A label, up to forty characters, whitespace collapsed and trimmed. No figure is computed from it. Blank is allowed and prints as a standing phrase instead of a name.",
  "a_line_name": "A label, up to forty characters, whitespace collapsed and trimmed. Blank and whitespace-only are the same state: an unnamed line that keeps its ordinal and is called by an ordinal word, never by a digit. A longer name is read as its first forty characters and comes back cut, with no marker and no sign that it was cut - the page's own control carries maxlength=40 and cannot send one, so this is reachable only in a state handed to this endpoint directly or in a fill of the workbook, and overLineNames then carries the cut label."
 },
 "inputs": [
  {
   "name": "period",
   "label": "The period, in your own words",
   "type": "text",
   "control": "period",
   "offered": {
    "maxlength": 40
   },
   "blank_means": "no period name; the sheet prints a standing phrase in its place",
   "note": "A label only. The page supplies no period of its own, because the period is the reader's."
  },
  {
   "name": "lineCount",
   "label": "How many lines are on this sheet",
   "type": "choice",
   "control": "lineCount",
   "choices": [
    "1",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9",
    "10",
    "11",
    "12"
   ],
   "offered": {
    "min": 1,
    "max": 12,
    "step": 1
   },
   "blank_means": "the sheet is as long as the lines the state carries, up to twelve",
   "note": "A select, so the range here is the range the control offers and nothing outside it is reachable from the page. A figure outside it in a state handed to the engine directly is rounded and read at the nearer end of the range."
  },
  {
   "name": "lines[i].name",
   "label": "Its name",
   "type": "text",
   "control": "lineName0 to lineName11",
   "offered": {
    "maxlength": 40
   },
   "blank_means": "an unnamed line that keeps its ordinal",
   "note": "The page names no line for the reader: it supplies no category list, no default split and no suggested line, because a template that names the categories is making a recommendation."
  },
  {
   "name": "lines[i].budgeted",
   "label": "Budgeted on it",
   "type": "money",
   "control": "lineBudgeted0 to lineBudgeted11",
   "offered": {
    "min": 0,
    "max": 1000000,
    "step": 0.01
   },
   "blank_means": "this line has no budgeted figure at all, which is not the same as a budgeted figure of nothing",
   "note": "The reader's own figure, off whatever they set at the start of the period."
  },
  {
   "name": "lines[i].actual",
   "label": "Actually spent on it",
   "type": "money",
   "control": "lineActual0 to lineActual11",
   "offered": {
    "min": 0,
    "max": 1000000,
    "step": 0.01
   },
   "blank_means": "this line is not accounted for yet, which makes the whole sheet incomplete",
   "note": "The reader's own figure, typed by hand off their own records. No field here asks for an institution, an account, a balance or a credential and none is collected."
  }
 ],
 "rounding": {
  "function": "rN(v, dp) = sign(v) * Math.round(Math.abs(v) * 10^dp) / 10^dp, on the double, with no epsilon and no decimal library.",
  "at_the_half": "Half away from zero in BOTH directions, because the absolute value is rounded and the sign is put back afterwards. At two decimals a value of -0.005 therefore comes out -0.01 and not -0.00: Math.round(-0.005 * 100) / 100 is -0 on the double, and this engine does not do that. A value of 0.005 comes out 0.01.",
  "what_is_rounded": "Each typed money figure is read at the cent as it comes in, which is the step the controls offer. Each line's difference is rounded to the cent. Each line's percentage is rounded to one decimal, taken on the magnitude of the already-rounded difference over the already-rounded budgeted figure. The two column totals are added from the already-rounded line figures and rounded again to the cent, and the difference between the columns is the subtraction of those two rounded totals, rounded to the cent.",
  "why_it_is_said_here": "An assistant that re-does this arithmetic the other way round - taking a percentage on unrounded figures, or differencing unrounded totals - will disagree with the page in the last cent and the last decimal, and the workbook sold beside the page is checked against the page's own figures at half a cent, so the order above is the engine and not a detail."
 },
 "formulas": {
  "lineNDifference": "lineNActual less lineNBudgeted, rounded to the cent, and only where that line carries both figures. Zero otherwise.",
  "lineNSharePct": "abs(lineNDifference) / lineNBudgeted x 100, rounded to one decimal, and only where that line carries both figures AND its budgeted figure is above nothing. Zero otherwise, which the page never prints as a percentage: it prints that the line has none.",
  "the_direction_word": "A line's difference above nothing prints the word over, below nothing prints under, and exactly nothing prints level. The percentage carries that word too, so it is printed as a magnitude and is never printed negative.",
  "budgetedTotal": "the sum of the budgeted figures the lines carry, rounded to the cent. A line with no budgeted figure adds nothing. null while waiting is true.",
  "actualTotal": "the sum of the actual figures the lines carry, rounded to the cent. A line with no actual figure adds nothing. null while waiting is true.",
  "totalDifference": "actualTotal less budgetedTotal, rounded to the cent. null while waiting is true. The page prints its magnitude with its own direction word.",
  "overLineCount": "the count of lines whose difference is above nothing. null while waiting is true. underLineCount and levelLineCount are the other two directions, counted the same way.",
  "no_total_percentage": "There is no percentage on the two column totals, and none is computed. The page's whole difference from a column of totals is that every percentage it prints is read on one line's own budgeted figure, so a percentage on a sum of bases is a figure this engine does not have."
 },
 "completeness": {
  "a_line_is_finished": "when it carries both figures: a budgeted figure and an actual figure, each of them read as a figure rather than as a blank.",
  "the_sheet_is_incomplete": "while no line carries either figure, or while any line carries a budgeted figure with its actual figure still untyped, or while any row of the declared count carries neither figure. That is waiting. The third condition was added at S12 on 2026-10-25: without it a four-line sheet with one line filled and three rows untouched read as finished and printed a confident column total off one line, which is the ordinary first minute of a multi-line form.",
  "what_that_withholds": "Four figures: both column totals, the difference between them, and the count of the lines that came in over. They are null here and the page prints the words not yet in their place, with the sentence that says what the sheet is still waiting for - how many lines are without an actual figure, and how many rows of the declared count carry neither figure yet - printed in the glance above them. The working block's three column rows are dashed in the same states.",
  "what_it_does_not_withhold": "Each finished line's own difference and percentage, which lineNDifference and lineNSharePct report whatever the line beside them is missing, because a row whose own two figures are both typed is finished in itself. Also the counts of the states the sheet keeps apart, which are what name what is missing.",
  "a_line_with_no_budgeted_figure_is_not_a_waiting_state": "A line carrying an actual figure and no budgeted figure does NOT withhold anything. Nothing about it is unfinished: its actual figure is added into the actual column, nothing of it is added into the budgeted column, it gets no difference and no percentage, and it is named. noBudgetLineCount reports it."
 },
 "states": [
  {
   "state": "a line over",
   "reached_when": "its difference is above nothing",
   "printed": "the magnitude of the difference with the word over, and that magnitude on its own budgeted figure as a percentage with that word too"
  },
  {
   "state": "a line under",
   "reached_when": "its difference is below nothing",
   "printed": "the magnitude with the word under, never as nothing, never hidden and never softened, and the percentage on that line's own budgeted figure"
  },
  {
   "state": "a line level with its budgeted figure",
   "reached_when": "its difference is exactly nothing and its budgeted figure is above nothing",
   "printed": "nothing with the word level, and a percentage of nothing with the word level. A printed state of its own, not an empty cell."
  },
  {
   "state": "a line budgeted at nothing with spending on it",
   "reached_when": "its budgeted figure is a figure of exactly nothing and its actual figure is a figure of any size, a figure of exactly nothing included. This sentence said 'above nothing' until S12 on 2026-10-25 and the engine has always read it as zeroBaseLineCount below reads it: a figure typed in the actual column, whatever its size",
   "printed": "the difference, which is the whole of the actual figure, and in the percentage column the words that say it has none, because there is no base to divide by. sharePct is zero here and the page does not print it."
  },
  {
   "state": "a line with spending and no budgeted figure at all",
   "reached_when": "its budgeted figure is blank and its actual figure is a figure",
   "printed": "no difference and no percentage, and a sentence naming the line. Its actual figure is in the actual column total and nothing of it is in the budgeted column total."
  },
  {
   "state": "a line whose actual figure is not typed yet",
   "reached_when": "its budgeted figure is a figure and its actual figure is blank",
   "printed": "no difference and no percentage on that line, and every headline figure held back, with a sentence in the glance saying how many lines are in this state."
  },
  {
   "state": "a sheet with nothing typed in the actual column",
   "reached_when": "no line carries an actual figure",
   "printed": "no difference anywhere and no total at all. Where some line carries a budgeted figure this is also a waiting state; where no line carries either figure the sheet is empty and says so."
  }
 ],
 "outputs": [
  {
   "name": "lineCount",
   "type": "integer",
   "of": "the number of line rows this sheet reads, 1 to 12. The count the control offers, clamped into that range; with lineCount blank it is the number of line objects the state carries, up to twelve, and one if it carries none."
  },
  {
   "name": "accountedLineCount",
   "type": "integer",
   "of": "how many of those rows carry at least one of the two figures. A row with neither is not accounted for and nothing of it is added into either column."
  },
  {
   "name": "completeLineCount",
   "type": "integer",
   "of": "how many rows carry both figures. These are the rows that print a gap and, where their budgeted figure is above nothing, a percentage."
  },
  {
   "name": "incompleteLineCount",
   "type": "integer",
   "of": "how many rows carry a budgeted figure with the actual figure still untyped. Above nothing, this withholds every headline figure; it is one of the two states that do, the other being emptyLineCount."
  },
  {
   "name": "noBudgetLineCount",
   "type": "integer",
   "of": "how many rows carry an actual figure and no budgeted figure at all. These rows print no gap and no percentage and are named rather than smoothed over; this does NOT withhold the headline figures."
  },
  {
   "name": "zeroBaseLineCount",
   "type": "integer",
   "of": "how many rows carry a budgeted figure of exactly nothing beside an actual figure, of whatever size and a figure of nothing included. These rows print a gap and no percentage, because there is no base to divide by. Where the actual figure is itself nothing the gap is nothing, and nothing went out on that row: no sentence on the page says spending did."
  },
  {
   "name": "emptyLineCount",
   "type": "integer",
   "of": "how many rows of the declared count carry neither figure. Above nothing, this withholds every headline figure: a row nobody has reached yet is a row the sheet is waiting for."
  },
  {
   "name": "budgetedTotal",
   "type": "money or null",
   "of": "the budgeted figures typed, added and rounded to the cent. null while the sheet is incomplete. A blank adds nothing."
  },
  {
   "name": "actualTotal",
   "type": "money or null",
   "of": "the actual figures typed, added and rounded to the cent. null while the sheet is incomplete. A blank adds nothing."
  },
  {
   "name": "totalDifference",
   "type": "money or null",
   "of": "actualTotal less budgetedTotal, rounded to the cent, signed: above nothing means the period took more than was set. null while the sheet is incomplete."
  },
  {
   "name": "overLineCount",
   "type": "integer or null",
   "of": "how many finished rows have a difference above nothing. null while the sheet is incomplete."
  },
  {
   "name": "underLineCount",
   "type": "integer or null",
   "of": "how many finished rows have a difference below nothing. null while the sheet is incomplete."
  },
  {
   "name": "levelLineCount",
   "type": "integer or null",
   "of": "how many finished rows have a difference of exactly nothing. null while the sheet is incomplete."
  },
  {
   "name": "overLineNames",
   "type": "string",
   "of": "the labels of the rows counted in overLineCount, joined by a semicolon and a space. The empty string while the sheet is incomplete, and the empty string when no row is over. A row nobody named is labelled by its ordinal word, never by a digit."
  },
  {
   "name": "waiting",
   "type": "boolean",
   "of": "true while the sheet is incomplete: true when accountedLineCount is nothing, or when incompleteLineCount is above nothing, or when emptyLineCount is above nothing. Every null above is null exactly when this is true."
  },
  {
   "name": "line1Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 1, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line1Actual",
   "type": "money",
   "of": "the actual figure typed on line 1, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line1Difference",
   "type": "money",
   "of": "line 1's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line1SharePct",
   "type": "percent",
   "of": "the magnitude of line 1's difference divided by line 1's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line2Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 2, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line2Actual",
   "type": "money",
   "of": "the actual figure typed on line 2, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line2Difference",
   "type": "money",
   "of": "line 2's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line2SharePct",
   "type": "percent",
   "of": "the magnitude of line 2's difference divided by line 2's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line3Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 3, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line3Actual",
   "type": "money",
   "of": "the actual figure typed on line 3, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line3Difference",
   "type": "money",
   "of": "line 3's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line3SharePct",
   "type": "percent",
   "of": "the magnitude of line 3's difference divided by line 3's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line4Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 4, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line4Actual",
   "type": "money",
   "of": "the actual figure typed on line 4, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line4Difference",
   "type": "money",
   "of": "line 4's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line4SharePct",
   "type": "percent",
   "of": "the magnitude of line 4's difference divided by line 4's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line5Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 5, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line5Actual",
   "type": "money",
   "of": "the actual figure typed on line 5, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line5Difference",
   "type": "money",
   "of": "line 5's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line5SharePct",
   "type": "percent",
   "of": "the magnitude of line 5's difference divided by line 5's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line6Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 6, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line6Actual",
   "type": "money",
   "of": "the actual figure typed on line 6, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line6Difference",
   "type": "money",
   "of": "line 6's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line6SharePct",
   "type": "percent",
   "of": "the magnitude of line 6's difference divided by line 6's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line7Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 7, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line7Actual",
   "type": "money",
   "of": "the actual figure typed on line 7, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line7Difference",
   "type": "money",
   "of": "line 7's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line7SharePct",
   "type": "percent",
   "of": "the magnitude of line 7's difference divided by line 7's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line8Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 8, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line8Actual",
   "type": "money",
   "of": "the actual figure typed on line 8, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line8Difference",
   "type": "money",
   "of": "line 8's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line8SharePct",
   "type": "percent",
   "of": "the magnitude of line 8's difference divided by line 8's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line9Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 9, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line9Actual",
   "type": "money",
   "of": "the actual figure typed on line 9, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line9Difference",
   "type": "money",
   "of": "line 9's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line9SharePct",
   "type": "percent",
   "of": "the magnitude of line 9's difference divided by line 9's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line10Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 10, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line10Actual",
   "type": "money",
   "of": "the actual figure typed on line 10, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line10Difference",
   "type": "money",
   "of": "line 10's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line10SharePct",
   "type": "percent",
   "of": "the magnitude of line 10's difference divided by line 10's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line11Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 11, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line11Actual",
   "type": "money",
   "of": "the actual figure typed on line 11, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line11Difference",
   "type": "money",
   "of": "line 11's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line11SharePct",
   "type": "percent",
   "of": "the magnitude of line 11's difference divided by line 11's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  },
  {
   "name": "line12Budgeted",
   "type": "money",
   "of": "the budgeted figure typed on line 12, read inside the range the control offers and rounded to the cent. Zero where that line has no budgeted figure and zero where the line is past lineCount: this field does not distinguish a blank from a figure typed as nothing, and noBudgetLineCount and emptyLineCount are what do."
  },
  {
   "name": "line12Actual",
   "type": "money",
   "of": "the actual figure typed on line 12, read the same way. Zero where that line has no actual figure and zero where the line is past lineCount."
  },
  {
   "name": "line12Difference",
   "type": "money",
   "of": "line 12's actual figure less its budgeted figure, rounded to the cent, signed, and zero where that line is not finished. It is reported whatever the rest of the sheet is waiting for, because a row whose own two figures are both typed is finished in itself."
  },
  {
   "name": "line12SharePct",
   "type": "percent",
   "of": "the magnitude of line 12's difference divided by line 12's own budgeted figure, times a hundred, rounded to one decimal. Zero where that line is not finished and zero where its budgeted figure is nothing, because no percentage exists against a base of nothing; the page prints that it has none rather than printing this zero, and zeroBaseLineCount is what tells the two apart. It has no ceiling: a line spent at three times its budgeted figure reads 200.0."
  }
 ],
 "worked_example": {
  "why": "three lines worked end to end, one in each direction, because an agent needs one state worked through. Every figure below is this engine's own answer for the state above it.",
  "state": {
   "period": "Jul to Sep",
   "lineCount": 3,
   "lines": [
    {
     "name": "hall hire",
     "budgeted": 300,
     "actual": 240
    },
    {
     "name": "print",
     "budgeted": 50,
     "actual": 50
    },
    {
     "name": "",
     "budgeted": 50,
     "actual": 90
    }
   ]
  },
  "outputs": {
   "line1Difference": -60.0,
   "line1SharePct": 20.0,
   "line2Difference": 0.0,
   "line2SharePct": 0.0,
   "line3Difference": 40.0,
   "line3SharePct": 80.0,
   "budgetedTotal": 400.0,
   "actualTotal": 380.0,
   "totalDifference": -20.0,
   "overLineCount": 1,
   "underLineCount": 1,
   "levelLineCount": 1,
   "overLineNames": "The third line, unnamed",
   "accountedLineCount": 3,
   "completeLineCount": 3,
   "incompleteLineCount": 0,
   "waiting": false
  },
  "read_it_back": "240.00 less 300.00 is -60.00, printed as $60.00 under, and 60.00 / 300.00 x 100 is 20.0% under. 50.00 less 50.00 is 0.00, printed as $0.00 level, and 0.00 / 50.00 x 100 is 0.0% level. 90.00 less 50.00 is 40.00, printed as $40.00 over, and 40.00 / 50.00 x 100 is 80.0% over. The columns add to 400.00 budgeted and 380.00 actually spent, and 400.00 less 380.00 is 20.00, printed as $20.00 under. One line came in over and it is the one nobody named, so it is labelled by its ordinal word."
 },
 "second_worked_example": {
  "why": "the four states this engine must not smooth over, one state each",
  "zero_base": {
   "state": {
    "lineCount": 1,
    "lines": [
     {
      "name": "hall hire",
      "budgeted": 0,
      "actual": 120.5
     }
    ]
   },
   "outputs": {
    "line1Difference": 120.5,
    "line1SharePct": 0.0,
    "zeroBaseLineCount": 1,
    "budgetedTotal": 0.0,
    "actualTotal": 120.5,
    "totalDifference": 120.5,
    "waiting": false
   },
   "note": "120.50 less 0.00 is 120.50, printed as $120.50 over. No percentage exists against a base of nothing: line1SharePct is reported as zero here and the page prints the words that say the line has none. zeroBaseLineCount is the field that tells this apart from a line whose share really is nothing."
  },
  "no_budgeted_figure": {
   "state": {
    "lineCount": 1,
    "lines": [
     {
      "name": "hall hire",
      "budgeted": null,
      "actual": 120.5
     }
    ]
   },
   "outputs": {
    "line1Difference": 0.0,
    "line1SharePct": 0.0,
    "noBudgetLineCount": 1,
    "budgetedTotal": 0.0,
    "actualTotal": 120.5,
    "totalDifference": 120.5,
    "waiting": false
   },
   "note": "No difference and no percentage: there is no budgeted figure to take one from. The actual figure is in actualTotal and nothing is in budgetedTotal, so totalDifference is the whole of it. This is NOT a waiting state, which is why every total above is a figure."
  },
  "the_actual_column_empty": {
   "state": {
    "lineCount": 2,
    "lines": [
     {
      "name": "hall hire",
      "budgeted": 300,
      "actual": null
     },
     {
      "name": "   ",
      "budgeted": 50,
      "actual": null
     }
    ]
   },
   "outputs": {
    "budgetedTotal": null,
    "actualTotal": null,
    "totalDifference": null,
    "overLineCount": null,
    "incompleteLineCount": 2,
    "waiting": true
   },
   "note": "Nothing has been spent yet or nothing has been recorded yet. No difference and no total prints at all, and the glance says two lines are still without an actual figure."
  },
  "the_other_way": {
   "state": {
    "lineCount": 1,
    "lines": [
     {
      "name": "print",
      "budgeted": 50,
      "actual": 150
     }
    ]
   },
   "outputs": {
    "line1Difference": 100.0,
    "line1SharePct": 200.0,
    "overLineCount": 1,
    "budgetedTotal": 50.0,
    "actualTotal": 150.0,
    "totalDifference": 100.0,
    "waiting": false
   },
   "note": "A line spent at three times its budgeted figure reads 200.0% over. The percentage has no ceiling, because capping it at a hundred would print a false figure."
  }
 },
 "limits": [
  "This is arithmetic on figures the reader typed and nothing else. It is not financial advice, it recommends nothing, and it supplies no rule, no percentage as a target, no debt ordering, no typical or average figure, no acceptable range and no tolerance.",
  "It makes no judgement about a difference. It prints a signed figure and names the lines whose figure fell one way, and it does not say whether that is good, bad, on track or under control.",
  "It holds no credit, loan, mortgage, insurance, investment, retirement or tax figure and makes no statement about any of them.",
  "It supplies no category list, no default split and no suggested line. Every line name, both figures on every line and the period are typed by the reader.",
  "There is no percentage on the two column totals and none is computed: every percentage this engine prints is read on one line's own budgeted figure.",
  "Twelve lines is the most it reads, and a million dollars a figure is the top of each control's range.",
  "It reads nothing in from anywhere, stores nothing, sends nothing a reader typed and asks for no institution, account, balance or credential. The one thing the page does send is the stage event named under shape, which carries no field of the sheet and no figure."
 ]
}
