Great game of Turkey: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(all codes exist but may not work)
Line 5: Line 5:
library(OpasnetUtils)
library(OpasnetUtils)


today <- Sys.Date()
ques <- opbase.data("Op_en7421.questions")
ques <- opbase.data("Op_en7421.questions")
ques$Date <- as.Date(ques$Date)
#ques <- ques[ques$Date == as.character(Sys.Date()) , ]
ques <- ques[ques$Date == today ,]]
colnames(ques)[colnames(ques) == "Result"] <- "Option"


oprint(ques)
qvote <- opbase.data("Op_en7421.question_vote")
qvote <- unique(qvote[qvote$Date == as.character(Sys.Date()) , ]) # Remove double votes
qvote <- aggregate(qvote["User"], by = qvote["Result"], FUN = length)
qvote <- qvote[order(qvote$User, descending = TRUE) , ][1,] # Choose the row with most votes
 
temp <- merge(ques, qvote, by.x = "Obs", by.y = "Result")["Question"]
 
cat(as.character(temp$Question), "\n")
 
# Find the most popular options
 
ovote <- opbase.data("Op_en7421.option_vote")
ovote <- unique(ovote[ovote$Date == as.character(Sys.Date()) , ]) # Remove double votes
ovote <- aggregate(ovote["User"], by = ovote["Result"], FUN = length)
ovote <- ovote[order(ovote$User, descending = TRUE) , ]#[1:4,] # Choose the 4 rows with most votes
ovote <- ovote[!is.na(ovote$User) , ]
 
ques <- merge(merge(ques, temp), ovote, by.x = "Obs", by.y = "Result")
 
oprint(ques["Option"])


</rcode>
</rcode>
Line 42: Line 60:
oprint(dat)
oprint(dat)
cat("Your choice was successfully saved.\n")
cat("Your choice was successfully saved.\n")
</rcode>
<rcode label="Choose group" embed=1 variables="
name:group|description:Into which group do you identify most?|type:selection|options:
'Nationalists';Nationalists;
'Conservatives';Conservatives;
'Minorities';Minorities;
'Liberals';Liberals;
'Kemalists';Kemalists
">
# This is code Op_en7421/choices on page [[Great game of Turkey]]
library(OpasnetUtils)
dat <- data.frame(
User = wiki_username,
Date = Sys.Date(),
Result = group # Group
)
opbase.upload(
dat,
ident = "Op_en7421",
name = "Great game of Turkey",
subset = "User",
act_type = "append",
language = "eng",
who = wiki_username
)
oprint(dat)
cat("Your group was successfully saved.\n")
</rcode>
</rcode>


Line 101: Line 151:
name = "Great game of Turkey",  
name = "Great game of Turkey",  
subset = "Happiness",  
subset = "Happiness",  
act_type = "replace",  
act_type = "append",  
language = "eng",  
language = "eng",  
who = wiki_username
who = wiki_username
Line 143: Line 193:
name = "Great game of Turkey",  
name = "Great game of Turkey",  
subset = "Progress",  
subset = "Progress",  
act_type = "replace",  
act_type = "append",  
language = "eng",  
language = "eng",  
who = wiki_username
who = wiki_username
Line 154: Line 204:
</rcode>
</rcode>


<rcode label="Show today's questions and options" embed=1>
<rcode label="See the questions of the day" embed=1>
# This is code Op_en7421/ on page [[Great game of Turkey]]
# This code is Op_en7421/ on page [[Great game of Turkey]]


library(OpasnetUtils)
library(OpasnetUtils)


ques
ques <- opbase.data("Op_en7421.questions")
<rcode name="questionvote" label="Vote for the day's question" embed=0 variables="
#ques$Date <- as.Date(ques$Date)
ques <- ques[ques$Date == as.character(Sys.Date()) , ]
colnames(ques)[colnames(ques) == "Result"] <- "Option"
 
for(i in unique(as.character(ques$Question))) {
cat(ques$Obs[ques$Question == i][1], ": ", i, "\n")
oprint(ques[ques$Question == i , "Option", drop = FALSE])
}
 
</rcode>
 
<rcode label="Vote for the day's question" embed=1 variables="
name:question|description:Give the number of the question you want for today.
name:question|description:Give the number of the question you want for today.
">
">
# This is code Op_en7421/questionvote on page [[Great game of Turkey]]
# This is code Op_en7421/ on page [[Great game of Turkey]]


library(OpasnetUtils)
library(OpasnetUtils)
Line 179: Line 240:
name = "Great game of Turkey",  
name = "Great game of Turkey",  
subset = "Question vote",  
subset = "Question vote",  
act_type = "replace",  
act_type = "append",  
language = "eng",  
language = "eng",  
who = wiki_username
who = wiki_username
Line 187: Line 248:
} else {
} else {
cat("Choose your question first.\n")
cat("Choose your question first.\n")
}
</rcode>
<rcode label="Vote for a question's option" embed=1 variables="
name:option|description:Give the number of the option you want for today (up to 4 options used).
">
# This is code Op_en7421/ on page [[Great game of Turkey]]
library(OpasnetUtils)
dat <- data.frame(
Date = Sys.Date(),
User = wiki_username,
Result = option # Option
)
if(!is.null(option)) {
opbase.upload(
dat,
ident = "Op_en7421",
name = "Great game of Turkey",
subset = "Option vote",
act_type = "append",
language = "eng",
who = wiki_username
)
oprint(dat)
cat("Your option vote was successfully saved.\n")
} else {
cat("Choose your option first.\n")
}
}
</rcode>
</rcode>

Revision as of 05:31, 16 January 2016

+ Show code

Check above the question of the day and decide which option you would choose.:

+ Show code

Into which group do you identify most?:

+ Show code

Question

What is a good game to crowdsource citizen priorities about daily political decisions in such a way that

  • it can be done using a mobile app,
  • it characterises happiness of citizen groups of the decisions,
  • it characterises progress of important societal values,
  • it enables crowdsourcing the actual questions and options asked?

Answer

See the top of the page for the main questionnaire of the game.

Rationale

Questions(-)
ObsDateQuestionOption
12016-01-16Should the scarf ban in the universities be abandoned?Yes
22016-01-16Should the scarf ban in the universities be abandoned?Partly
32016-01-16Should the scarf ban in the universities be abandoned?No
42016-01-17Should the military budget be increased?Yes
52016-01-17Should the military budget be increased?No, keep the same
62016-01-17Should the military budget be increased?No, reduce
72016-01-17Should the education budget be increased?Yes
82016-01-17Should the education budget be increased?No, keep the same
92016-01-17Should the education budget be increased?No, reduce

option:

group:

hscore:

+ Show code

option:

progress:

pscore:

+ Show code

+ Show code

Give the number of the question you want for today.:

+ Show code

Give the number of the option you want for today (up to 4 options used).:

+ Show code

Structures of the tables.
Questions Choices Happiness Progress Question vote Option vote User
  • Question
  • Option
  • User
  • Option
  • Option
  • Group
  • User
  • Hscore
  • Option
  • Progress
  • User
  • Pscore
  • Question
  • User
  • Qscore
  • Option
  • User
  • Oscore
  • User
  • Date
  • Group
Important categories
Groups for Turkey Progress categories
  • Nationalists
  • Conservatives
  • Minorities
  • Liberals
  • Kemalists
  • Civil Rights
  • Women's Rights
  • Religion
  • National Values
  • Democracy

See also


Keywords

References


Related files