A study of the ruined medieval village of Wharram Percy in Yorkshire reveals how its residents built and adapted a thriving economy.