Is there a database of past sunspots?
The National Solar Observatory historical archive lists at least one source of sunspot data. Under 'Sacramento Peak Telescope'->'Evans Solar Facility' there is a Dropbox link to Sunspot numbers data which seems to have spot numbers against time in ASCII format; this may be a suitable resource to get you going.