hotosm / tasking-manager

Tasking Manager - The tool to team up for mapping in OpenStreetMap
https://wiki.openstreetmap.org/wiki/Tasking_Manager
BSD 2-Clause "Simplified" License
504 stars 270 forks source link

Changes to user stats page #6241

Closed ramyaragupathy closed 6 months ago

ramyaragupathy commented 7 months ago

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
    }
}
ramyaragupathy commented 7 months ago

All metadata related information shared by HeiGIT:

cc @royallsilwallz @manjitapandey @kaditya97 @varun2948

manjitapandey commented 7 months ago

The UI for updating statistics on my contribution page. image cc: @royallsilwallz , @ramyaragupathy

ramyaragupathy commented 7 months ago

We will include the POIs, waterways since the new deployment will have this information available.

ramyaragupathy commented 7 months ago

We should be good to remove this section within the page since there is no data to show:

image
ramyaragupathy commented 6 months ago

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. image

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).

cc @royallsilwallz @manjitapandey @kaditya97

ramyaragupathy commented 6 months ago

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.

ramyaragupathy commented 6 months ago

image

In order to accommodate hyperlink to ohsomeNow stats, we are moving the info section away from mouse hover activity and keep the text at the bottom right corner