We use tools from geometric group theory to produce a stratification of the space Bn of barcodes with n bars. The top-dimensional strata are indexed by permutations associated to barcodes as defined by Kanari, Garin and Hess. More generally, the strata correspond to marked double cosets of parabolic subgroups of the symmetric group Sym n . This subdivides Bn into regions that consist of barcodes with the same averages and standard deviations of birth and death times and the same permutation type. We obtain coordinates that form a new invariant of barcodes, extending the one of Kanari-Garin-Hess. This description also gives rise to metrics on Bn that coincide with modified versions of the bottleneck and Wasserstein metrics.