Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to user stats page #6241

Closed
ramyaragupathy opened this issue Feb 12, 2024 · 7 comments · Fixed by #6269
Closed

Changes to user stats page #6241

ramyaragupathy opened this issue Feb 12, 2024 · 7 comments · Fixed by #6269
Assignees
Labels
Milestone

Comments

@ramyaragupathy
Copy link
Member

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
Copy link
Member Author

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

cc @royallsilwallz @manjitapandey @kaditya97 @varun2948

@manjitapandey
Copy link

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

@ramyaragupathy
Copy link
Member Author

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

@ramyaragupathy
Copy link
Member Author

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

image

@ramyaragupathy ramyaragupathy changed the title Changes to user stats section to show added/modified/deleted count Changes to user stats page Feb 27, 2024
royallsilwallz added a commit to naxa-developers/tasking-manager that referenced this issue Feb 29, 2024
…unts

- Create `DetailedStatsCard` component in `statsCard.js`
- Fetch new ohsomeNow stats end points for /topics using react query
- Related to hotosm#6241
royallsilwallz added a commit that referenced this issue Mar 5, 2024
@ramyaragupathy
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

ramyaragupathy commented Mar 19, 2024

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

@ramyaragupathy ramyaragupathy added this to the v4.7.1 milestone Mar 21, 2024
royallsilwallz added a commit that referenced this issue Mar 25, 2024
…unts

- Create `DetailedStatsCard` component in `statsCard.js`
- Fetch new ohsomeNow stats end points for /topics using react query
- Related to #6241
royallsilwallz added a commit that referenced this issue Mar 25, 2024
royallsilwallz added a commit that referenced this issue Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants