The videos are ranked by the wilson score.
It is not idea. It does not take into account the numer of page vivews.
Sadly the YouTue Api does not return page views for all videos.
I would like to work with open source projects to create a branch of the tree with all of the best videos for your open source project. Please send me an email if you are interested.