codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
385 stars 69 forks source link

Update scoring table #1234

Closed Mithrandir24601 closed 9 months ago

Mithrandir24601 commented 9 months ago

Update scoring table for downvotes = 0 and upvotes = 0.

File dimensions are 732x220 px.

trichoplax commented 9 months ago

Concerning the blurrier image, is there the option of exporting as SVG? Alternatively this could potentially just be an HTML table as it doesn't have any graphical elements besides cell background colours.

Either way the resolution would then always match the viewer's environment.

Taeir commented 9 months ago

Could you also update /db/seeds/posts/scoring.html line 7 to use the svg by default? Then at least newly setup communities will have the best version available :)

<p>The actual score of a particular post is calculated as</p>
<img src="/assets/scoring_formula.png" alt="(upvote_count + z^2/2)/(upvote_count + downvote_count + z^2)">
<p>This uses a modified form of a <a href="https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval">Wilson Score</a>, assuming a binomial distribution. By default the weighting constant <em>z</em> is two, but each community can change this to another value as they see fit. Several charts and graphs showing the default weighting distribution are shown below. </p>
-<img src="/assets/scoring_table.png" alt="table of scores with the values for all upvote and downvote combinations from one to ten">
+<img src="/assets/scoring_table.svg" alt="table of scores with the values for all upvote and downvote combinations from one to ten">
<img src="/assets/scoring_distribution.png" alt="lines in a cartesian coordinate plane sloping from upper left to lower right and converging as z increases">
<p>Diagram showing the distribution in scores where upvotes less downvotes = 3 for different values of z</p>
<img src="/assets/scoring_3d.png" alt="a 3D diagram showing the score distribution for upvotes and downvotes">
cellio commented 9 months ago

Where does this stand? Do we just need the seeds update and then it's good to go?

Oaphi commented 9 months ago

@Taeir, @cellio switching to the SVG image in seeds is handled in 67e4fd8.