Contextual contact tracing based on stochastic compartment modeling and spatial risk assessment