Great game of Turkey: Difference between revisions
Jump to navigation
Jump to search
(some bug fixes) |
(all codes tested and they work!) |
||
Line 17: | Line 17: | ||
"Issue #", | "Issue #", | ||
temp$Issueid[1], | temp$Issueid[1], | ||
": | ":", | ||
as.character(temp$Issue[1]), | as.character(temp$Issue[1]), | ||
" | "\n\n\n", | ||
as.character(temp$Issuedescription[1]), | as.character(temp$Issuedescription[1]), | ||
"\n" | "\n" | ||
Line 195: | Line 195: | ||
temp <- EvalOutput(allactions) | temp <- EvalOutput(allactions) | ||
if(all) temp <- | if(!all) temp <- temp[temp$Date == as.character(date) , ] | ||
if(nrow(temp@output) == 0) { | |||
cat("Issues not found for that time.\n") | |||
} else { | |||
for(i in sort(unique(paste(temp$Date, temp$Issueid)))) { | for(i in sort(unique(paste(temp$Date, temp$Issueid)))) { | ||
temp2 <- temp[paste(temp$Date, temp$Issueid) == i , ] | temp2 <- temp[paste(temp$Date, temp$Issueid) == i , ] | ||
Line 211: | Line 214: | ||
oprint(temp2[ , c("Action", "Actiondescription", "Actionid")], include.rownames = FALSE) | oprint(temp2[ , c("Action", "Actiondescription", "Actionid")], include.rownames = FALSE) | ||
} | } | ||
} | |||
</rcode> | </rcode> | ||
Line 217: | Line 220: | ||
| | | | ||
<rcode label="Suggest issue" embed=1 variables=" | <rcode label="Suggest issue" embed=1 variables=" | ||
name:issue|description:What is the issue (decision) that should be played? (briefly)|type:textbox| | name:issue|description:What is the issue (decision) that should be played? (briefly)|type:textbox| | ||
name:description|description:Give a more detailed description.|type:textbox | name:description|description:Give a more detailed description.|type:textbox| | ||
name:date|description:When should this issue be played?|type:date | |||
"> | "> | ||
# This is code Op_en7421/ on page [[Great game of Turkey]] | # This is code Op_en7421/ on page [[Great game of Turkey]] | ||
Line 228: | Line 231: | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
objects.latest("Op_en7421", code_name = "initiate") | |||
bonus <- EvalOutput(bonuses) | bonus <- EvalOutput(bonuses) | ||
bonus <- result(bonus)[bonus$User == wiki_username | bonus <- result(bonus)[bonus$User == wiki_username] | ||
dat <- data.frame( | dat <- data.frame( | ||
Date = as.character(date), | Date = as.character(date), | ||
Issue = issue, | Issue = issue, | ||
Issuedescription = description, | |||
User = wiki_username, | User = wiki_username, | ||
Result = as.numeric(Sys.time()) | Result = as.numeric(Sys.time()) | ||
Line 281: | Line 286: | ||
<rcode label="Suggest action" embed=1 variables=" | <rcode label="Suggest action" embed=1 variables=" | ||
name:issue|description:What is the Issueid | name:issue|description:What is the Issueid (from 'See all actions') of an issue?|type:default| | ||
name:action|description:What is the action you suggest to this issue? (briefly)|type:textbox| | name:action|description:What is the action you suggest to this issue? (briefly)|type:textbox| | ||
name:description|description:Give a more detailed description.|type:textbox | name:description|description:Give a more detailed description.|type:textbox | ||
Line 292: | Line 297: | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
objects.latest("Op_en7421", code_name = "initiate") | |||
bonus <- EvalOutput(bonuses) | bonus <- EvalOutput(bonuses) | ||
bonus <- result(bonus)[bonus$User == wiki_username | bonus <- result(bonus)[bonus$User == wiki_username] | ||
temp <- EvalOutput(allactions) | temp <- EvalOutput(allactions) | ||
Line 306: | Line 311: | ||
Issue = temp$Issue, | Issue = temp$Issue, | ||
Action = action, | Action = action, | ||
Actiondescription = description, | |||
User = wiki_username, | User = wiki_username, | ||
Result = as.numeric(Sys.time()) | Result = as.numeric(Sys.time()) | ||
Line 356: | Line 361: | ||
<rcode label="Vote for an issue" embed=1 variables=" | <rcode label="Vote for an issue" embed=1 variables=" | ||
name:issue|description:What is the Issueid of the | name:issue|description:What is the Issueid (from 'See all actions') of the issue that should be played?|type:default | ||
"> | "> | ||
# This is code Op_en7421/ on page [[Great game of Turkey]] | # This is code Op_en7421/ on page [[Great game of Turkey]] | ||
Line 363: | Line 368: | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
objects.latest("Op_en7421", code_name = "initiate") | |||
bonus <- EvalOutput(bonuses) | bonus <- EvalOutput(bonuses) | ||
bonus <- result(bonus)[bonus$User == wiki_username | bonus <- result(bonus)[bonus$User == wiki_username] | ||
temp <- EvalOutput(allactions) | |||
temp <- temp[temp$Date == as.character(Sys.Date()) & temp$Issueid == issue , ] | |||
dat <- data.frame( | dat <- data.frame( | ||
Date = | Date = temp$Date[1], | ||
Issue = | Issue = temp$Issue[1], | ||
User = wiki_username, | User = wiki_username, | ||
Ivotes = bonus, | Ivotes = bonus, | ||
Line 398: | Line 403: | ||
<rcode label="Vote for an action" embed=1 variables=" | <rcode label="Vote for an action" embed=1 variables=" | ||
name:action|description:What is the Actionid of the action you vote for?|type:default | name:action|description:What is the Actionid (from 'See all actions') of the action you vote for?|type:default | ||
"> | "> | ||
# This is code Op_en7421/ on page [[Great game of Turkey]] | # This is code Op_en7421/ on page [[Great game of Turkey]] | ||
Line 405: | Line 410: | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
objects.latest("Op_en7421", code_name = "initiate") | |||
bonus <- EvalOutput(bonuses) | bonus <- EvalOutput(bonuses) | ||
bonus <- result(bonus)[bonus$User == wiki_username | bonus <- result(bonus)[bonus$User == wiki_username] | ||
temp <- EvalOutput(allactions) | |||
temp <- temp[temp$Date == as.character(Sys.Date()) & temp$Actionid == action , ] | |||
dat <- data.frame( | dat <- data.frame( | ||
Issue = temp$Issue, | |||
Issue = | Action = temp$Action, | ||
Action = | |||
User = wiki_username, | User = wiki_username, | ||
Avotes = bonus, | Avotes = bonus, | ||
Line 445: | Line 449: | ||
| | | | ||
<rcode name="happiness" label="Save your happiness score" embed=1 variables=" | <rcode name="happiness" label="Save your happiness score" embed=1 variables=" | ||
name:action|description: | name:action|description:What is the Actionid (from 'See all actions') of the action you want to score?|type:default| | ||
name:hscore|description:How much happiness would this option bring to this group?|type:selection|options: | name:hscore|description:How much happiness would this option bring to this group?|type:selection|options: | ||
NA;- choose score -;2;+2;1;+1;0;0;-1;-1;-2;-2|default:NA | NA;- choose score -;2;+2;1;+1;0;0;-1;-1;-2;-2|default:NA | ||
Line 460: | Line 464: | ||
temp <- EvalOutput(allactions) | temp <- EvalOutput(allactions) | ||
temp <- temp[temp$Actionid == action , ] | temp <- temp[temp$Actionid == action , ] | ||
cat(as.character(temp$Issue), ":", as.character(temp$Action, "\n") | cat(as.character(temp$Issue), ":", as.character(temp$Action), "\n") | ||
user1 <- EvalOutput(user) | |||
user1 <- | user1 <- user1[user1@output$User == wiki_username , ] | ||
dat <- data.frame( | dat <- data.frame( | ||
Line 492: | Line 496: | ||
<rcode name="value" label="Save your value score" embed=1 variables=" | <rcode name="value" label="Save your value score" embed=1 variables=" | ||
name:action|description:What is the Actionid | name:action|description:What is the Actionid (from 'See all actions') of the action you want to score?|type:default| | ||
name:value|description:Select an objective to evaluate|type:selection|options: | name:value|description:Select an objective to evaluate|type:selection|options: | ||
'Civil Rights';Civil Rights; | 'Civil Rights';Civil Rights; | ||
Line 515: | Line 519: | ||
temp <- temp[temp$Actionid == action , ] | temp <- temp[temp$Actionid == action , ] | ||
cat(as.character(temp$Issue), ":", as.character(temp$Action, "\n") | cat(as.character(temp$Issue), ":", as.character(temp$Action), "\n") | ||
dat <- data.frame( | dat <- data.frame( | ||
Issue = temp$Issue, | Issue = temp$Issue, | ||
Action = temp$Action, | Action = temp$Action, | ||
Line 616: | Line 619: | ||
act <- merge(actions, act) | act <- merge(actions, act) | ||
act$User <- NULL | act$User <- NULL | ||
out <- merge(iss, act) | out <- merge(iss, act, all.x = TRUE) | ||
out@name <- "actionvote" | out@name <- "actionvote" | ||
return(out) | return(out) | ||
Line 625: | Line 628: | ||
#Create a temporary ovariable temp and fetch the respective table with ddata. | #Create a temporary ovariable temp and fetch the respective table with ddata. | ||
#indices that are used to find unique rows: | #indices that are used to find unique rows: | ||
uncolumns <- c("Date", "Issue", "Action", "User", "Value | uncolumns <- c("Date", "Issue", "Action", "User", "Value", "Reason") | ||
#However, take away the index that is being added: | #However, take away the index that is being added: | ||
#Issue (for Issuevote and Issues); Action (for Actionvote and Actions). None for other tables. | #Issue (for Issuevote and Issues); Action (for Actionvote and Actions). None for other tables. |
Revision as of 17:27, 14 February 2016
Make today's decision
First, see the issue and possible actions.
Then, make the decision about today's issue.
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 issues and actions asked?
Answer
Game results
- See the top of the page for the main questionnaire of the game. Here we present results from the game.
Setup profile
Setup your profile. Do this before you start. You may change your preferences later.
Suggest issues and actions
|
|
Vote for issues and actions
|
|
Evaluate happiness and values
|
|
Rationale
Calculations
Structure and functionalities
The content of and use of the data tables is the following:
- Issues: List of decisions to be made. A user can suggest only one issue per day. For each day, the most popular issue is taken to the game.
- Actions: List of decision options to be made. A user can suggest only one action per issue. For each time point, two most popular actions are taken to the game. However, the actions in the game may change during the day, if the rank of the issues changes.
- Issue vote: List of votes for each issue. Each user can cast a single vote either for or against an issue. The number of votes a user has equals their bonuses.
- Action vote: List of votes for each action under issues. The voting system is the same as for issues.
- Decisions: List of decisions each user makes from the actions and issues on the game.
- Bonuses: List of bonuses the users have earned during the game. In the beginning, each user has 1 bonus. You can earn bonuses if your actions suggestions gets to be played (+1) or if your issues gets to be played (+5). Every time a user makes a decision, they get +0.1 bonus.
- Happiness: Users' opinions about how much happiness an action brings to their own group.
- Values: Users' opinions about how much value an action brings to a selected group.
- Users: List of users' groups (i.e. to which group each user identifies themselves).
The functions needed are the following.
- Upload data: Take the data provided by the user or calculated. Add automatic fields, e.g. ts, user and date. Upload data to the respective table.
- Create ovariable: Download data from a table. From the data, find the unique rows with a given condition (e.g. discard previous decisions made by a user previously on the same day). Then create an ovariable with the structure needed.
- Firstuser: Check's whether user's wiki_username is found from Bonuses. If not, it is added there and 1 bonus given.
The interface codes used are the following:
- Suggest issues: Ask date, issue and description from user. Date means the date when this issue will be played. Default is today, but user can change that and suggest future issues. Timestamp (ts) come automatically. User is the wiki_username. Upload data to Issues table. No need to check previous entries. Upload user's bonus to Issue vote as number of votes.
- Show issues: Ask date (today by default) and show all issues and each one's actions listed from the most to least popular. This is necessary for suggesting actions.
- Show today's issue: Ask nothing. Show today's top-ranked issue and its two top-ranked actions. [Calculate the sum of results over all users. Show these popularity sums as the result of object popularity? Select the most popular row among a group defined by an index; use oapply to integrate over the index using which.max and pick that row only. Should this be a function or ovariable?]
- Suggest actions: Ask date, issue, action and description from user. Date is today by default. Ts and user come as previously. If the date-issue pair does not exist in Issues table, give error message. Upload data to Actions and user's bonus to Action vote.
- Vote for issue: Ask the rank number of the issue as a number. The user can check the numbers with Show issues. Date, user, and ts come automatically. Do firstuser. Votes is the number of user's bonuses and comes from Bonuses. Upload data to Issue vote. Store information about the rank before voting somewhere (as an ovariable or a technical data table?). If the information has changed from the last time, give bonus to the user whose information is now on the top.
- Vote for action: Similar to vote for issue, except that the action number is asked and data is uploaded to Action vote.
- Make decision: Ask the action from the two top choices of the most popular issue using a drop-down list. The options can be seen with show today's issue. Upload data to Decisions. However, if an issue was the most popular at some point during the day, it is still kept in the issue list. ----#: . Is it? How? --Jouni (talk) 17:21, 7 February 2016 (UTC) (type: truth; paradigms: science: comment)
- Evaluate happiness: Ask date (today is the default), action number from show issues for that date, and hscore for happiness score in the user's own group. Ts, user as previously. Check if user has a group in Users and if not, give an error message to sign up to a group first. Upload data to Happiness.
- Evaluate values: As evaluate happiness, except that unlike group, the value is asked from the user and nothing is checked. Upload data to Values.
- Manage profile: Ask the group to which user identifies themselves. Take user and ts as previously. Add data to Users.
- Show results: This code is divided into several parts:
- Show happiness performance: Ask nothing. From Decisions, take the action of each day; do this separately for You, the user's own decisions, and Crowd, i.e. the most popular action of each day. Combine that with the happiness scores from Happiness. Show cumulative happiness across time for both decision makers.
- Show value performance: Similar to show happiness performance, but for values from Values. It is imprtant to notice that value scores for each action are only partly a matter of opinion and partly a matter of research. Therefore, ideas should be developed how this research is gathered and used.
- Show situation': Show the situation of the current issue: the issue and description, and the two actions and their votes.
- Show all issues: Show all issues and actions and their votes for today.
Groups for Turkey | Value categories |
---|---|
|
|
See also
Moderator:Jouni (see all) |
|
Upload data
|
Keywords
References