A federal judge in New York on Tuesday has barred the Trump administration from adding a citizenship question to the 2020 census.