To use this notebook you must have a (free) FEO account, available here. You may then install the feo-client library, if necessary, and then use the package to log in. You can also run notebook in a Colab notebook via the badge below.
!pip install feo-client
from feo.client.auth import login
login()
Node¶
Object-oriented interface for Nodes via the Python client
In the FEO platform, all data is indexed to a Node
. Nodes are used to represent useful physical and administrative boundaries - ranging from individual physical assets through to entire countries and continents. This flexibility allows FEO users to access data at all levels of aggregation via the FEO platform .
In the physics of systems modelling, Nodes are discrete units around which the continuity of energy and materials is constrained. In other words, at every node in a systems model, the input plus supply to the node must equal the output plus demand.
To begin, import the Node
client.
from feo.client import Node
The Node.search
method can be used to search for Nodes.
Node.search("Bali")
Each search result is an instance of the Node
object.
IDN = Node.search("indonesia")[0]
IDN
Nodes have an id
which is unique. Nodes can have many names (or aliases
), one of which is attached to the node as a primary English name.
IDN.id, IDN.name_primary_en
Nodes may also be retrieved directly via their id
if it is known.
IDN = Node.from_id("IDN")
Nodes have a node_type
which describes what kind of node it is. FEO currently offers the following node_types
:
- Continents, RegionA, and RegionB: supernational regions as defined by UN.M49
- Admin0 and Admin1: nation states and top-level administrative areas defined by the database of Global Administrative Areas
- GridRegions: special areas defined by the physical and administrative boundaries of electricity grid infrastructure
- Substations: physical electricity grid substations
- PowerStations and PowerUnits: physical electricity generating assets, either as individual units, or aggregated into full facilities.
Nodes may also have a type_alias
. This is an alias for the node_type
which allows FEO to accurately descibe, for example, when an Admin1
node is called a State
or Province
, for example.
IDN.node_type, IDN.type_alias
All nodes have a geometry, whether it be a single point or an entire continent.
IDN.geometry.to_shape()
The spatial and administrative relationships between nodes are useful for aggregating and disaggregating node properties. Nodes have children
and parents
that can be used to traverse between nodes.
for child in IDN.children:
print(child)
for parent in IDN.parents:
print(parent)