The data and codes for spatiotemporal risk assessment, including the code and epidemiological investigation dataset of COVID-19 Shijiazhuang city in China.