Created the completeness function. At board level it returns a sentence listing the boards that had SMR01 completeness < 95% (or returns a sentence saying they were all >= 95%) and at scotland level it returns Scotland's completeness as a percentage. Works for the two most recent quarters in the spreadsheet.
Added a value qtr_start to the setup_environment script. Will be used for completeness and the qtr functions. It's the first day of the latest quarter of data to feature in the current publication. I know we're treating a re-run of May's publication as the 'current' publication at the moment, and for that publication it would be set to 2018-10-01. The SMR completeness spreadsheet has been updated with the data for January-March 2019 though, and to automate the function I had to make it rely on the first day of the most recent quarter, which in its case is 2019-01-01. Won't matter when it comes to running the August publication, but just something to be aware of for now.
Added tests for completeness and a helper file to calculate the correct value of first_day at any given time, so that the tests don't break when the spreadsheet is updated in the future.
A few small, pretty insignificant changes to the documentation and/or tests for pub_date and the qtr functions.
Finally, at long last, it's ready.
completeness
function. Atboard
level it returns a sentence listing the boards that had SMR01 completeness < 95% (or returns a sentence saying they were all >= 95%) and atscotland
level it returns Scotland's completeness as a percentage. Works for the two most recent quarters in the spreadsheet.qtr_start
to thesetup_environment
script. Will be used forcompleteness
and theqtr
functions. It's the first day of the latest quarter of data to feature in the current publication. I know we're treating a re-run of May's publication as the 'current' publication at the moment, and for that publication it would be set to2018-10-01
. The SMR completeness spreadsheet has been updated with the data for January-March 2019 though, and to automate the function I had to make it rely on the first day of the most recent quarter, which in its case is2019-01-01
. Won't matter when it comes to running the August publication, but just something to be aware of for now.completeness
and a helper file to calculate the correct value offirst_day
at any given time, so that the tests don't break when the spreadsheet is updated in the future.pub_date
and theqtr
functions.