diff --git a/dev/Add AWARE CFs.ipynb b/dev/Add AWARE CFs.ipynb index ed7b115..45fea33 100644 --- a/dev/Add AWARE CFs.ipynb +++ b/dev/Add AWARE CFs.ipynb @@ -72,54 +72,21 @@ { "cell_type": "code", "execution_count": 5, - "id": "e8d6e17a-b837-4f49-8690-2f83f63bbdb1", + "id": "44ea71cf-b21f-4f9d-8ad4-45dafbdaa8ff", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'AR',\n", - " 'AU',\n", - " 'Asia, South East',\n", - " 'BR',\n", - " 'CA',\n", - " 'CI',\n", - " 'CM',\n", - " 'CN',\n", - " 'CO',\n", - " 'CR',\n", - " 'DE',\n", - " 'EC',\n", - " 'ES',\n", - " 'Europe, Eastern',\n", - " 'Europe, Western',\n", - " 'FR',\n", - " 'FSU',\n", - " 'GB',\n", - " 'GLO',\n", - " 'IE',\n", - " 'IL',\n", - " 'IT',\n", - " 'KE',\n", - " 'MX',\n", - " 'MY',\n", - " 'Mixed data',\n", - " 'NO',\n", - " None,\n", - " 'PE',\n", - " 'PH',\n", - " 'RAF',\n", - " 'RER',\n", - " 'RLA',\n", - " 'RME',\n", - " 'RNA',\n", - " 'RU',\n", - " 'SAS',\n", - " 'South and Central America',\n", - " 'TH',\n", - " 'UA',\n", - " 'US',\n", - " 'World'}" + "['Water, unspecified natural origin' (cubic meter, None, ('natural resource', 'in water')),\n", + " 'Water, in air' (cubic meter, None, ('natural resource', 'in air')),\n", + " 'Water, well, in ground' (cubic meter, None, ('natural resource', 'in water')),\n", + " 'Water, turbine use, unspecified natural origin' (cubic meter, None, ('natural resource', 'in water')),\n", + " 'Water, river' (cubic meter, None, ('natural resource', 'in water')),\n", + " 'Water, lake' (cubic meter, None, ('natural resource', 'in water')),\n", + " 'Water, unspecified natural origin' (cubic meter, None, ('natural resource', 'in ground')),\n", + " 'Water, unspecified natural origin' (cubic meter, None, ('natural resource', 'fossil well')),\n", + " 'Water, cooling, unspecified natural origin' (cubic meter, None, ('natural resource', 'in water'))]" ] }, "execution_count": 5, @@ -128,12 +95,53 @@ } ], "source": [ - "{x['location'] for x in bd.Database(\"agribalyse-3.1.1\")}" + "consumption = [\n", + " x \n", + " for x in bd.Database('ecoinvent-3.10-biosphere') \n", + " if x['name'].lower().startswith(\"water\")\n", + " and not x['name'].lower().startswith(\"water, salt\")\n", + " and x['categories'][0] == 'natural resource'\n", + "]\n", + "consumption" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "a4ace76f-8565-462e-90ce-409599fa268f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['Water' (cubic meter, None, ('water', 'surface water')),\n", + " 'Water' (cubic meter, None, ('water', 'ground-')),\n", + " 'Water' (cubic meter, None, ('water',)),\n", + " 'Water' (cubic meter, None, ('water', 'ocean'))]" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "release = [\n", + " x \n", + " for x in bd.Database('ecoinvent-3.10-biosphere') \n", + " if x['name'].lower().startswith(\"water\")\n", + " and not x['name'].lower().startswith(\"water, salt\")\n", + " and x['categories'][0] != 'natural resource'\n", + " and x['categories'][0] != 'air'\n", + " and x['categories'] != ('water', 'ground-, long-term')\n", + " and x['categories'] != ('water', 'fossil well')\n", + "]\n", + "release" ] }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 7, "id": "4058e380-1fae-4ab8-812b-359232f42a6d", "metadata": {}, "outputs": [ @@ -356,10 +364,12 @@ " (32.72436, 'RNA'),\n", " (59.81223, 'RME'),\n", " (42.52015, 'ENTSO-E'),\n", + " (5.61269, 'CS'),\n", + " (83.75014, 'PS'),\n", " (68.29584, 'UN-OCEANIA')]" ] }, - "execution_count": 28, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -373,7 +383,7 @@ " 'OCEANIA': 'UN-OCEANIA',\n", " 'ENTSOE': 'ENTSO-E'\n", "}\n", - "IGNORE = {'World AGRI', 'World NON-AGRI', 'Europe-CH', 'RoW',\"BRIC\",\"BRICS\",\"OECD\",\"OECD+BRIC\",\"OECD+BRICS\",\"CS\",\"PS\", \"REGIONS\"}\n", + "IGNORE = {'World AGRI', 'World NON-AGRI', 'Europe-CH', 'RoW',\"BRIC\",\"BRICS\",\"OECD\",\"OECD+BRIC\",\"OECD+BRICS\",\"REGIONS\"}\n", "\n", "for row_dict in df.to_dict(orient=\"records\"):\n", " if not isinstance(row_dict['Unnamed: 0'], str) and math.isnan(row_dict['Unnamed: 0']):\n", @@ -404,112 +414,32 @@ }, { "cell_type": "code", - "execution_count": 7, - "id": "caa805c4-388e-4e4f-ab42-508f1fda9081", - "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "[Project: 2.5 examples in action,\n", - " Project: 3.10-test-import-bio,\n", - " Project: 36 APOS test,\n", - " Project: 371 APOS test,\n", - " Project: 38 APOS test,\n", - " Project: __ecoinvent__project__,\n", - " Project: ab-dev-test,\n", - " Project: agribalyse-3.1.1 transformations,\n", - " Project: Agrifootprint - economic - 2022,\n", - " Project: agrifootprint-2022-import,\n", - " Project: agrobalyse-3.1.1 import test,\n", - " Project: agrobalyse-3.1.1 randonneur,\n", - " Project: agrobalyse-3.1.1 transformations,\n", - " Project: another-one,\n", - " Project: check-units-bug,\n", - " Project: Cytiva,\n", - " Project: DARE,\n", - " Project: default,\n", - " Project: dmeo-marin,\n", - " Project: ecoinvent 3.8 cutoff bw2,\n", - " Project: ecoinvent-3.8-cutoff,\n", - " Project: ecoinvent-3.8-cutoff RS bug,\n", - " Project: ecoinvent-3.9.1-all,\n", - " Project: ecoinvent-3.9.1-consequential,\n", - " Project: ecoinvent-3.9.1-cutoff,\n", - " Project: ecoinvent-migration,\n", - " Project: ecoinvent-multiversion-cutoff,\n", - " Project: ecoinvent-multiversion-cutoff-base,\n", - " Project: ecoinvent-test-import,\n", - " Project: Exiobase 3.8.1 monetary,\n", - " Project: EXIOBASE regionalized case study,\n", - " Project: exiobase tests,\n", - " Project: FiBL analysis,\n", - " Project: forwast,\n", - " Project: from-the-ground-up,\n", - " Project: GSA for archetypes,\n", - " Project: hi-bas,\n", - " Project: IKEA SimaPro CSV import,\n", - " Project: ikea-base,\n", - " Project: import-directory,\n", - " Project: import-grouped-directory,\n", - " Project: import-with-migrations,\n", - " Project: IPCC 2021 OpenLCA,\n", - " Project: jsvg1,\n", - " Project: jsvg3,\n", - " Project: jsvg4,\n", - " Project: LC IMPACT case study,\n", - " Project: matchbox-example,\n", - " Project: mf-demo,\n", - " Project: mf-test-manual,\n", - " Project: moar-multi6,\n", - " Project: multi6,\n", - " Project: multifunctional-demo,\n", - " Project: multifunctional-example,\n", - " Project: multifunctional-manual,\n", - " Project: multifunctional-products-example,\n", - " Project: multifunctional_demo,\n", - " Project: other,\n", - " Project: porto,\n", - " Project: sandwich,\n", - " Project: Sanofi,\n", - " Project: search-test,\n", - " Project: simapro-matching-attempt,\n", - " Project: simapro_import_multifunctional_import,\n", - " Project: simapro_migration,\n", - " Project: Simple calcs example BW25,\n", - " Project: Speed tests,\n", - " Project: spreadsheet,\n", - " Project: supply chain graph,\n", - " Project: to_dataframe,\n", - " Project: to_dataframe Exiobase 3.8.1 monetary,\n", - " Project: to_dataframe USEEIO,\n", - " Project: tutorial,\n", - " Project: US EEIO 1.1,\n", - " Project: US LCI import,\n", - " Project: USEEIO,\n", - " Project: USEEIO example,\n", - " Project: USEEIO-1.1,\n", - " Project: useeio-ex,\n", - " Project: xt-vector-test]" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": 8, + "id": "111d5719-5ac6-4a58-9c26-773415cf34f5", + "metadata": {}, + "outputs": [], "source": [ - "sorted(bd.projects)" + "aware = bd.Method((\"AWARE\", \"unspecified\", \"2.1 (2023-01-13)\"))\n", + "aware.register(\n", + " unit=\"Availability Minus Demand (AMD), m**3/m**2/month\",\n", + " description=\"\"\"AWARE is a water use midpoint indicator representing the relative Available WAter REmaining per area in a watershed, after the demand of humans and aquatic ecosystems has been met. It assesses the potential of water deprivation, to either humans or ecosystems, building on the assumption that the less water remaining available per area, the more likely another user will be deprived. It is first calculated as the water Availability Minus the Demand (AMD) of humans and aquatic ecosystems and is relative to the area (m3 m-2 month-1). In a second step, the value is normalized with the world average result (AMD = 0.0136m3m-2 month-1) and inverted, and hence represents the relative value in comparison with the average m3 consumed in the world (the world average is calculated as a consumption-weighted average). Once inverted, 1/AMD can be interpreted as a surface-time equivalent to generate unused water in this region. The indicator is limited to a range from 0.1 to 100, with a value of 1 corresponding to the world average, and a value of 10, for example, representing a region where there is 10 times less available water remaining per area than the world average.\"\"\",\n", + " url = \"http://www.wulca-waterlca.org/aware.html\"\n", + ")\n", + "aware.write(\n", + " [\n", + " (flow.key, score, location) \n", + " for flow in consumption for score, location in cfs\n", + " ] \n", + " + [\n", + " (flow.key, score * -1, location) \n", + " for flow in release for score, location in cfs\n", + " ]\n", + ")" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 9, "id": "9195885e-d0d3-49eb-b609-c5fee5aa13dc", "metadata": {}, "outputs": [], @@ -529,7 +459,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 10, "id": "8781f546-f99e-4630-941f-f8b4f9c9dcb3", "metadata": {}, "outputs": [ @@ -561,160 +491,160 @@ " 'UCTE': 'ENTSO-E',\n", " 'WECC': 'US',\n", " 'WEU': 'RER',\n", - " 'CN-SC': 'CN',\n", - " 'CN-NWG': 'CN',\n", - " 'IN-WB': 'IN',\n", - " 'US-PR': 'US',\n", - " 'BR-Northern grid': 'BR',\n", - " 'CN-HE': 'CN',\n", - " 'IN-CH': 'IN',\n", - " 'IN-GA': 'IN',\n", - " 'IN-Northern grid': 'IN',\n", - " 'AU-WA': 'AU',\n", - " 'IN-MH': 'IN',\n", - " 'CN-LN': 'CN',\n", - " 'CN-GX': 'CN',\n", - " 'CN-JL': 'CN',\n", - " 'US-WA': 'US',\n", - " 'CN-SA': 'CN',\n", - " 'CN-CSG': 'CN',\n", - " 'CA-NB': 'CA',\n", - " 'BR-North-eastern grid': 'BR',\n", - " 'IN-SK': 'IN',\n", - " 'IN-AR': 'IN',\n", - " 'IN-PB': 'IN',\n", - " 'US-SERC': 'US',\n", - " 'CN-YN': 'CN',\n", - " 'IN-TN': 'IN',\n", - " 'CN-QH': 'CN',\n", - " 'IN-RJ': 'IN',\n", - " 'BR-AM': 'BR',\n", + " 'IN-Eastern grid': 'IN',\n", + " 'IN-DD': 'IN',\n", " 'BR-PA': 'BR',\n", - " 'BR-PE': 'BR',\n", - " 'CA-SK': 'CA',\n", - " 'CN-NECG': 'CN',\n", - " 'US-MN': 'US',\n", - " 'CA-NT': 'CA',\n", + " 'CN-SA': 'CN',\n", + " 'CN-XJ': 'CN',\n", + " 'CN-BJ': 'CN',\n", + " 'BR-ES': 'BR',\n", + " 'BR-Southern grid': 'BR',\n", + " 'IN-KA': 'IN',\n", + " 'CN-HA': 'CN',\n", " 'CA-NF': 'CA',\n", - " 'US-CA': 'US',\n", - " 'IN-MP': 'IN',\n", + " 'IN-WB': 'IN',\n", + " 'CN-HN': 'CN',\n", + " 'IN-HR': 'IN',\n", + " 'BR-PE': 'BR',\n", + " 'CA-BC': 'CA',\n", + " 'IN-BR': 'IN',\n", + " 'BR-SE': 'BR',\n", + " 'US-FL': 'US',\n", + " 'BR-MA': 'BR',\n", + " 'CA-QC': 'CA',\n", + " 'CN-NWG': 'CN',\n", + " 'BR-South-eastern/Mid-western grid': 'BR',\n", + " 'IN-DL': 'IN',\n", + " 'CN-NCGC': 'CN',\n", + " 'IN-ML': 'IN',\n", + " 'IN-NL': 'IN',\n", + " 'CA-NU': 'CA',\n", " 'AU-QLD': 'AU',\n", - " 'BR-TO': 'BR',\n", - " 'CN-CQ': 'CN',\n", + " 'CN-GX': 'CN',\n", + " 'IN-DN': 'IN',\n", " 'CN-HU': 'CN',\n", + " 'BR-RS': 'BR',\n", + " 'CA-YK': 'CA',\n", + " 'IN-JK': 'IN',\n", + " 'US-SERC': 'US',\n", + " 'IN-SK': 'IN',\n", + " 'US-CO': 'US',\n", + " 'CA-PE': 'CA',\n", " 'BR-AC': 'BR',\n", - " 'BR-SE': 'BR',\n", - " 'CN-ECGC': 'CN',\n", - " 'CN-NM': 'CN',\n", - " 'BR-MA': 'BR',\n", - " 'CN-GS': 'CN',\n", - " 'BR-MS': 'BR',\n", - " 'US-OH': 'US',\n", - " 'CN-GD': 'CN',\n", - " 'IN-UP': 'IN',\n", - " 'US-IA': 'US',\n", - " 'CA-NS': 'CA',\n", - " 'CN-AH': 'CN',\n", - " 'BR-AL': 'BR',\n", + " 'US-MRO': 'US',\n", + " 'CN-SGCC': 'CN',\n", + " 'CN-ZJ': 'CN',\n", " 'US-ND': 'US',\n", - " 'BR-PR': 'BR',\n", - " 'CN-FJ': 'CN',\n", - " 'US-HICC': 'US',\n", + " 'US-PR': 'US',\n", " 'IN-PY': 'IN',\n", - " 'US-ASCC': 'US',\n", - " 'IN-Eastern grid': 'IN',\n", - " 'US-CO': 'US',\n", - " 'AU-TAS': 'AU',\n", - " 'CA-AB': 'CA',\n", - " 'CN-HL': 'CN',\n", - " 'IN-DL': 'IN',\n", - " 'CA-PE': 'CA',\n", - " 'US-FL': 'US',\n", - " 'BR-PB': 'BR',\n", - " 'BR-RS': 'BR',\n", - " 'CA-NU': 'CA',\n", - " 'CN-CCG': 'CN',\n", - " 'IN-KA': 'IN',\n", - " 'IN-Southern grid': 'IN',\n", - " 'IN-BR': 'IN',\n", - " 'CN-HN': 'CN',\n", + " 'US-IN': 'US',\n", + " 'US-NPCC': 'US',\n", + " 'IN-AS': 'IN',\n", + " 'IN-GJ': 'IN',\n", + " 'BR-MS': 'BR',\n", + " 'BR-AP': 'BR',\n", " 'CN-GZ': 'CN',\n", + " 'IN-Southern grid': 'IN',\n", + " 'US-OR': 'US',\n", + " 'CN-CCG': 'CN',\n", + " 'CA-AB': 'CA',\n", + " 'IN-UP': 'IN',\n", + " 'CA-ON': 'CA',\n", + " 'BR-PI': 'BR',\n", + " 'CN-ECGC': 'CN',\n", " 'BR-RO': 'BR',\n", + " 'AU-TAS': 'AU',\n", + " 'BR-PB': 'BR',\n", + " 'CN-FJ': 'CN',\n", + " 'US-RFC': 'US',\n", + " 'CN-HE': 'CN',\n", + " 'CN-SWG': 'CN',\n", + " 'IN-North-eastern grid': 'IN',\n", + " 'BR-TO': 'BR',\n", " 'CN-TJ': 'CN',\n", - " 'IN-MN': 'IN',\n", - " 'US-OR': 'US',\n", - " 'CN-SH': 'CN',\n", - " 'IN-AP': 'IN',\n", - " 'CA-MB': 'CA',\n", + " 'CN-GD': 'CN',\n", + " 'CA-SK': 'CA',\n", + " 'CN-NX': 'CN',\n", + " 'US-ASCC': 'US',\n", + " 'BR-RR': 'BR',\n", + " 'IN-Northern grid': 'IN',\n", + " 'BR-AM': 'BR',\n", + " 'IN-MP': 'IN',\n", + " 'IN-RJ': 'IN',\n", " 'IN-CT': 'IN',\n", - " 'CN-NCGC': 'CN',\n", - " 'US-WI': 'US',\n", - " 'US-SD': 'US',\n", - " 'BR-MT': 'BR',\n", - " 'IN-GJ': 'IN',\n", - " 'BR-GO': 'BR',\n", - " 'IN-OR': 'IN',\n", - " 'CN-SD': 'CN',\n", - " 'BR-BA': 'BR',\n", + " 'CN-NECG': 'CN',\n", + " 'IN-MH': 'IN',\n", + " 'CN-LN': 'CN',\n", + " 'IN-TN': 'IN',\n", + " 'CN-NM': 'CN',\n", + " 'BR-North-eastern grid': 'BR',\n", + " 'CN-QH': 'CN',\n", + " 'BR-DF': 'BR',\n", + " 'US-WA': 'US',\n", + " 'CN-JL': 'CN',\n", + " 'CN-SX': 'CN',\n", + " 'CN-YN': 'CN',\n", + " 'IN-HP': 'IN',\n", " 'CN-JX': 'CN',\n", + " 'AU-SA': 'AU',\n", + " 'BR-PR': 'BR',\n", + " 'US-CA': 'US',\n", + " 'AU-WA': 'AU',\n", + " 'BR-SC': 'BR',\n", + " 'IN-OR': 'IN',\n", + " 'US-ID': 'US',\n", + " 'US-SD': 'US',\n", " 'BR-RJ': 'BR',\n", - " 'CN-ZJ': 'CN',\n", - " 'CA-YK': 'CA',\n", - " 'US-IL': 'US',\n", - " 'IN-JH': 'IN',\n", - " 'BR-SP': 'BR',\n", - " 'AU-VIC': 'AU',\n", - " 'IN-DD': 'IN',\n", - " 'BR-AP': 'BR',\n", - " 'US-IN': 'US',\n", - " 'US-RFC': 'US',\n", - " 'IN-HP': 'IN',\n", - " 'BR-MG': 'BR',\n", - " 'BR-RR': 'BR',\n", " 'IN-Western grid': 'IN',\n", - " 'BR-DF': 'BR',\n", - " 'IN-ML': 'IN',\n", - " 'BR-PI': 'BR',\n", - " 'US-ID': 'US',\n", - " 'BR-ES': 'BR',\n", - " 'IN-North-eastern grid': 'IN',\n", - " 'BR-South-eastern/Mid-western grid': 'BR',\n", - " 'IN-AS': 'IN',\n", - " 'CN-SGCC': 'CN',\n", - " 'IN-DN': 'IN',\n", - " 'CN-XZ': 'CN',\n", - " 'CN-XJ': 'CN',\n", - " 'US-WECC': 'US',\n", - " 'CN-HA': 'CN',\n", - " 'IN-HR': 'IN',\n", - " 'AU-NSW': 'AU',\n", + " 'CN-HL': 'CN',\n", + " 'IN-KL': 'IN',\n", + " 'CN-CSG': 'CN',\n", " 'BR-CE': 'BR',\n", - " 'CA-BC': 'CA',\n", - " 'US-NPCC': 'US',\n", - " 'IN-JK': 'IN',\n", - " 'CN-BJ': 'CN',\n", + " 'CN-HB': 'CN',\n", + " 'CN-SH': 'CN',\n", + " 'CA-MB': 'CA',\n", " 'IN-MZ': 'IN',\n", - " 'US-TRE': 'US',\n", - " 'CA-ON': 'CA',\n", - " 'CN-NX': 'CN',\n", + " 'IN-UT': 'IN',\n", + " 'IN-AP': 'IN',\n", + " 'CN-CQ': 'CN',\n", " 'CN-JS': 'CN',\n", - " 'BR-SC': 'BR',\n", - " 'CN-HB': 'CN',\n", - " 'BR-RN': 'BR',\n", + " 'CA-NB': 'CA',\n", + " 'US-WI': 'US',\n", + " 'AU-NSW': 'AU',\n", + " 'BR-Northern grid': 'BR',\n", + " 'BR-BA': 'BR',\n", + " 'CN-AH': 'CN',\n", " 'US-NE': 'US',\n", - " 'CN-SWG': 'CN',\n", + " 'CN-XZ': 'CN',\n", + " 'US-OH': 'US',\n", + " 'US-MN': 'US',\n", + " 'CN-SC': 'CN',\n", + " 'BR-MG': 'BR',\n", + " 'US-IL': 'US',\n", + " 'IN-MN': 'IN',\n", + " 'CA-NT': 'CA',\n", + " 'BR-MT': 'BR',\n", + " 'IN-CH': 'IN',\n", + " 'IN-GA': 'IN',\n", + " 'IN-AR': 'IN',\n", + " 'CN-GS': 'CN',\n", + " 'CA-NS': 'CA',\n", + " 'BR-GO': 'BR',\n", + " 'AU-VIC': 'AU',\n", + " 'BR-SP': 'BR',\n", + " 'BR-RN': 'BR',\n", " 'IN-TR': 'IN',\n", - " 'IN-UT': 'IN',\n", - " 'CN-SX': 'CN',\n", - " 'IN-NL': 'IN',\n", - " 'US-MRO': 'US',\n", - " 'IN-KL': 'IN',\n", - " 'CA-QC': 'CA',\n", - " 'BR-Southern grid': 'BR',\n", - " 'AU-SA': 'AU'}" + " 'US-IA': 'US',\n", + " 'IN-PB': 'IN',\n", + " 'US-HICC': 'US',\n", + " 'US-TRE': 'US',\n", + " 'IN-JH': 'IN',\n", + " 'CN-SD': 'CN',\n", + " 'BR-AL': 'BR',\n", + " 'US-WECC': 'US'}" ] }, - "execution_count": 17, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -761,72 +691,23 @@ }, { "cell_type": "code", - "execution_count": 10, - "id": "44ea71cf-b21f-4f9d-8ad4-45dafbdaa8ff", + "execution_count": 11, + "id": "1c30a709-dde0-4d1b-bf60-2139f76f79e6", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['Water, cooling, unspecified natural origin' (cubic meter, None, ('natural resource', 'in water')),\n", - " 'Water, unspecified natural origin' (cubic meter, None, ('natural resource', 'in water')),\n", - " 'Water, unspecified natural origin' (cubic meter, None, ('natural resource', 'in ground')),\n", - " 'Water, well, in ground' (cubic meter, None, ('natural resource', 'in water')),\n", - " 'Water, turbine use, unspecified natural origin' (cubic meter, None, ('natural resource', 'in water')),\n", - " 'Water, lake' (cubic meter, None, ('natural resource', 'in water')),\n", - " 'Water, in air' (cubic meter, None, ('natural resource', 'in air')),\n", - " 'Water, unspecified natural origin' (cubic meter, None, ('natural resource', 'fossil well')),\n", - " 'Water, river' (cubic meter, None, ('natural resource', 'in water'))]" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "consumption = [\n", - " x \n", - " for x in bd.Database('ecoinvent-3.10-biosphere') \n", - " if x['name'].lower().startswith(\"water\")\n", - " and not x['name'].lower().startswith(\"water, salt\")\n", - " and x['categories'][0] == 'natural resource'\n", - "]\n", - "consumption" + "bd.databases['ecoinvent-3.10-cutoff'][\"location_normalization\"] = mapping\n", + "bd.databases.flush()" ] }, { "cell_type": "code", - "execution_count": 14, - "id": "a4ace76f-8565-462e-90ce-409599fa268f", + "execution_count": 12, + "id": "badf2ec3-199c-494a-80cd-fcd2dadc4ca1", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['Water' (cubic meter, None, ('water', 'ground-')),\n", - " 'Water' (cubic meter, None, ('water', 'ocean')),\n", - " 'Water' (cubic meter, None, ('water',)),\n", - " 'Water' (cubic meter, None, ('water', 'surface water'))]" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "release = [\n", - " x \n", - " for x in bd.Database('ecoinvent-3.10-biosphere') \n", - " if x['name'].lower().startswith(\"water\")\n", - " and not x['name'].lower().startswith(\"water, salt\")\n", - " and x['categories'][0] != 'natural resource'\n", - " and x['categories'][0] != 'air'\n", - " and x['categories'] != ('water', 'ground-, long-term')\n", - " and x['categories'] != ('water', 'fossil well')\n", - "]\n", - "release" + "bd.Database('ecoinvent-3.10-cutoff').process()" ] }, { @@ -857,6 +738,68 @@ "list(bd.databases)" ] }, + { + "cell_type": "code", + "execution_count": 5, + "id": "e8d6e17a-b837-4f49-8690-2f83f63bbdb1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'AR',\n", + " 'AU',\n", + " 'Asia, South East',\n", + " 'BR',\n", + " 'CA',\n", + " 'CI',\n", + " 'CM',\n", + " 'CN',\n", + " 'CO',\n", + " 'CR',\n", + " 'DE',\n", + " 'EC',\n", + " 'ES',\n", + " 'Europe, Eastern',\n", + " 'Europe, Western',\n", + " 'FR',\n", + " 'FSU',\n", + " 'GB',\n", + " 'GLO',\n", + " 'IE',\n", + " 'IL',\n", + " 'IT',\n", + " 'KE',\n", + " 'MX',\n", + " 'MY',\n", + " 'Mixed data',\n", + " 'NO',\n", + " None,\n", + " 'PE',\n", + " 'PH',\n", + " 'RAF',\n", + " 'RER',\n", + " 'RLA',\n", + " 'RME',\n", + " 'RNA',\n", + " 'RU',\n", + " 'SAS',\n", + " 'South and Central America',\n", + " 'TH',\n", + " 'UA',\n", + " 'US',\n", + " 'World'}" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "{x['location'] for x in bd.Database(\"agribalyse-3.1.1\")}" + ] + }, { "cell_type": "code", "execution_count": 3, @@ -915,7 +858,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.10" + "version": "3.10.14" } }, "nbformat": 4,