## hierarchy – Display suggestions for hierarchical checkbox lists (trees)

I’m working on a web-app for a document management system where employees upload documents and associate them with metadata. In many cases, we are able to predict certain metadata properties and we would like to suggest those predictions to the user.

For normal text-input fields, this is not a problem as we simply use auto-suggest. However, a lot of times, we do not use text-input fields but hierarchical checkbox lists (see image below).

We are unable to find a satisfactory method to display suggestions in these cases.

Assume the following fictional scenario: We are a manufacturing company. At the end of each day, every employee uploads a short work-report. After uploading the document, the employees have to select the machine(s) they were working with:

Now comes the challenge: From the working plan we actually know that on 26.05.2020, James Smith is supposed to work with the CNC Machine. However, we also know that he was working with another machine in Manufacturing Plant XX for the last days.

We would like to suggest both machines to him while still giving him the possibility to pick every other machine.

• ### Solution 1: Auto-select button

Add a button that automatically selects the n most likely nodes when clicked.

• Con’s:
• Not really a suggestion
• The value for n is not clear
• Users have to de-select wrong suggestions
• ### Solution 2: Suggestion dialog

Add a button that opens another dialog from which the user can pick suggested nodes.

• Pro’s:
• Gives the users the ability to pick the right suggestions
• Con’s:
• Opens a dialog on top of a dialog
• Distracts the workflow
• ### Solution 3: Highlight the suggested nodes

Highlight the suggested nodes and expand their parent-nodes to make them visible.

• Pro’s:
• Relatively subtle
• Does not distract the users too much
• Con’s:
• Could be unclear for the users
• Does not reduce the number of clicks for the users
• ### Solution 4: Auto-suggest in the filter

Add auto-suggest to the filter text-input.

• Pro’s:
• Does not distract the user
• Con’s:
• Only available if the user uses the filter
• Requires the most interaction

Does anybody know a good solution for problems like this?

## hierarchical clustering – How to attach label to dendrogram in Python

I have difficulty in labeling a dendrogram, I keep having error message each time I try.
here is my code:
```import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline```

``````import scipy.cluster.hierarchy as shc
plt.figure(figsize=(20, 50))
plt.title("Dendrograms")
dend = shc.dendrogram(shc.linkage(df, method='ward'), leaf_font_size=12, orientation='right', labels=Country)
``````

Error:

``````ValueError                                Traceback (most recent call last)
<ipython-input-95-2310a4d5ca2d> in <module>
2 plt.figure(figsize=(20, 50))
3 plt.title("Dendrograms")
----> 4 dend = shc.dendrogram(shc.linkage(df, method='ward'), leaf_font_size=12, orientation='right', labels='Country')

~Anaconda3libsite-packagesscipyclusterhierarchy.py in linkage(y, method, metric, optimal_ordering)
1040         raise ValueError("Invalid method: {0}".format(method))
1041
-> 1042     y = _convert_to_double(np.asarray(y, order='c'))
1043
1044     if y.ndim == 1:

~Anaconda3libsite-packagesscipyclusterhierarchy.py in _convert_to_double(X)
1562 def _convert_to_double(X):
1563     if X.dtype != np.double:
-> 1564         X = X.astype(np.double)
1565     if not X.flags.contiguous:
1566         X = X.copy()

ValueError: could not convert string to float: 'USA'
``````

There are 12 features in the df and I want to label the dendrogram using Country names. But if I drop Country without specifying labels it will plot using 0, 1, 2,…,n in instead of the country names since it was not specified. But if I specify the labels and include Country in the df I have the above error. How do I go about it please

## php – Hierarchical taxonomy list with transformated links

I have two functions displaying a term list of the selected taxonomy:

First function:

``````\$terms = get_the_terms(get_the_ID(), 'MY_TAXONOMY');
if (!is_wp_error(\$terms) && !empty(\$terms)) {
foreach (\$terms AS \$term) {
\$name = \$term->name;
}
}
``````

Second function:

``````    global \$post;
\$taxonomy = 'MY_TAXONOMY';
\$terms = wp_get_post_terms( \$post->ID, \$taxonomy, array( "fields" => "ids" ) );
if( \$terms ) {
echo '<?ul>';
\$terms = trim( implode( ',', (array) \$terms ), ' ,' );
wp_list_categories( 'title_li=&taxonomy=' . \$taxonomy . '&include=' . \$terms );
echo '<?/ul>';
}

``````

The first one ignores the hierarchy, but transforms the links as I need, i.e. so that they lead to queries of the WP’s Facet Plugin. I understand that this line is key here:

``````\$link = add_query_arg('fwp_typ', FWP()->helper->safe_value(\$term->slug), 'https://www.MYWEBSITE.com/');

``````

The second one includes the hierarchy, but the links don’t lead where I would like. How do I make this second function transform links like the first one?

## hierarchy – A hierarchical process

Let's say we have a system that you can modulate a process and track its status and the tasks being performed.
1. The process includes upper level group name steps
2. Each step can contain groups (no more than two nested groups)
3. Each stage or group can contain one or more tasks executed sequentially or in parallel

Which view would you use to create such a process: map, left pane tree structure + main grid, tree grid or whatever?

## lists – Presentation of hierarchical data at 3 levels

I'm reorganizing an existing desktop website user interface. I have to show 3 levels of hierarchical data. There are categories that contain parents (with various properties) which in turn contain children (also with various properties).

