Changes to user stats page
ramyaragupathy opened this issue · 7 comments
User stats section under my contributions page has to be redesigned to accommodate added/modified/deleted count. ohSome stats source already provides this information.
cc @manjitapandey @varun2948 @royallsilwallz @kaditya97
Updated query and results from ohsome stats for user contributions section:
query: curl 'https://int-stats.now.ohsome.org/api/topic/poi,highway,building,waterway/user?userId=996790' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.7,de-DE;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'Referer: https://tasks.hotosm.org/' -H 'Content-Type: application/json' -H 'Authorization: Basic vimHickomEifothPeHoc2QuidesHeds9' -H 'Origin: https://tasks.hotosm.org/' -H 'DNT: 1' -H 'Sec-GPC: 1' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: cross-site' -H 'TE: trailers'
response:
{
"result": {
"poi": {
"topic": "poi",
"added": 0.0,
"modified": {
"count_modified": 2
},
"deleted": 0.0,
"value": 0.0,
"userId": 996790
},
"highway": {
"topic": "highway",
"added": 232.32,
"modified": {
"count_modified": 295,
"unit_more": 94.326,
"unit_less": -40.807
},
"deleted": -67.66,
"value": 218.179,
"userId": 996790
},
"building": {
"topic": "building",
"added": 1922.0,
"modified": {
"count_modified": 218
},
"deleted": 97.0,
"value": 1825.0,
"userId": 996790
},
"waterway": {
"topic": "waterway",
"added": 22.424,
"modified": {
"count_modified": 30,
"unit_more": 9.288,
"unit_less": -0.874
},
"deleted": 0.0,
"value": 30.838,
"userId": 996790
}
},
"attribution": {
"url": "https://ohsome.org/copyrights",
"text": "\u00a9 OpenStreetMap contributors"
},
"metadata": {
"executionTime": 120,
"requestUrl": "/api/topic/poi,highway,building,waterway/user?userId=996790",
"apiVersion": "0.1"
},
"query": {
"timespan": {
"startDate": "1970-01-01T00:00:00Z",
"endDate": "2024-02-08T11:18:31Z"
},
"topics": [
"poi",
"highway",
"building",
"waterway"
],
"userId": 996790
}
}
All metadata related information shared by HeiGIT:
-
value -> the current summary numbers, e.g. for waterways: Δ Waterways [km] = Waterways-created + Waterways-modified-longer - Waterways-modified-shorter - Waterways-deleted
-
unit_more -> for length (e.g. waterways/roads) or area (currently only LU/LC) based aggregations only. E.g. for waterways this is the Waterways-modified-longer part
-
unit_less -> similar to unit_more, so for waterways it is the Waterways-modified-shorter part
The UI for updating statistics on my contribution page.
cc: @royallsilwallz , @ramyaragupathy
We will include the POIs, waterways since the new deployment will have this information available.
Per discussion with the team, we will have the stats section to show addition/subtraction of length and method used to derive at final count.
Can you also please update the tooltip text with a link to about section of ohsome Now website? we are also good to remove the missing field will be updated soon
part of the text.
These statistics come from <a href = 'https://stats.now.ohsome.org/about' > ohsomeNow Stats </a> and were last updated at Mar 18, 2024, 8:08 AM (Asia/Kolkata).
Per input from @royallsilwallz moving the info content to a footer note right below the cards would be helpful - These statistics come from ohsomeNow Stats and were last updated at Mar 18, 2024, 8:08 AM (Asia/Kolkata).
@manjitapandey to help with design inputs on the right text placement.