2D material properties, including electronic and optical properties, can be adjusted through alloying. In this work, we dope NbSe2 with W to make a lateral heterostructure with semiconducting WSe2 on the inside and metallic NbSe2 on the outside. The each point of doping level is characterized by STEM (Scanning Transmission Electron Microscopy) and well correlated with optical (Raman, Photoluminescence) and electrical (device) properties.