transition-zero / tz-client

A client repository for accessing FEO data programmatically.
https://docs.feo.transitionzero.org
Apache License 2.0
21 stars 4 forks source link

Allow filtering by node-type for node children #127

Open isabellasoldner opened 4 months ago

isabellasoldner commented 4 months ago

Feature Type

Problem Description

When getting all the node children of a higher level node it currently gives nodes of every type. So if you search for europe you get "GBR"," NORTHERN-EUROPE" and "GBR-PN".

It would be nice to automatically filter these nodes by "node type" eg. for the use-case "I want all the countries in Europe" , it would only give me "GBR" and not "GBR-PN" etc.

Europe = Node.search("Europe")
for child in Europe[0].children:
    print(child)

Feature Description

Europe = Node.search("Europe")
print(Europe)
for child in Europe[0].children.admin0:
    print(child)