Quantifying the environmental impacts due to resource consumption in cities