Official figures show the wet weather, along with industrial action, caused the UK economy to shrink.