We study electron and spin transport in interacting quantum wires contacted by noninteracting leads. We theoretically model the wire and junctions as an inhomogeneous chain where the parameters at the junction change on the scale of the lattice spacing. We study such systems analytically in the appropriate limits based on Luttinger liquid theory and compare the results to quantum Monte Carlo calculations of the conductances and local densities near the junction. We first consider an inhomogeneous spinless fermion model with a nearest-neighbor interaction and then generalize our results to a spinful model with an onsite Hubbard interaction.