The last decade has seen intense research in materials with reduced dimensionality. The low dimensionality leads to interesting electronic behavior due to electronic confinement and reduced screening. The investigations have to a large extent focused on 2D materials both in their bulk form, as individual layers a few atoms thick, and through stacking of 2D layers into heterostructures. The identification of low-dimensional compounds is therefore of key interest. Here, we perform a geometric analysis of material structures, demonstrating a strong clustering of materials depending on their dimensionalities. Based on the geometric analysis, we propose a simple scoring parameter to identify materials of a particular dimension or of mixed dimensionality. The method identifies spatially connected components of the materials and gives a measure of the degree of 1D-ness, 2D-ness, etc., for each component. The scoring parameter is applied to the Inorganic Crystal Structure Database and the Crystallography Open Database ranking the materials according to their degree of dimensionality. In the case of 2D materials the scoring parameter is seen to clearly separate 2D from non-2D materials and the parameter correlates well with the bonding strength in the layered materials. About 3000 materials are identified as one-dimensional, while more than 9000 are mixed-dimensionality materials containing a molecular (0D) component. The charge states of the components in selected highly ranked materials are investigated using density functional theory and Bader analysis showing that the spatially separated components have either zero charge, corresponding to weak interactions, or integer charge, indicating ionic bonding.