Great game of Turkey: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(→‎Structure and functionalities: all existing comments developed into a plan)
Line 344: Line 344:


</rcode>
</rcode>
=== Structure and functionalities ===
[[File:Great game data structure.png|thumb|450px|Data structure of the great game. Each blue box is a data table. Arrows show the information flows. Happiness and value performances are calculated based on decisions and scores estimated by the players (or researchers?). ''Upload data'' and ''select newest'' are generic functions needed to operate with the data.]]
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. Find unique entries (e.g. if the user can make only one decision per day, find the user's newest decision and discard older ones. Then create an ovariable with the structure needed.
* '''Uniques''': From a data.frame, find the unique rows with a given condition (e.g. discard previous decisions made by a user previously on the same day).
* '''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.
* '''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. Store this information somewhere (as an ovariable or a technical data table?). If the information has changed from the last time. give bonus to the user's whose information is now on the top. {{comment|# |Or should this be done after a vote?|--[[User:Jouni|Jouni]] ([[User talk:Jouni|talk]]) 12:18, 7 February 2016 (UTC)}}
* '''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.
* '''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''.
* '''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 using a drop-down list. The options can be seen with ''show today's issue''. Upload data to ''Decisions''.
* '''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''.
* '''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 the user's own decisions, and the Group, 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''.
* '''Manage profile''': Ask the group to which user identifies themselves. Take user and ts as previously. Add data to ''Users''.
You want to find the most popular choice. First, take the last vote of each person. Then 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?
* Make a new index where You contains your answers and Crowd contains the most popular vote of everyone.
* Show cumulative scores for happiness and values along time.
** What the scores for each action are, is only partly a matter of opinion and partly a matter of research.
* Rename terms: problem -> issue, option -> action, progress -> value
* Only pick the most popular issue for decision. However, if an issue was the most popular at some point during the day, it is still kept in the issue list.
* Only pick two main actions for decision.
* Interface for both issue and action, where the latter depends on the former.
** Show current issues in the order of popularity.
** Ask for new issues. Fields: issue, description, date (automatic). Keep it simple.
** Show current issues and their actions in order of popularity.
** Ask for new actions. Fields: action, description, date.(?) Issue is ovariable with formula issue * action. (?)
* How Bonus accumulates
** Bonus is gathered when action is selected (1 bonus) to be voted. 5 bonus is gathered when your issue is selected.
** This goes to Points table. The amount of points is your starting vote for your issue or action. When someone votes your issue or action you get points.
** Person's bonus points are used as the starting point for votes.
Add a table about person's points.
Add Iscore to Question vote and Ascore to Option score. When a person votes, their bonus score is used.
Interface for both issues and actions.




Line 505: Line 446:
</rcode>
</rcode>


{| {{prettytable}}
=== Structure and functionalities ===
|+'''Structures of the tables.
 
! Issues || Actions || Happiness || Values || Issue vote || Action vote || User || Bonus
[[File:Great game data structure.png|thumb|450px|Data structure of the great game. Each blue box is a data table. Arrows show the information flows. Happiness and value performances are calculated based on decisions and scores estimated by the players (or researchers?). ''Upload data'' and ''select newest'' are generic functions needed to operate with the data.]]
|- style="vertical-align:top;"
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.
* Date
* '''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
* '''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.
* Description
* '''Action vote''': List of votes for each action under issues. The voting system is the same as for issues.
* Option(?)
* '''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.
* Issue
* '''Happiness''': Users' opinions about how much happiness an action brings to their own group.
* User
* '''Values''': Users' opinions about how much value an action brings to a selected group.
* Action
* '''Users''': List of users' groups (i.e. to which group each user identifies themselves).
|
 
* Issue
The functions needed are the following.
* Action
* '''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.
* Group
* '''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.
* User
* '''Firstuser''': Check's whether user's wiki_username is found from ''Bonuses''. If not, it is added there and 1 bonus given.
* Hscore
 
|
The interface codes used are the following:
* Issue
* '''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.
* Action
* '''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.
* Value
* '''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?]
* User
* '''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''.
* Vscore
* '''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''.
* Date
* '''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. {{comment|# |Is it? How?|--[[User:Jouni|Jouni]] ([[User talk:Jouni|talk]]) 17:21, 7 February 2016 (UTC)}}
* User
* '''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''.
* Issue
* '''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''.
* Issue
* '''Show results''': This code is divided into several parts:
* User
** '''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.
* Action
** '''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.
* User
** '''Show all issues''': Show all issues and actions and their votes for today.
* Date
 
* Group
How to make ovariables from the data tables? Dependencies: user, todate. In the ovariable formula, do the following.
|
issues <- Ovariable("issues",
* Date
dependencies = data.frame(Name = c("user", "todate")),
* User
formula = function(...) {
* Reason
out <- createova(dat = "Op_en7421.issues", addindex = "Issues")
* Bonus
return(out)
|}
}
)
 
The function createova does something like this:
Create a temporary ovariable temp and fetch the respective table with ddata.
indices that are used to find unique rows: uncolumns <- c("Date", "Issue", "Action", "User", "Value", "Group", "Reason")
However, take away the index that is being added: Issue (for Issue vote and Issues); Action (for Action vote and Actions). None for other tables.
uncolumns <- uncolumns[!uncolumns %in% addindex]
indices that are transformed to Result: rescolumns <- c("Ivotes", "Avotes", "Bonus", "Vscore", "Hscore")
Do oapply(temp, INDEX = uncolumns, FUN = which.max) to find unique rows. Bring Description and other columns back.
Do colnames(temp@output)[colnames(temp@output) %in% rescolumns] <- "Result" to make the right result column.
if(!"Result" %in% colnames(temp@output)) temp$Result <- 1
return(temp)
 


{| {{prettytable}}
{| {{prettytable}}

Revision as of 17:21, 7 February 2016


Make today's decision

+ Show code

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

+ Show code

Setup your profile

Into which group do you identify most? (You only need to choose once):

+ 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. Here we present results from the game.

+ Show code

Rationale

Questions(-)
ObsDateQuestionDescriptionOption
12016-01-16Should the scarf ban in the universities be abandoned?Since Kemal Atatürk, scarfs have been banned in universities. Now this policy is being re-evaluated.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?The political and military situation in Syria and areas nearby have become more difficult during the last 12 months.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?X % of the young people in Turkey do not receive any education except the primary school. Education is a known determinant of social improvement, but it is also expensive.No, keep the same
92016-01-17Should the education budget be increased?No, reduce
102016-01-18Should the presidential palace be made to a public place?President Erdogan built a presidential palace with more than a thousand rooms. Should it be opened up to the public instead of being in president's private use?Yes
112016-01-18Should the presidential palace be made to a public place?No
122016-01-18What should be done to the immigration situation near the Syrian border?The was in Syria has made millions of people to flee from the area.Increase refugee camps and ask for money from the EU.
132016-01-18What should be done to the immigration situation near the Syrian border?Force people from Syria to go back.
142016-01-18What should be done to the immigration situation near the Syrian border?Ask military help from the US and Nato.
152016-01-18What should be done to the immigration situation near the Syrian border?Fight the illegal refugee transport from Turkey across the Mediterranean.
162016-01-18What should be done to the immigration situation near the Syrian border?Attack Russia verbally because it helps the Syrian government and prolongs the war.
172016-01-18What should be done to the immigration situation near the Syrian border?Fight the Kurds in Syria but silently so that western allies do not get mad.
182016-01-19How should terrorist attack be prevented?Homeland security may be compromised in touristic areas because of terrorist attacks.Increase guards in tourist areas.
192016-01-19How should terrorist attack be prevented?Increase guards on the streets.
202016-01-19How should terrorist attack be prevented?Increase international collaboration.
212016-01-19How should terrorist attack be prevented?Do as before.

Calculations

Select an option:

Select a group:

How much happiness would this option bring to this group?:

+ Show code

Select an option:

Select an issue:

How much progress would this option bring to this issue?:

+ 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


+ Show code

Structure and functionalities

Data structure of the great game. Each blue box is a data table. Arrows show the information flows. Happiness and value performances are calculated based on decisions and scores estimated by the players (or researchers?). Upload data and select newest are generic functions needed to operate with the data.

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.

How to make ovariables from the data tables? Dependencies: user, todate. In the ovariable formula, do the following.

issues <- Ovariable("issues", 
	dependencies = data.frame(Name = c("user", "todate")),
	formula = function(...) {
		out <- createova(dat = "Op_en7421.issues", addindex = "Issues")
		return(out)
	}
)

The function createova does something like this:

Create a temporary ovariable temp and fetch the respective table with ddata.
indices that are used to find unique rows: uncolumns <- c("Date", "Issue", "Action", "User", "Value", "Group", "Reason")
However, take away the index that is being added: Issue (for Issue vote and Issues); Action (for Action vote and Actions). None for other tables.
uncolumns <- uncolumns[!uncolumns %in% addindex]
indices that are transformed to Result: rescolumns <- c("Ivotes", "Avotes", "Bonus", "Vscore", "Hscore")
Do oapply(temp, INDEX = uncolumns, FUN = which.max) to find unique rows. Bring Description and other columns back.
Do colnames(temp@output)[colnames(temp@output) %in% rescolumns] <- "Result" to make the right result column.
if(!"Result" %in% colnames(temp@output)) temp$Result <- 1
return(temp) 


Important categories
Groups for Turkey Value categories
  • Nationalists
  • Conservatives
  • Minorities
  • Liberals
  • Kemalists
  • Civil Rights
  • Women's Rights
  • Religion
  • National Values
  • Democracy

See also


Keywords

References


Related files