premise-community-scenarios / scenario-example-bread

This is an example of a repository containing a custom prospective scenario for bread, to be used in premise
2 stars 3 forks source link

exercise-car-europe GitHub release (latest by date) DOI

Description

This is an example of a repository containing a custom prospective scenario for analysing the environmental impacts of the future European car fleet.

Sourced from publication

None

Data validation

None

Test

GitHubAction example workflow

Ecoinvent database compatibility

ecoinvent 3.9.1 cut-off

IAM scenario compatibility

Compatible with the following IAM scenarios:

How to use it?


    import brightway2 as bw
    from premise import NewDatabase
    from datapackage import Package

    fp = r"https://raw.githubusercontent.com/romainsacchi/exercise-car-europe/main/datapackage.json"
    bread = Package(fp)

    external_scenarios = [{"scenario": "SPS", "data": bread},]

    bw.projects.set_current("your_bw_project")

    ndb = NewDatabase(
            scenarios = [
                {"model":"image", "pathway":"SSP2-Base", "year":2050, "external scenarios": external_scenarios}},
                {"model":"image", "pathway":"SSP2-RCP26", "year":2030, "external scenarios": external_scenarios}},
            ],        
            source_db="ecoinvent 3.9.1 cutoff",
            source_version="3.9",
            key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        )

    ndb.update("external") # or ndb.update() to include the IAM scenario and the external one