From 03e7eb219a53c713c926f453732493d294ae17d1 Mon Sep 17 00:00:00 2001 From: Julia Kent <46687291+jukent@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:58:01 -0600 Subject: [PATCH] add back map and files --- .github/workflows/write-metrics-md.py | 9 ++++++--- portal/metrics.md | 1 + portal/metrics/user_metrics.json | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 portal/metrics.md create mode 100644 portal/metrics/user_metrics.json diff --git a/.github/workflows/write-metrics-md.py b/.github/workflows/write-metrics-md.py index dc20e3fc..27c9dd21 100644 --- a/.github/workflows/write-metrics-md.py +++ b/.github/workflows/write-metrics-md.py @@ -1,7 +1,7 @@ import json -def process_user_data(json_file, top_pages, this_year, md_file): +def process_user_data(json_file, top_pages, this_year, map, md_file): with open(json_file, 'r') as f: user_data = json.load(f) @@ -21,8 +21,10 @@ def process_user_data(json_file, top_pages, this_year, md_file): f.write(table) f.write('\n\n') - f.write(f'![Top Pages]({top_pages})\n\n') f.write(f'![Users this Year]({this_year})\n\n') + f.write(f'![Top Pages]({top_pages})\n\n') + f.write(f'![Users by Country]({map})\n\n') + f.close() @@ -31,5 +33,6 @@ def process_user_data(json_file, top_pages, this_year, md_file): json_file = 'portal/metrics/user_metrics.json' top_pages = 'metrics/toppages.png' this_year = 'metrics/thisyear.png' + map = 'metrics/bycountry.png' md_file = 'portal/metrics.md' - process_user_data(json_file, top_pages, this_year, md_file) + process_user_data(json_file, top_pages, this_year, map, md_file) diff --git a/portal/metrics.md b/portal/metrics.md new file mode 100644 index 00000000..b05321b8 --- /dev/null +++ b/portal/metrics.md @@ -0,0 +1 @@ +# Metrics diff --git a/portal/metrics/user_metrics.json b/portal/metrics/user_metrics.json new file mode 100644 index 00000000..57a123c7 --- /dev/null +++ b/portal/metrics/user_metrics.json @@ -0,0 +1 @@ +{"Now": "", "Portal": "0K", "Foundations": "0K", "Cookbooks": "0K"}