Persistent rain has caused days of flooding across Yorkshire and the Midlands.