The Barcelona historical marriage database and the Baix Llobregat demographic database : from algorithms for handwriting recognition to individual-level demographic and socioeconomic data