DOC: rewrite with doctests

Make get_data examples into doctests.