Abstract. We study point patterns of events that occur on a network of lines, such as road accidents recorded on a road network. Okabe and Yamada developed a ‘network K function’, analogous to Ripley's K function, for analysis of such data. However, values of the network K-function depend on the network geometry, making interpretation difficult. In this study we propose a correction of the network K-function that intrinsically compensates for the network geometry. This geometrical correction restores many natural and desirable properties of K, including its direct relationship to the pair correlation function. For a completely random point pattern, on any network, the corrected network K-function is the identity. The corrected estimator is intrinsically corrected for edge effects and has approximately constant variance. We obtain exact and asymptotic expressions for the bias and variance of under complete randomness. We extend these results to an ‘inhomogeneous’ network K-function which compensates for a spatially varying intensity of points. We demonstrate applications to ecology (webs of the urban wall spider Oecobius navus) and criminology (street crime in Chicago).