Grade concensus code

Having problems with the board or the online guidebook?
Suggestions welcome.
Post Reply
User avatar
SCIN
BANNED
Posts: 4981
Joined: Fri Sep 20, 2002 9:19 am
Location: Lexington, KY

Grade concensus code

Post by SCIN » Tue Jun 10, 2008 5:37 pm

Some people were asking about this. Here it is:


echo "<select>";
echo "<option></option>";
echo "<option>5.1</option>";
echo "<option>5.2</option>";
echo "<option>5.3</option>";
echo "<option>5.4</option>";
echo "<option>5.5</option>";
echo "<option>5.6</option>";
echo "<option>5.7</option>";
echo "<option>5.8-</option>";
echo "<option>5.8</option>";
echo "<option>5.8+</option>";
echo "<option>5.9-</option>";
echo "<option>5.9</option>";
echo "<option>5.9+</option>";
echo "<option>5.10a</option>";
echo "<option>5.10b</option>";
echo "<option>5.10c</option>";
.....and so on

if ($overallgradedecimal == 0) {
return;
}
elseif ($overallgradedecimal <= 1.50) {
$overallgrade = "5.1";
}
elseif ($overallgradedecimal <= 2.50) {
$overallgrade = "5.2";
}
elseif ($overallgradedecimal <= 3.50) {
$overallgrade = "5.3";
}
elseif ($overallgradedecimal <= 4.50) {
$overallgrade = "5.4";
}
elseif ($overallgradedecimal <= 5.50) {
$overallgrade = "5.5";
}
elseif ($overallgradedecimal <= 6.50) {
$overallgrade = "5.6";
}
elseif ($overallgradedecimal <= 7.50) {
$overallgrade = "5.7";
}
elseif ($overallgradedecimal <= 8.50) {
$overallgrade = "5.8-";
}
elseif ($overallgradedecimal <= 9.50) {
$overallgrade = "5.8";
}
elseif ($overallgradedecimal <= 10.50) {
$overallgrade = "5.8+";
}
elseif ($overallgradedecimal <= 11.50) {
$overallgrade = "5.9-";
}
elseif ($overallgradedecimal <= 12.50) {
$overallgrade = "5.9";
}
elseif ($overallgradedecimal <= 13.50) {
$overallgrade = "5.9+";
}
elseif ($overallgradedecimal <= 14.50) {
$overallgrade = "5.10a";
}
elseif ($overallgradedecimal <= 15.50) {
$overallgrade = "5.10b";
}
elseif ($overallgradedecimal <= 16.50) {
$overallgrade = "5.10c";
}
elseif ($overallgradedecimal <= 17.50) {
$overallgrade = "5.10d";
}
elseif ($overallgradedecimal <= 18.50) {
$overallgrade = "5.11a";
}
elseif ($overallgradedecimal <= 19.50) {
$overallgrade = "5.11b";
}
elseif ($overallgradedecimal <= 20.50) {
$overallgrade = "5.11c";
}
elseif ($overallgradedecimal <= 21.50) {
$overallgrade = "5.11d";
}
elseif ($overallgradedecimal <= 22.50) {
$overallgrade = "5.12a";
}
elseif ($overallgradedecimal <= 23.50) {
$overallgrade = "5.12b";
}
elseif ($overallgradedecimal <= 24.50) {
$overallgrade = "5.12c";
}
elseif ($overallgradedecimal <= 25.50) {
$overallgrade = "5.12d";
}
elseif ($overallgradedecimal <= 26.50) {
$overallgrade = "5.13a";
}
elseif ($overallgradedecimal <= 27.50) {
$overallgrade = "5.13b";
}
elseif ($overallgradedecimal <= 28.50) {
$overallgrade = "5.13c";
}
elseif ($overallgradedecimal <= 29.50) {
$overallgrade = "5.13d";
}
elseif ($overallgradedecimal <= 30.50) {
$overallgrade = "5.14a";
}
elseif ($overallgradedecimal <= 31.50) {
$overallgrade = "5.14b";
}
elseif ($overallgradedecimal <= 32.50) {
$overallgrade = "5.14c";
}
return $overallgrade;
Last edited by SCIN on Tue Jun 10, 2008 5:57 pm, edited 2 times in total.
Yo Ray jack dynomite! Listen to my beat box! Bew ch ch pff BEW ch ch pfff! Sweet!

-Horatio

512OW
Master of My Own Reality
Posts: 3040
Joined: Mon Oct 21, 2002 5:43 pm
Location: steadily moving up the points list...
Contact:

