-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor usability checks for internal and external use
- Loading branch information
Showing
18 changed files
with
2,985 additions
and
2,977 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
{ | ||
"nbformat": 4, | ||
"nbformat_minor": 0, | ||
"metadata": { | ||
"colab": { | ||
"provenance": [], | ||
"toc_visible": true | ||
}, | ||
"kernelspec": { | ||
"name": "python3", | ||
"display_name": "Python 3" | ||
} | ||
}, | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"## Usability analysis" | ||
], | ||
"metadata": { | ||
"id": "s75VrpzLRNkx" | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"Use this section to perform a usability analysis of the dataset, to identify if a publisher has the necessary fields to calculate 71 procurement indicators related to Market Opportunity (Market description, Competition, supplier performance), value for money, internal efficiency, public integrity and service delivery. For OCDS publisher it also calculates the proportion of unique procedures for which it is possible to calculate the indicator (coverage).\n", | ||
"\n", | ||
"The usability checks includes all the indicators listed on [OCP's use case guide](https://docs.google.com/spreadsheets/d/1j-Y0ktZiOyhZzi-2GSabBCnzx6fF5lv8h1KYwi_Q9GM/edit#gid=1183427361) and the [Indicators to diagnose the performance of a\n", | ||
"procurement market document](https://docs.google.com/document/d/1vSJk9-qWSTQEx9ZZc7BUhQZMHvTRcyDYVS2sl8HB__k/edit#heading=h.nrnq1ajwwpqe)." | ||
], | ||
"metadata": { | ||
"id": "pSR2il4VRPmJ" | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"Generate a list of the fields published:" | ||
], | ||
"metadata": { | ||
"id": "HTkFw9jajocD" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"fields_list, fields_table = get_fields_list_and_table(file_name)" | ||
], | ||
"metadata": { | ||
"id": "MgZ3TsCOjozN" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"indicators_dic = get_indicators_dictionary(fields_list)\n", | ||
"result = usability_checks(fields_list, indicators_dic)" | ||
], | ||
"metadata": { | ||
"id": "xrxFlHz9Hk48" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"### Export and visualize results" | ||
], | ||
"metadata": { | ||
"id": "Fvej9yl_H5oE" | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Choose language of the export" | ||
], | ||
"metadata": { | ||
"id": "QaMrXgqBH-nD" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"lang = get_usability_language_select_box()\n", | ||
"lang" | ||
], | ||
"metadata": { | ||
"id": "GVZIlbRaIAFc" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Load use case indicators spreadsheet" | ||
], | ||
"metadata": { | ||
"id": "EBmaz2VRITHf" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [ | ||
"result_final = check_usability_indicators(lang.value, result)" | ||
], | ||
"metadata": { | ||
"collapsed": false | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Table of results" | ||
], | ||
"metadata": { | ||
"id": "sbcQgxItIodv" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"result_final" | ||
], | ||
"metadata": { | ||
"id": "hMJH_IpAIm9V" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Save the table to a spreadsheet" | ||
], | ||
"metadata": { | ||
"id": "3001zqj9IxHF" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"save_dataframe_to_sheet(result_final, \"usability table\")" | ||
], | ||
"metadata": { | ||
"id": "Qxb5b7wsI0GM" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Visualize results" | ||
], | ||
"metadata": { | ||
"id": "krRQKM35I1GH" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"plot_usability_indicators(result_final, lang.value)" | ||
], | ||
"metadata": { | ||
"id": "3tW-Q8-uJC89" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
{ | ||
"nbformat": 4, | ||
"nbformat_minor": 0, | ||
"metadata": { | ||
"colab": { | ||
"provenance": [], | ||
"toc_visible": true | ||
}, | ||
"kernelspec": { | ||
"name": "python3", | ||
"display_name": "Python 3" | ||
} | ||
}, | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"## Usability analysis" | ||
], | ||
"metadata": { | ||
"id": "s75VrpzLRNkx" | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"Use this section to perform a usability analysis of the dataset, to identify if a publisher has the necessary fields to calculate 71 procurement indicators related to Market Opportunity (Market description, Competition, supplier performance), value for money, internal efficiency, public integrity and service delivery. For OCDS publisher it also calculates the proportion of unique procedures for which it is possible to calculate the indicator (coverage).\n", | ||
"\n", | ||
"The usability checks includes all the indicators listed on [OCP's use case guide](https://docs.google.com/spreadsheets/d/1j-Y0ktZiOyhZzi-2GSabBCnzx6fF5lv8h1KYwi_Q9GM/edit#gid=1183427361) and the [Indicators to diagnose the performance of a\n", | ||
"procurement market document](https://docs.google.com/document/d/1vSJk9-qWSTQEx9ZZc7BUhQZMHvTRcyDYVS2sl8HB__k/edit#heading=h.nrnq1ajwwpqe)." | ||
], | ||
"metadata": { | ||
"id": "pSR2il4VRPmJ" | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"Generate a list of the fields published:" | ||
], | ||
"metadata": { | ||
"id": "HTkFw9jajocD" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"fields_list, fields_table = get_fields_list_and_table(file_name)" | ||
], | ||
"metadata": { | ||
"id": "MgZ3TsCOjozN" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"indicators_dic = get_indicators_dictionary(fields_list)\n", | ||
"result = usability_checks(fields_list, indicators_dic)\n", | ||
"result[\"coverage\"] = get_coverage(indicators_dic)" | ||
], | ||
"metadata": { | ||
"id": "xrxFlHz9Hk48" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"### Export and visualize results" | ||
], | ||
"metadata": { | ||
"id": "Fvej9yl_H5oE" | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Choose language of the export" | ||
], | ||
"metadata": { | ||
"id": "QaMrXgqBH-nD" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"lang = get_usability_language_select_box()\n", | ||
"lang" | ||
], | ||
"metadata": { | ||
"id": "GVZIlbRaIAFc" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Load use case indicators spreadsheet" | ||
], | ||
"metadata": { | ||
"id": "EBmaz2VRITHf" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [ | ||
"result_final = check_usability_indicators(lang.value, result)" | ||
], | ||
"metadata": { | ||
"collapsed": false | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Table of results" | ||
], | ||
"metadata": { | ||
"id": "sbcQgxItIodv" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"result_final" | ||
], | ||
"metadata": { | ||
"id": "hMJH_IpAIm9V" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Most common fields for indicators" | ||
], | ||
"metadata": { | ||
"id": "LXRG5Di4JTC6" | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"This table shows the most frequent fields used to calculate indicators and if they are published. You can use this table to highlight to the publisher the key data gaps. " | ||
], | ||
"metadata": { | ||
"id": "dU4jyCZyJaqx" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"fields_count = most_common_fields_to_calculate_indicators(indicators_dict, fields_table)" | ||
], | ||
"metadata": { | ||
"id": "XZVErXpYJXxV" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Save tables to spreadsheet" | ||
], | ||
"metadata": { | ||
"id": "3001zqj9IxHF" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"save_dataframe_to_sheet(result_final, \"usability table\")\n", | ||
"save_dataframe_to_sheet(fields_count, \"key fields\")" | ||
], | ||
"metadata": { | ||
"id": "Qxb5b7wsI0GM" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"#### Visualize results" | ||
], | ||
"metadata": { | ||
"id": "krRQKM35I1GH" | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"plot_usability_indicators(result_final, lang.value)" | ||
], | ||
"metadata": { | ||
"id": "3tW-Q8-uJC89" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
} | ||
] | ||
} |
Oops, something went wrong.