The Yale Library guide pages on working with text and data files (information on structured data formats, using and reading .json files and utilizing open refine to clean up and review extracted data) are excellent starting places for working with data for TDM.