  In this article, we present an effective encoding of dendrograms by embedding
them into the Bruhat-Tits trees associated to $p$-adic number fields. As an
application, we show how strings over a finite alphabet can be encoded in
cyclotomic extensions of $\mathbb{Q}_p$ and discuss $p$-adic DNA encoding. The
application leads to fast $p$-adic agglomerative hierarchic algorithms similar
to the ones recently used e.g. by A. Khrennikov and others. From the viewpoint
of $p$-adic geometry, to encode a dendrogram $X$ in a $p$-adic field $K$ means
to fix a set $S$ of $K$-rational punctures on the $p$-adic projective line
$\mathbb{P}^1$. To $\mathbb{P}^1\setminus S$ is associated in a natural way a
subtree inside the Bruhat-Tits tree which recovers $X$, a method first used by
F. Kato in 1999 in the classification of discrete subgroups of
$\textrm{PGL}_2(K)$.
  Next, we show how the $p$-adic moduli space $\mathfrak{M}_{0,n}$ of
$\mathbb{P}^1$ with $n$ punctures can be applied to the study of time series of
dendrograms and those symmetries arising from hyperbolic actions on
$\mathbb{P}^1$. In this way, we can associate to certain classes of dynamical
systems a Mumford curve, i.e. a $p$-adic algebraic curve with totally
degenerate reduction modulo $p$.
  Finally, we indicate some of our results in the study of general discrete
actions on $\mathbb{P}^1$, and their relation to $p$-adic Hurwitz spaces.