I don't want this presentation but I can't think of anything better. I could put each level in a separate page and use a breadcrumb as navigation but there is a bit of movement between the levels (parents can be moved to different categories and children can be moved to different parents ).

Ideas?

Cheers

## categories – WordPress speed: hierarchical vs non-hierarchical taxonomies?

I'm in the process of creating a site that will eventually host thousands of messages, all of the same type of personalized "Artwork" message.

Each blog post is assigned multiple custom taxonomy terms, such as "Artist", "Project", "Art Director", "Format" and more.

I have read that too many taxonomies and / or terms can slow the page down. So I don't know if I should build a structure with many non-hierarchical taxonomies, or with only one or two hierarchical taxonomies but more terms and child terms.

Many taxonomies, mostly non-hierarchical:

`````` • Artist Taxonomy (non-hierarchical): 1000s of terms (1 per post)
• Formats Taxonomy (hierarchical):
– Formats Terms: 4 terms (1 per post)
–Format Child-Terms: 15 terms (1 per post)
• Projects Taxonomy (non-hierarchical): 100s of terms (1 per post)
• Artdirectors Taxonomy (non-hierarchical) 100s of terms (1 per post)
• Genres Taxonomy (non-hierarchical): 20 terms (1-3 per post)
• Collections Taxonomy (hierarchical):
– Collections Terms: 50 terms (0-1 per post)
- Collection Child-Terms: 100-200 terms (0-5 per post)
• Publisher Taxonomy (non-hierarchical): 30-40 terms (0-1 per post)
``````

against.

Less taxonomies, but hierarchical:

`````` • Artist Taxonomy (non-hierarchical): 1000s of terms (1 per post)
• Meta/Collections Taxonomy (hierarchical):
– Formats Terms: 4 terms (1 per post)
–Format Child-Terms: 15 terms (1 per post)
– Projects Term:
– Project Child-Terms: 100s of child-terms (1 per post)
– Genres Term:
– Genre Child-Terms: 20 child-terms (1-3 per post)
– Artdirectors Term:
– Artdirector Child-Terms: 100s of child-terms (1 per post)
– Collections Term:
– Collection Child-Terms: 50 terms (0-1 per post)
– Collection Grandchild: 100-200 grandchild-terms (0-5 per post)
– Publisher Term:
– Publisher Child-Terms: 30-40 child-terms (0-2 per post)
``````

Is there any advantage / disadvantage of either of these two structures with regard to website speed? I fear that it will become slow once thousands of messages are on the page.

## What is hierarchical linking in Seo?

The idea is that you can create an authority and pass the PageRank to your web page by creating and creating mass hierarchical links, with your web page at the end of the chain.

## Hierarchical migration taxonomy terms with the same terms (without unique identifier)

Currently I am working on a product migration via an XML file. The products are available in different coatings and colors.
The hierarchical color taxonomy should look like this:

``````Coating Group Name 1
- RAL 1015
- RAL 1025
- RAL 9007

Coating Group Name 2
- RAL 1015
- RAL 3007
- RAL 9007
``````

The problem is that if I import them as a taxonomy, the duplicate RAL colors go to the last parent and it looks like this after importing:

``````Coating Group Name 1
- RAL 1025

Coating Group Name 2
- RAL 1015
- RAL 3007
- RAL 9007
``````

The source identifiers of the import of taxonomy are based on the name of taxonomy. So not unique.
I have also tried to use two identifiers like this to import the taxonomy colors:
ids:
term_parent:
type: chain
term_name:
type: chain

So I have two fields, sourceid1 and sourceid2 in the migration table. Then I get the right hierarchical color taxonomy.
But then I have a problem importing taxonomies into the node of my product.

Thank you!

## gui design – Display a hierarchical dataset in a digestible format

I have a dataset that uses the hierarchy and the distribution of categories, subcategories and labels which each have a value:

``````Category 1:
Sub-Category 1:
Label 1: 4
Label 2: 3
Sub-Category 2:
Label 2: 2
Label 3: 5
Category 2:
Sub-Category 3:
Label 1: 6
Label 2: 2
Label 3: 4
``````

My goal is to design an interface that shows the distribution of categories and gives the user the ability to view and check all the values ​​in the hierarchy. The data that we mainly use as a step for another process, so the fewer clicks there are to display all the necessary information (Label level), the better. It is expected that there will be between 1 and 5 rows in each nested group, but the largest categories may have ~ 10 subcategories.

Currently, I have a table that shows each category with nested rows for ventilation. To make it easier for the user to view the structure, I have added styles when the user hovers over a group to highlight its content. Here is an example with placeholder data:

Do you have any ideas on alternative formats or ways to improve my current design?

## closures – What languages ​​can effectively define hierarchical class APIs?

Please kindly suggest a better place to ask this question, if any.

Are there strictly typed languages ​​where I can type something like that …

``````def Person(Name Name, Age Age)
def Name(string First, string Last)
def Full = First + ' ' + Last
def Age(Date born, Date? died) =>
Died ?? Date.Today - Born
``````

And the next test would pass?

``````val person = Person(("Mark", "Twain"), ((1835, 11, 30), (1910, 04, 21)));
Assert(Person.Name("Mark", "Twain"), person.Name)
Assert("Mark", person.Name.First)
Assert("Twain", person.Name.Last)
Assert("Mark Twain", person.Name.Full)
Assert(74, person.Age.Years);
``````