IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
878 stars 489 forks source link

Metadata Topic Classification as Facets: where we display these two fields as concatenated so we would show the Term and the Vocabulary in parentheses. Ex. 1 (Generations) #2160

Closed sbarbosadataverse closed 8 years ago

sbarbosadataverse commented 9 years ago

Eleni spoke with Phil about this and explained to him that this is expected UI behavior since we are just showing the Topic Classification Term field and not also showing the Topic Classification Vocabulary field right next to it which provides some context as to what the "1" means.

One solution would be to have this show like it did in 3,6 where we display these two fields as concatenated so we would show the Term and the Vocabulary in parentheses. Ex. 1 (Generations). This will need to be a ticket in Github for development to review and see if it can be implemented.

pdurbin commented 9 years ago

@scolapasta just put this in 4.3 but I assume that's for an estimate of how much work this will be, not necessarily a working implementation. I'm not sure this is an easy fix.

pdurbin commented 8 years ago

I don't have an estimate yet but in looking at this issue I have a couple questions:

Question 1

I can see that https://dataverse.harvard.edu/dataverse/mra has the "Topic Classification Term" facet enabled but what other dataverses have this facet enabled? Screenshot below.

murray_research_archive_dataverse_-_2015-10-30_11 14 54

Question 2

How do dataverses other than the Murray us the "Topic Classification" metadata field? Can I have some links to some example datasets?

Here's how the Murray uses the "Topic Classification" metadata field:

screen shot 2015-10-30 at 11 17 18 am

At http://dx.doi.org/10.7910/DVN/28530 here's how BARI uses the "Topic Classification" metadata field:

methane_emissions_from_natural_gas_infrastructure_and_use_in_the_urban_region_of_boston _massachusetts_-_boston_regional_atmospheric_measurement_network_dataverse_-_2015-10-30_11 19 14

Developer Comments

I don't think we want any special cases of Murray in the code. I'm not sure how I would distinguish between the "1" used in the Murray vs. "Atmospheric Science" used by BARI.

To reproduce this locally, it's handy to import the DDI file from http://hdl.handle.net/1902.1/00012 that's part of this commit: 49dd844.

/cc @sbarbosadataverse @posixeleni @scolapasta @suenjedt

mercecrosas commented 8 years ago

This might be more a curation question for @sbarbosadataverse and @posixeleni before we figure out if there are code implications.

mercecrosas commented 8 years ago

OK, missed the beginning of the issue. Of course, this is not a special case for Murray code. This for any topic classification.

pdurbin commented 8 years ago

I can see that https://dataverse.harvard.edu/dataverse/mra has the "Topic Classification Term" facet enabled but what other dataverses have this facet enabled?

@kcondon provided me with the list below! Thanks!

pdurbin commented 8 years ago

@scolapasta in 03cc7eb I started exploring the idea of turning "1" into "1 (Generations)" but I hit a roadblock on how to get the data out. Probably you or @sekmiller will have a better idea of where the data is so I'm giving this to you to give me some hints if you still want to go down that path. Please check out that commit and let me know what you think.

Otherwise, it's potentially a curation issue if the Murray dataverse is using the "Topic Classification" metadata field in some suboptimal way. Here's the current help text:

pdurbin commented 8 years ago

@scolapasta and I met and he explained what to do. In 5763950 I pushed a fix. Here's the javadoc:

/**
 * If the "Topic Classification" has a "Vocabulary", return both the "Term"
 * and the "Vocabulary" with the latter in parentheses. For example, the
 * Murray Research Archive uses "1 (Generations)" and "yes (Follow-up
 * permitted)".
 */
private String getTopicClassificationTermOrTermAndVocabulary(...

I tried to figure out a way to write a unit test for this but I'm not sure how because there's so much reliance on the relationships between the entity (database) objects.

Passing to QA. I think this is what people want. The javadoc above explains the new logic.

kcondon commented 8 years ago

So, testing that when topic classification term facet is enabled it displays term (vocabulary) where available. Will also test combinations of above.

kcondon commented 8 years ago

OK, works:

Topic Classification Term 1 (vocab term 1) (1) 2 (vocab term 2) (1) 3 (1)

for data: term: 1 vocab: vocab term 1 term: 2 vocab: vocab term 2 term: 3 vocab: term: vocab: vocab term 4

kcondon commented 8 years ago

@pdurbin Weird. When I pushed to an instance running a copy of production db, do not see correct behavior for Murray dv.

kcondon commented 8 years ago

Ok, found out this requires reindexing to work. Should add to release planning doc. New ds will work.

kcondon commented 8 years ago

This also worked on copy of production db after reindex for Murray. Closing.

pdurbin commented 8 years ago

Now that this is in production, the "Topic Classification Term" term in the MRA looks nice (compare with https://github.com/IQSS/dataverse/issues/2160#issuecomment-152556315 ):

murray_research_archive_dataverse_-_2015-12-16_17 02 02