A data driven time-dependent transmission rate for tracking an epidemic: a case study of 2019-nCoV