How do I include 0-rated items while ranking items with variable number of ratings? I have a list of items and ratings from 0 to 10, with decimal ratings so that possible ratings are 0, 0.5, 1, 1.5 ... 9.5, 10.
I am using https://www.evanmiller.org/ranking-items-with-star-ratings.html, but that considers ratings from 1 to K. How do I modify it to consider 0 rating for items.

You have $K=21$ ratings in this case, and the correspondence is:
$$\text{Rating}_i = 0.5 (i-1)
\quad \quad \quad \quad 
\text{for } i = 1,...,21.$$
