From c7f99608958adf90189af3b297ef03d81c553c68 Mon Sep 17 00:00:00 2001 From: "dotasek.dev" Date: Mon, 22 Apr 2024 15:50:16 -0400 Subject: [PATCH] Add generated CSV and table generator --- .../generate-i18n-coverage-table.py | 33 +++++++++++++++++++ i18n-coverage.csv | 5 +++ 2 files changed, 38 insertions(+) create mode 100644 .azure/i18n-coverage-table/generate-i18n-coverage-table.py create mode 100644 i18n-coverage.csv diff --git a/.azure/i18n-coverage-table/generate-i18n-coverage-table.py b/.azure/i18n-coverage-table/generate-i18n-coverage-table.py new file mode 100644 index 000000000..ae4e40501 --- /dev/null +++ b/.azure/i18n-coverage-table/generate-i18n-coverage-table.py @@ -0,0 +1,33 @@ +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt + +#make this example reproducible +np.random.seed(0) + +#define figure and axes +fig, ax = plt.subplots() + +#hide the axes +fig.patch.set_visible(False) +ax.axis('off') +ax.axis('tight') + +#read data +df = pd.read_csv('i18n-coverage.csv') +#create table +table = ax.table(cellText=df.values, colLabels=df.columns, loc='center') + +#display table +fig.tight_layout() +#plt.show() + +ax.set_title('Loss by Disaster') + +fig = plt.gcf() + + +plt.savefig('pyplot-table-original.png', + bbox_inches='tight', + dpi=150 + ) \ No newline at end of file diff --git a/i18n-coverage.csv b/i18n-coverage.csv new file mode 100644 index 000000000..a078a0a1e --- /dev/null +++ b/i18n-coverage.csv @@ -0,0 +1,5 @@ +Locale,Complete #,Complete % +de,860,78% +es,731,66% +ja,910,82% +nl,853,77%