DataONEorg / metrics-service

An efficient database and REST API for delivering aggregated data set metrics to clients.
Apache License 2.0
2 stars 1 forks source link

Issues with metrics aggregated by country #93

Open rushirajnenuji opened 1 year ago

rushirajnenuji commented 1 year ago

ESS DIVE team reported issues with metrics query aggregated by country

rushirajnenuji commented 1 year ago

Metrics query:

metrics_request_query_json = {"metricsPage": {"total": 0, "start": 0, "count": 0},
                                      "metrics": ["downloads"],
                                      "filterBy": [{"filterType": "repository", "values": ["urn:node:ESS_DIVE"],
                                                    "interpretAs": "list"},
                                                   {"filterType": "month",
                                                    "values": [DOWNLOADS_STARTING_DATE,
                                                               self.end_date.replace("-", "/")],
                                                    "interpretAs": "range"}],
                                      "groupBy": ["month", "country"]}