2,095 questions
1
vote
1
answer
1k
views
Hierarchical tree diagram in R
I am looking for an R function to build the specific type of diagram shown here. Data.tree seems promising, but I'm stuck.
My goal (shown in the image) is merely a hierarchical diagram showing counts ...
0
votes
0
answers
54
views
How to dynamically build MongoDB queries and object to return based on user input in C#?
I have a specific requirement in my .NET application, utilizing the ABP Framework, where I need to dynamically build MongoDB queries and objects based on user input. To illustrate, I've included a ...
0
votes
1
answer
142
views
Change default depth in R collapsibletree package
I have some simple hierarchical data (parent-child hierarchy) that I would like to visualize in R. I am currently using the R package "collapsibletree" but have not found a way to change the ...
0
votes
1
answer
40
views
Looking how I can populate narrative data against a hierarchy in a Power BI matrix
I have a hierarchical organisational chart against which I want to populate budget vs actual variance analysis in a Power BI report. Each level of the hierarchy has it's own narrative, the parent ...
0
votes
1
answer
487
views
How to flatten a tree into a list of objects in C#
I have an app built on Blazor and .Net6. I have a hierarchy that I need to flatten into a list of objects that I can hook up to a Telerik grid.
A simplified version of my tree looks something like ...
1
vote
1
answer
101
views
Postgres Hierarchical Aggregation at each node level
I have the following table structure in postgres
id
parent_id
balance
1
null
1000
2
1
1000
3
1
1000
4
2
1000
5
2
1000
6
3
1000
7
3
1000
8
4
1000
I would like to write a query which gives me the ...
0
votes
1
answer
406
views
Python - Parent-Child Hierarchy Recursive Structure
I am trying to form a parent to child relationship combination using data available in my pandas dataframe.
Data Example:
Parent
Child
A
B
A
C
B
D
B
C
C
D
Expected chain results:
A|B
A|C
A|B|D
A|B|C
A|...
0
votes
1
answer
97
views
Search for multiple values within the hierarchy of the same specified folder in a flat representation of a tree structure in a Postgres jsonb table
Data structure:
The table has an PK 'id' and a jsonb column 'data'. The 'data' contains an array of objects 'instances'. Each 'instance' has some values and a 'path' array. The 'path' array is a flat ...
0
votes
1
answer
110
views
Recursion in mysql filling children from parent, if parent is not null
I have a table made after joining 2 tables, which produces a recursive table. Now I want to add an extra column CalculatedDiscount and fill empty discounts from higher to lower when lower groups are ...
0
votes
1
answer
105
views
Oracle SQL get hierarchy of all children
I have a table containing elements referencing their parent.
Nodes
ID
PARENT_ID
2002
2009
2003
2009
2007
2010
2008
2010
2009
2010
2010
NULL
To get the immediate children I use
SELECT n.ID as ID, n....
0
votes
2
answers
120
views
Multiple column Tree Hierarchy (Manager, Employee) in Oracle Sql
I have an employees table as below :
EMPLOYEE_ID
FIRST_NAME
LAST_NAME
EMAIL
PHONE_NUMBER
HIRE_DATE
JOB_ID
SALARY
COMMISSION_PCT
MANAGER_ID
DEPARTMENT_ID
103
Alexander
Hunold
AHUNOLD
590.423.4567
38720
...
0
votes
1
answer
195
views
Telerik UI for ASP.NET Core TreeView - All nodes labeled 'undefined'
I am adding a Kendo TreeView to an ASP Net Core 3.1 Page. All the nodes are 'undefined'. From the picture it is trying to do the 'right' thing. Nesting is correct, expands and contracts correctly.
...
0
votes
0
answers
976
views
Flatten Parent/ Child Hierarchy in pyspark - dynamic
I'm trying to flatten my Parent/ Child Hierarchy dataset in pyspark.
This is my sample dataset -
Child
Parent
VP
CEO
Manager
VP
Senior
Manager
I want my output in the following format in pyspark -
...
0
votes
1
answer
35
views
how to write a loop query with oracle
I have this table
id
i1
i2
Y001
x1
a1
Y001
x1
a2
Y001
a1
a5
Y001
a2
a3
Y001
a3
a4
The relationship between i1 and i2 is i2 contains i1,so a1 contains x1, a5 contains a1, I want to get the final ...
1
vote
1
answer
281
views
How to create a recursive counter to find out how many parents and children have an element?
I have 2 tables.
Table with reletions and table with deals.
In my table of deals I have a list of DealID's and for them I have to find out how many parents or children they have
The scripts are here:
...
-3
votes
1
answer
73
views
Group and filter multidimensional array by date
I have a movies array that I'm trying to use to display a calendar page based on dates. Here's the array:
$movies = [
'MOVIE TITLE #1' => [
'id' => 11990,
'times' => [
...
1
vote
1
answer
65
views
Finding all possible connections between two disjoint hierarchical trees
I am looking for the best data structure to store two hierarchical trees, where my aim is to find whether all the possible connections between these two trees are covered.
I will describe my problem ...
0
votes
1
answer
86
views
Get root record source from the table
I need to find the root source source for all the record using SQL. Below is the table structure and example.
CustID
CertNo
OldCertNo
Source
Root Source
CU1
C1
Digital
Digital
CU1
C2
C1
NON
Digital
...
0
votes
1
answer
79
views
How to get chain information from database?
I have a table named "referral" and it contains two columns named "refer_by" and "refer_to". "refer_by" column stores the id of the user, who refer someone, and ...
1
vote
1
answer
220
views
Python pandas dataframe populate hierarchical levels from parent/child relationship
I have a dataframe with information regarding all employers from a given company.
All employers should have an ID and the corresponding Manager ID.
Example:
data = pd.DataFrame({'Parent':['a','a','b','...
0
votes
2
answers
84
views
How do I translate below MySQL query with variable usage to PostgresSQL query
I'm new to using postgresql and looking for some help on how translate these vars usage in MySql to Postgres it looks like postgres doesn't support this type of syntax.
I do not want to use recursion ...
-1
votes
1
answer
1k
views
Recursion to get tree hierarchy using SQL
parent_id
child_id
dist
1
1
0
1
2
1
1
3
2
1
4
1
1
5
3
1
6
2
2
2
0
2
3
1
2
5
2
2
6
1
3
3
0
3
5
1
4
4
0
5
5
0
6
6
0
dist is the expected output. i tried solution inividually which works fine but when i ...
0
votes
1
answer
703
views
Recursive Hierarchical - Google BigQuery
Input
Output
Note: There are circular references and these must be stopped at the first "node" - Note: Stop.
As in the example output.
-There are cases where there are no "nodes" ...
0
votes
0
answers
63
views
hierarchal multi-label Complex object .json Nested dict-list keys to python for decision tree
I'm currently working to build chatbot for car faults using car symptoms (Smell, Hear , Feel etc.) and target(title in this .json)using decision tree.
The symptoms i got was in .json file includes ...
0
votes
2
answers
64
views
How to split the hierarchy in parent child columns in oracle sql
Input String : pcmdocs/Marquette/10600551 - Track Replacement/CDA-Contract Documentation-Administration/folder1
Expected Output: