[Tex/LaTex] Multilevel hierachical tree/taxonothe with linebreaks and “empty items” in Tikz

diagramstikz-pgftikz-treestrees

I would like to include graphics like the following in my document. Since this is just one example and there will be different models, I can't just include it, but will rather need to be able to build it myself. I figured that TikZ would be a convenient way to do so.

I found a promising basis somewhere else on this site, yet so far I haven't been able to adopt it to my specific needs. Basically I fail to include the multi-line items and also might get errors because sometimes there are no 'families' or something like that as in the case of the Netherlands in this example.

What would be the best way to make this happen? I would definitely appreciate the rectangular structure and would like to always scale it to \textwidth or similar. Is this possible? Thanks

Example: Hierarchical/Taxonmic tree

\documentclass{article}
\usepackage{tikz-qtree}
\begin{document}
\tikzset{edge from parent/.style=
{draw, edge from parent path={(\tikzparentnode.south)
-- +(0,-8pt)
-| (\tikzchildnode)}},
blank/.style={draw=none}}
\begin{tikzpicture}
\matrix
{
\node{\Tree
    [.Class  \edge[blank]; 
    [.Order  \edge[blank];
    [.Family \edge[blank]; 
    [.Genus ]]]]};
&
\node{\Tree 
 [.{$\gamma$-proteobacteria} 
    [.Alteromonadales 
        [.Alteromonadaceae  {Glaciecola}  Alteromonas Agarivorans ] ]
    [.Vibrionales [.Vibrionacae Vibrio ]]]};\\
};           
\end{tikzpicture}

\end{document}

Best Answer

If you don't mind, you could switch to the forest package which makes it neater to build trees, only using square brackets for writing the tree.

The levels are actually a branch of the tree, but the edges are not drawn (using the command no edge). Here's how the tree actually appears:

enter image description here

Output

enter image description here

Code

\documentclass[margin=10pt]{standalone}
\usepackage{tikz}                               
\usepackage{forest}

\usetikzlibrary{positioning}

\forestset{%
my forest/.style={%
    for tree={%
            node options={text width=5cm, align=center},
            l sep=1cm, 
            parent anchor=south, 
            child anchor=north,
            if n children=0{tier=word}{},
        edge path={%
            \noexpand\path [\forestoption{edge}] (!u.parent anchor) -- +(0,-15pt) -| (.child anchor)\forestoption{edge label};
        },
    }
}
}

\begin{document}
\begin{forest} my forest,
[, for tree={s sep=-5mm} % levels are a bit closer, fix depending on nodes
    [, no edge, 
        [Classes\textsuperscript{$b$}, no edge
            [Sub-classes\textsuperscript{$b$}, no edge
                [Families\textsuperscript{$b$}, no edge]
            ]
        ]
    ]% levels above here <--o--> tree below here
    [$\gamma$-proteobacteria, no edge
        [Alteromonadales, name=lvl1
           [Alteromonadaceae Glaciecola Alteromonas     Agarivorans, name=lvl2
                [another node]
           ]
        ]
        [Vibrionales 
            [Vibrionacae Vibrio]
        ]
    ] 
]
\end{forest}
\end{document}