This is a joint publication with the paper by Huang and Liu [Phys. Rev. Lett. 121, 126401 (2018), 10.1103/PhysRevLett.121.126401]. In this work, we propose the spin Bott index to identify the quantum spin Hall (QSH) state in both crystalline and nonperiodic systems. The applicability of the spin Bott index is confirmed by analyzing the periodic and disorder Kane-Mele models. As an example of nonperiodic systems, we systematically investigate the QSH effect in a Penrose-type quasicrystal lattice (QL). We characterize the nontrivial electronic topology of the QL by directly calculating the spin Bott index. In addition, the topological edge states, the localization of wave functions, and quantized transport signatures are also studied in detail.