Nothing better than that? thistleknot used attribute data from 5000 dwarves. I would be interested for something on this scale, but I don't know how it was done.
The script "modtools/create-unit" lets the game handle preference generation (alongside a bunch of other stuff) for the units it spawns. As such, you could use something like this for your research:
local spawnNumber = 10 -- replace this with the number of dwarves you want to spawn
local x,y,z = pos2xyz(df.global.cursor)
if not z then
qerror('First place your cursor on the screen to choose a spawn location!')
end
for n = 1,spawnNumber do
dfhack.run_command("modtools/create-unit -race DWARF -caste MALE -name MOUNTAIN -setUnitToFort -location [ "..x.." "..y.." "..z.." ]")
endSpecify the number of dwarves you want to spawn where indicated in the script before running it. Note that it's entirely possible to generate and observe 5000 dwarves at a go with this, but your FPS will be absolutely murdered if you attempt to unpause.
Come to think of it, perhaps it'd be a good idea to add this functionality to the actual script.