Great game of Turkey: Difference between revisions
Jump to navigation
Jump to search
(all codes exist but may not work) |
|||
Line 5: | Line 5: | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
ques <- opbase.data("Op_en7421.questions") | ques <- opbase.data("Op_en7421.questions") | ||
ques$Date | #ques <- ques[ques$Date == as.character(Sys.Date()) , ] | ||
ques | 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 = " | 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 = " | act_type = "append", | ||
language = "eng", | language = "eng", | ||
who = wiki_username | who = wiki_username | ||
Line 154: | Line 204: | ||
</rcode> | </rcode> | ||
<rcode label=" | <rcode label="See the questions of the day" embed=1> | ||
# This is | # This code is Op_en7421/ on page [[Great game of Turkey]] | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
ques | ques <- opbase.data("Op_en7421.questions") | ||
< | #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/ | # 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 = " | 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
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
Obs | Date | Question | Option |
---|---|---|---|
1 | 2016-01-16 | Should the scarf ban in the universities be abandoned? | Yes |
2 | 2016-01-16 | Should the scarf ban in the universities be abandoned? | Partly |
3 | 2016-01-16 | Should the scarf ban in the universities be abandoned? | No |
4 | 2016-01-17 | Should the military budget be increased? | Yes |
5 | 2016-01-17 | Should the military budget be increased? | No, keep the same |
6 | 2016-01-17 | Should the military budget be increased? | No, reduce |
7 | 2016-01-17 | Should the education budget be increased? | Yes |
8 | 2016-01-17 | Should the education budget be increased? | No, keep the same |
9 | 2016-01-17 | Should the education budget be increased? | No, reduce |
Questions | Choices | Happiness | Progress | Question vote | Option vote | User |
---|---|---|---|---|---|---|
|
|
|
|
|
|
|
Groups for Turkey | Progress categories |
---|---|
|
|
See also
Moderator:Jouni (see all) |
|
Upload data
|
Keywords
References