Next: Computing Variables
Up: Datasets
Previous: Loading Attributes
Index
Attribute Names
Attributes for a dataset can be specified in following ways:
- Un-qualified name
- (e.g. population) It is a character string
without any dots or parentheses. It may contain numbers. Un-qualified
names within a dataset must be unique. This way of
specifying attributes may be used only for accessing
already existing attributes within a dataset,
e.g. in the method
get_attribute().
- Dataset-qualified name
- (e.g. gridcell.population) Specifies
a primary attribute of a specific dataset.
It consists of a dataset name (e.g.
gridcell) and
an un-qualified attribute name (e.g.
population). The dataset name allows you to
disambiguate attributes of the same name in different
datasets, when using outside of a dataset,
e.g. in a model specification or in variable
dependencies.
- Fully-qualified name
- (e.g. urbansim.gridcell.population)
Specifies an Opus variable. It is the full name of the
module or class in which the variable is defined. See
Section 24.3.1 below, for more information.
- Expression
- (e.g. ln(urbansim.gridcell.population+1))
Expressions are composed from variable names, constants, functions, and
operators -- see Chapter 13 and
Section 24.3.4.
Expressions and fully-qualified names can be given an alias using the syntax
alias = expr. In that case, the alias name is used as un-qualified
name for this attribute and thus, values of this attribute can be accessed
by get_attribute(alias).
Next: Computing Variables
Up: Datasets
Previous: Loading Attributes
Index
info (at) urbansim.org