Skip to content

Commit

Permalink
calculate_coverage: update table names in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
duncandewhurst committed Mar 9, 2022
1 parent dc59ff1 commit 1accafc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ocdskingfishercolab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,23 +377,23 @@ def calculate_coverage(fields, scope=None, sql=True, sql_only=False):
`fields` is a list of fields to measure the coverage of, specified using JSON Pointer.
To specify fields that are children of the scope table, you can use either an absolute pointer or a relative
pointer prefixed with `:`, e.g. if `scope` is set to 'awards', then `awards/value/amount` and `:value/amount`
pointer prefixed with `:`, e.g. if `scope` is set to 'awards_summary', then `awards/value/amount` and `:value/amount`
refer to the same field. Coverage of such fields is measured against the number of rows in the `scope` table.
To specify fields that are not children of the scope table, use an absolute path,
e.g. `tender/procurementMethod`. Coverage of such fields is measured against the number of releases/records.
For arrays, a field is counted if it appears in **any** object in the array,
e.g. if `scope` is set to `awards` and `field` is set to `:items/description`,
e.g. if `scope` is set to `awards_summary` and `field` is set to `:items/description`,
at least one item must have a description for the coverage to be non-zero.
To specify that a field must appear in **all** objects in the array, prepend the field with `ALL `,
e.g. if `scope` is set to `awards` and `field` is set to `ALL :items/description`,
e.g. if `scope` is set to `awards_summary` and `field` is set to `ALL :items/description`,
all items must have a description for the coverage to be non-zero.
If `scope` is set to `awards`, specify fields on related contracts by prefixing the path with `:contracts/`,
If `scope` is set to `awards_summary`, specify fields on related contracts by prefixing the path with `:contracts/`,
e.g. to measure how many awards have a value and a related contract with a period, set `scope` to `awards`
and `fields` to `[':value', ':contracts/period']`. Similarly, if `scope` is set to `contracts`, specify fields
and `fields` to `[':value', ':contracts/period']`. Similarly, if `scope` is set to `contracts_summary`, specify fields
on related awards by prefixing the path with `:awards/`.
Expand Down

0 comments on commit 1accafc

Please sign in to comment.