Post by 512OW » Tue Jun 10, 2008 5:49 pm

Thats exactly what I thought.
"Sticking feathers up your butt does not make you a chicken."
-Tyler Durden

www.odubmusic.com

User avatar
SCIN
BANNED
Posts: 4981
Joined: Fri Sep 20, 2002 9:19 am
Location: Lexington, KY

Post by SCIN » Tue Jun 10, 2008 5:58 pm

Well, the option values got stripped out. 5.1 starts at 1 and it increments by 1 from there.
Yo Ray jack dynomite! Listen to my beat box! Bew ch ch pff BEW ch ch pfff! Sweet!

-Horatio

absolutsugarsmurf
Gumby
Gumby
Posts: 96
Joined: Wed Jan 05, 2005 9:03 pm
Location: Louisville,Ky

Post by absolutsugarsmurf » Wed Jun 18, 2008 7:56 am

Would it make more sense to report the median value instead of the average value of the collective votes? That would help weed out votes that were obviously out of wack. For example, currently Prey (11b) at Sun Beam Buttress has a concencus grade of 5.11b. The grade concensus is as follows:

10c-1;11a-2;11b-1,11c-7;11d-1.

By the current math, the overallgradedecimal is 19.3, making Prey an 11b. It seems clear that most people think that Prey is actually an 11c. By choosing a median value, contribution of extreme outlying votes (in this case the 10c) become less significant.

Also, if a change in a route grading were to occur due to a hold breaking or new beta the median would reflect changes in the grade faster and more accurately than an average would.

User avatar
ahab
Star Trek Kid
Posts: 1024
Joined: Mon Jul 30, 2007 1:36 pm
Location: up above it

Post by ahab » Wed Jun 18, 2008 8:22 am

that wouldn't be beneficial to the pendalum.
buy the Ticket take the Ride

User avatar
bcombs
Generic Jerry
Posts: 2048
Joined: Sun Nov 02, 2003 12:20 pm
Location: Cincy

Post by bcombs » Wed Jun 18, 2008 8:29 am

ahab wrote:that wouldn't be beneficial to the pendalum.
Dang, I thought I was going to learn two new words today! Thanks for nothin ahab. :wink:

User avatar
ahab
Star Trek Kid
Posts: 1024
Joined: Mon Jul 30, 2007 1:36 pm
Location: up above it

Post by ahab » Wed Jun 18, 2008 8:31 am

you did, how people from kentucky say 'pen-duh-lem'. you are welcome.
buy the Ticket take the Ride

User avatar
DriskellHR
choking on it
Posts: 1260
Joined: Thu Dec 20, 2007 7:34 pm
Location: under your bed....
Contact:

Post by DriskellHR » Wed Jun 18, 2008 4:44 pm

I did not understand any of that could you retype it in a bigger font??
"....... Be sure to linger......." Mike Tucker

Yasmeen
"53><`/ 817(|-|"
Posts: 4714
Joined: Tue Oct 08, 2002 6:42 am
Location: Cincinnati, OH

Post by Yasmeen » Wed Jun 18, 2008 6:30 pm

Sure, but I'll do it through you. Hold down the control button and press the + key as many times as you want.
"I snatched defeat from the jaws of victory." --Paul
---
(Emails > PMs)

Myke Dronez
Lame Wade
Lame Wade
Posts: 463
Joined: Fri Aug 10, 2007 10:52 pm
Location: Down in it

Post by Myke Dronez » Wed Jun 18, 2008 7:06 pm

absolutsugarsmurf wrote: It seems clear that most people think that Prey is actually an 11c. By choosing a median value, contribution of extreme outlying votes (in this case the 10c) become less significant.
If you ask me, Prey is a lot closer to 10c than 11c, who are the 'people' that are rating these things- the same people who say Morning Sun is an 11c? Come on- all this fluff has to be kept in check some how, have some respect.

I guess I'd better go find some 12c to project now.. :roll:
The only escape is up.

pkananen
Poser
Poser
Posts: 368
Joined: Tue Jul 17, 2007 10:20 pm
Location: cinci

Post by pkananen » Wed Jun 18, 2008 8:39 pm

what about the mode?

schwagpad
innocent bystander
Posts: 286
Joined: Wed Aug 22, 2007 12:04 am
Location: the lab

Post by schwagpad » Thu Jun 19, 2008 11:47 am

Not knowing anything about the language you're using does it really force you to copy/paste that much?

Come on SCIN, clean that code up. You should be able to turn that whole thing into a two-liner.

if(ishard)
{
grade = "5.hard"
}else
{I = weakass}

something like that

Post Reply