Congestion charge: Difference between revisions
Jump to navigation
Jump to search
(headings added) |
(codes combined) |
||
Line 14: | Line 14: | ||
== Add a discussion item == | === Add a discussion item, relation, or evaluation === | ||
<rcode name=" | <rcode name="add" embed=1 label="Add a thing" showcode=-1 variables=" | ||
name: | name:thing|description:What kind of thing are you adding?|type:selection|options: | ||
name:name|description:A short name for the | 'Items';Item; | ||
name:type|description:Is this a value | 'Relations';Relation; | ||
'Evaluations';Evaluation| | |||
name:name|description:A short name for the thing|type:text| | |||
name:description|description:A description of the thing|type:textbox| | |||
name:type|description:Is this a value or factual statement?|type:selection|options: | |||
'Value';Value statement;'Fact';Factual statement;'I don't know';I don't know| | 'Value';Value statement;'Fact';Factual statement;'I don't know';I don't know| | ||
category:Item| | |||
category_conditions:thing;'Items'| | |||
name:subject|description:The ID of the subject in the relation|type:text| | name:subject|description:The ID of the subject in the relation|type:text| | ||
category:Relation| | |||
category_conditions:thing;'Relations'| | |||
name:predicate|description:What is the relation (predicate)?|type:selection|options: | name:predicate|description:What is the relation (predicate)?|type:selection|options: | ||
'connects';connects with (by some non-specified way); | 'connects';connects with (by some non-specified way); | ||
Line 95: | Line 36: | ||
'subclass of';is a subclass of class| | 'subclass of';is a subclass of class| | ||
name:object|description:The ID of the object in the relation|type:text| | name:object|description:The ID of the object in the relation|type:text| | ||
name:name|description: | name:type|description:Is the truth value for an item or a relation?|type:selection|options: | ||
'Item';For an item;'Relation';For a relation| | |||
category:Evaluation| | |||
category_conditions:thing;'Evaluations'| | |||
name:subject|description:The ID of the item or relation you want to evaluate|type:text| | |||
name:evaluation|description:Is the item or relation true?|type:selection|options: | |||
'True';It is true;'Maybe';It is maybe true;'False';It is false| | |||
name:pagename|type:hidden|default:'{{PAGENAME}}'| | name:pagename|type:hidden|default:'{{PAGENAME}}'| | ||
name:ident|type:hidden|default:'Op_en{{PAGEID}}' | name:ident|type:hidden|default:'Op_en{{PAGEID}}' | ||
Line 102: | Line 49: | ||
obs <- tryCatch( | obs <- tryCatch( | ||
opbase.data(ident, subset = | opbase.data(ident, subset = thing), | ||
error = function(...) return(NULL) | error = function(...) return(NULL) | ||
) | ) | ||
Line 112: | Line 59: | ||
} else { | } else { | ||
at <- "append" | at <- "append" | ||
obs <- obs$ | obs <- obs$ID | ||
obs <- gsub("[A-Za-z]", "", as.character(obs)) | obs <- gsub("[A-Za-z]", "", as.character(obs)) | ||
obs <- max(as.integer(obs)) + 1 | obs <- max(as.integer(obs)) + 1 | ||
Line 120: | Line 67: | ||
obs <- 1 | obs <- 1 | ||
} | } | ||
at <- "replace" | |||
obs <- 1 | |||
dat <- data.frame( | dat <- data.frame( | ||
ID = obs, | |||
Timestamp = date(), | Timestamp = date(), | ||
User = wiki_username, | User = wiki_username, | ||
Description = description | |||
) | ) | ||
if(thing == "Items") { | |||
dat <- cbind(dat, data.frame( | |||
Type = type, | |||
Result = name | |||
)) | |||
} | |||
) | |||
if ( | if(thing == "Relations") { | ||
dat <- data.frame( | dat <- cbind(dat, data.frame( | ||
Subject = subject, | |||
Predicate = predicate, | |||
Object = object, | |||
Result = | Result = name | ||
) | )) | ||
} | } | ||
if(thing == "Evaluations") { | |||
dat <- cbind(dat, data.frame( | |||
Thing = type, | |||
Subject = subject, | |||
Evaluation = evaluation, | |||
Result = name | |||
)) | |||
} | } | ||
oprint(dat) | oprint(dat) | ||
Line 209: | Line 106: | ||
ident = ident, | ident = ident, | ||
name = pagename, | name = pagename, | ||
subset = | subset = thing, | ||
act_type = at, | act_type = at, | ||
language = "eng", | language = "eng", | ||
Line 215: | Line 112: | ||
) | ) | ||
if ( | # IF YOU HAVE TO EMPTY THE REMOVED THINGS, YOU HAVE TO DO IT BY HAND WITH THIS CODE | ||
if (FALSE) { | |||
dat <- data.frame( | dat <- data.frame( | ||
Timestamp = date(), | Timestamp = date(), | ||
User = wiki_username, | User = wiki_username, | ||
Reason = "Initiation", | Reason = "Initiation", | ||
Thing = thing, | |||
Result = "NA" | Result = "NA" | ||
) | ) | ||
Line 226: | Line 125: | ||
ident = ident, | ident = ident, | ||
name = pagename, | name = pagename, | ||
subset = " | subset = "Removes", | ||
act_type = at, | act_type = at, | ||
language = "eng", | language = "eng", | ||
Line 232: | Line 131: | ||
) | ) | ||
} | } | ||
cat("Your | cat("Your item has been successfully saved.\n") | ||
</rcode> | </rcode> | ||
---- | ---- | ||
;<span id=" | ;<span id="Show">Current discussion things.</span> | ||
<rcode name=" | <rcode name="show" label="Show discussion things" embed=1 showcode=-1 variables=" | ||
name:thing|description:What kind of things do you want to see?|type:selection|options: | |||
'Items';Item; | |||
'Relations';Relation; | |||
'Evaluations';Evaluation| | |||
name:ident|type:hidden|default:'Op_en{{PAGEID}}'| | name:ident|type:hidden|default:'Op_en{{PAGEID}}'| | ||
name:pagename|type:hidden|default:'{{PAGENAME}}' | name:pagename|type:hidden|default:'{{PAGENAME}}' | ||
Line 246: | Line 150: | ||
pagename <- gsub(" ", "_", pagename) | pagename <- gsub(" ", "_", pagename) | ||
dat <- tryCatch( | dat <- tryCatch( | ||
opbase.data(ident, subset = | opbase.data(ident, subset = thing), | ||
error = function(...) return(NULL) | error = function(...) return(NULL) | ||
) | ) | ||
if (is.null(dat)) oprint("No | if (is.null(dat)) oprint("No things were found") else { | ||
poistot <- tryCatch( | poistot <- tryCatch( | ||
opbase.data(ident, subset = " | opbase.data(ident, subset = "Removes"), | ||
error = function(...) return(NULL) | error = function(...) return(NULL) | ||
) | ) | ||
if (!is.null(poistot)) dat <- dat[!dat$ID %in% poistot$Result, ] | if (!is.null(poistot)) dat <- dat[!dat$ID %in% poistot$Result[poistot$Thing == thing] , ] | ||
if(nrow(dat) == 0) { | if(nrow(dat) == 0) { | ||
Line 265: | Line 169: | ||
} | } | ||
</rcode> | </rcode> | ||
{{hidden| | {{hidden| | ||
'''Items to be removed''' | '''Items to be removed''' | ||
<rcode name=" | <rcode name="remove" embed=1 label="Remove a thing" showcode=-1 variables=" | ||
name:id|description:ID of the | name:thing|description:What kind of thing are you removing?|type:selection|options: | ||
'Items';Item; | |||
'Relations';Relation; | |||
'Evaluations';Evaluation| | |||
name:id|description:ID of the thing to be removed|type:text| | |||
name:reason|description:Reason to remove|type:selection|options: | name:reason|description:Reason to remove|type:selection|options: | ||
;- Select reason -; | ;- Select reason -; | ||
Line 344: | Line 193: | ||
User = wiki_username, | User = wiki_username, | ||
Reason = reason, | Reason = reason, | ||
Thing = thing, | |||
Result = id | Result = id | ||
) | ) | ||
Line 351: | Line 201: | ||
ident = ident, | ident = ident, | ||
name = pagename, | name = pagename, | ||
subset = " | subset = "Removes", | ||
act_type = "append", | act_type = "append", | ||
language = "eng", | language = "eng", | ||
Line 357: | Line 207: | ||
) | ) | ||
oprint("The | oprint("The thing has been successfully removed.\n") | ||
pois <- opbase.data(ident, subset = | pois <- opbase.data(ident, subset = thing) | ||
oprint(pois[pois$ID == id , ], include.rownames = FALSE) | oprint(pois[pois$ID == id & pois$Thing == thing , ], include.rownames = FALSE) | ||
</rcode> | </rcode> | ||
}} | }} | ||
# These t2bs are just to remove redundant tables from the Base view. | |||
<t2b name="Itemremoves" index="A" obs="R" unit="-"> | |||
A|1 | |||
</t2b> | |||
<t2b name="Relationremoves" index="A" obs="R" unit="-"> | |||
A|1 | |||
</t2b> | |||
<t2b name="Evaluationremoves" index="A" obs="R" unit="-"> | |||
A|1 | |||
</t2b> |
Revision as of 10:14, 6 April 2017
Moderator:Jouni (see all) |
|
Upload data
|
Question
What reasons are there for implementing or not implementing a congestion charging system in a city? What values and combinations of values result in which combination?
Answer
Not found yet.
Rationale
Add a discussion item, relation, or evaluation
- Current discussion things.
Show details | ||
---|---|---|
Items to be removed |
- These t2bs are just to remove redundant tables from the Base view.
Obs | A | R |
---|---|---|
1 | A | 1 |
Obs | A | R |
---|---|---|
1 | A | 1 |
Obs | A | R |
---|---|---|
1 | A | 1 |