Questions about Dataverse categories/Metrics API - bySubject

48 views
Skip to first unread message

Yan Na Cheng

unread,
May 21, 2025, 11:10:58 PM5/21/25
to Dataverse Users Community
Hi All, I am new and dummy user of dataverse. Hope any experts could answers my questions.

1. Display Dataverse categories in navigation bar

Currently, only 5 Dataverse Categories(Research Project, Department, Journal, Researcher, Research Group) could be displayed on root page. Actually, There are 6 Categories containing dataverses in our site. How to add "Show more" to make all dataverses findable?

2. Metrics API - by Subject

When I try to    curl http://localhost:8080/api/info/metrics/dataverses/bySubject
The subject and count returned null liked this  : subject,count 

May I know the potential reasons and solutions?

Joanna Cheng
EOII, Research Data Management Team
Research Support and Scholarly Communication 
Run Run Shaw Library
City University of Hong Kong

Alfredo Cosco

unread,
May 22, 2025, 4:37:12 AM5/22/25
to Dataverse Users Community
Hello,

Il giorno giovedì 22 maggio 2025 alle 05:10:58 UTC+2 Yan Na Cheng ha scritto:
Hi All, I am new and dummy user of dataverse. Hope any experts could answers my questions.

1. Display Dataverse categories in navigation bar

Currently, only 5 Dataverse Categories(Research Project, Department, Journal, Researcher, Research Group) could be displayed on root page. Actually, There are 6 Categories containing dataverses in our site. How to add "Show more" to make all dataverses findable?


I'm not pretty sure but I suppose you refer to the facettes on the left column of the page, the "Show more" link should appear automatically if the sixth category is valued, if there is no associated content it is not taken into consideration.

Philip Durbin

unread,
May 22, 2025, 9:47:05 AM5/22/25
to dataverse...@googlegroups.com
Hi Joanna,

Right, only the first five facets are shown but there should be a "More" button to see the rest. Please see https://demo.dataverse.org for example.

For bySubject, here's how it looks on demo:

curl https://demo.dataverse.org/api/info/metrics/dataverses/bySubject
subject,count
"Social Sciences",274
"Agricultural Sciences",242
"Arts and Humanities",208
"Computer and Information Science",182
"Other",168
"Medicine, Health and Life Sciences",161
"Engineering",125
"Earth and Environmental Sciences",108
"Business and Management",88
"Chemistry",80
"Astronomy and Astrophysics",59
"Physics",45
"Mathematical Sciences",29
"Demo Only",27
"Law",24
"N/A",12

I hope this helps!

Phil

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dataverse-community/b654c7bc-480a-4c7d-81c0-28c6d022afc7n%40googlegroups.com.


--

Yan Na Cheng

unread,
May 23, 2025, 12:28:01 AM5/23/25
to Dataverse Users Community
HI Alfred & Phil,

Thank you so much for the prompt help! Yes, I am referring to the facet in the left column of the page. I noticed that the host (root) Dataverse was counted as one of the Dataverses. Since the root Dataverse is categorized in a group that only contains itself, it cannot be displayed in the left column. It's okay now. Thank you!

For the Subject metrics, I can successfully grab data from demo , and return below response


curl https://demo.dataverse.org/api/info/metrics/dataverses/bySubject
subject,count
"Social Sciences",274
"Agricultural Sciences",242
"Arts and Humanities",208
"Computer and Information Science",182
"Other",168
"Medicine, Health and Life Sciences",161
"Engineering",125
"Earth and Environmental Sciences",108
"Business and Management",88
"Chemistry",80
"Astronomy and Astrophysics",59
"Physics",45
"Mathematical Sciences",29
"Demo Only",27
"Law",24
"N/A",12

but for our own dataverse site, since it is not yet published, I try to curl by local server. The status is ok. but the data is null. I believe that there is no "Subject" field for a Dataverse collection. So, I want to know whether only datasets (with subjects assigned) are published in the Dataverse, the Subject count of the Dataverse return data? (in my site, there is no dataset was published)

curl -H "Accept: application/json" http://localhost:8080/api/info/metrics/dataverses/bySubject
{"status":"OK","data":[]}
Reply all
Reply to author
Forward
0 new messages