示例#1
0
def main():

    log.debug('Subsets available: ' + ", ".join(map(str, fedefl.subset_list.get_subsets())))

    subsets = None

    inventory_methods = lciafmt.get_method(method_id='FEDEFL Inventory',subset=subsets)
    
    store_method(inventory_methods, method)
    save_json(method, inventory_methods)
示例#2
0
def main():

    data = lciafmt.get_method(method)

    # map the flows to the Fed.LCA commons flows
    # set preserve_unmapped=True if you want to keep unmapped
    # flows in the resulting data frame
    mapping = method.get_metadata()['mapping']
    mapped_data = lciafmt.map_flows(data, system=mapping)

    mapped_data = collapse_indicators(mapped_data)

    # write the result to parquet and JSON-LD
    store_method(mapped_data, method)
    for m in mapped_data['Method'].unique():
        save_json(method, mapped_data, m)
示例#3
0
def main():

    data = lciafmt.get_method(method)
    
    if mod is not None:
        log.info("getting modified CFs")
        modified_cfs=get_modification(mod,"TRACI2.1")
        data = data.merge(modified_cfs,how='left',on=['Flowable','Context','Indicator'])
        data.loc[data['Updated CF'].notnull(),'Characterization Factor']=data['Updated CF']
        data = data.drop(columns=['Updated CF','Note'])
        data['Method']="TRACI 2.1 ("+mod+" mod)"
    
    # map the flows to the Fed.LCA commons flows
    # set preserve_unmapped=True if you want to keep unmapped
    # flows in the resulting data frame
    mapping = method.get_metadata()['mapping']
    mapped_data = lciafmt.map_flows(data, system=mapping)

    # write the result to parquet and JSON-LD
    store_method(mapped_data, method)
    save_json(method, mapped_data)
示例#4
0
def main():

    data = lciafmt.get_method(method, endpoint=True, summary=apply_summary)

    # make flowables case insensitive to handle lack of consistent structure in source file
    data['Flowable'] = data['Flowable'].str.lower()

    # map the flows to the Fed.LCA commons flows
    # set preserve_unmapped=True if you want to keep unmapped
    # flows in the resulting data frame
    mapping = method.get_metadata()['mapping']
    mapped_data = lciafmt.map_flows(data,
                                    system=mapping,
                                    case_insensitive=True)

    mapped_data = collapse_indicators(mapped_data)

    # write the result to parquet and JSON-LD
    store_method(mapped_data, method)
    for m in mapped_data['Method'].unique():
        save_json(method, mapped_data, m)