Tekoa: A Domain-Specific Language for Defining Opus Variables. The variable concept in Opus Problems with defining Opus variables in Python Tekoa examples Syntax Status and Plans for Further Work User discussion & wish list. The Variable Concept in Opus.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
% definition of zone.average_income in Python
from opus_core.variables.variable import Variable
return ["household.income", "zone.zone_id”,
def compute(self, dataset_pool):
households = dataset_pool.get_dataset("household”)
households, "mean", "income")
% *** code for unit tests omitted ***
% Tekoa definition
average_income = zone.aggregate(household.income, function=mean)
% employment in the ‘large_area’ geography
intermediates=[parcel, zone, faz])
% definition of parcel.is_pre_1940
% is the average building age for a parcel
% older than 1940?
is_pre_1940 = parcel.aggregate(building.year_built *numpy.ma.masked_where(urbansim_parcel.building.has_valid_year_built==0, 1),
function=mean) < 1940