{ "info": { "author": "Chris Mutel", "author_email": "cmutel@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "# bw_migrations\n\nMigration data and utilities for Brightway IO and LCA in general\n\n[![Build Status](https://travis-ci.org/brightway-lca/bw_migrations.svg?branch=master)](https://travis-ci.org/brightway-lca/bw_migrations) [![Coverage Status](https://coveralls.io/repos/github/brightway-lca/bw_migrations/badge.svg?branch=master)](https://coveralls.io/github/brightway-lca/bw_migrations?branch=master) [![Build status](https://ci.appveyor.com/api/projects/status/lk0tbo21v2irm48x?svg=true)](https://ci.appveyor.com/project/cmutel/bw-migrations)\n\nMost databases use their own nomenclature for classification systems, units, etc. These systems need to be matched when linking from one database to another. Often, a simple mapping is suitable, and tools like [correspondentia](https://github.com/BONSAMURAIS/correspondentia) are a good fit. However, sometimes one needs more complexity, e.g. change field X to Y, but only if field A has value B. When ecoinvent released version 3, they changed their unit of mesaure for water from kilograms to cubic meters. ``bw_migrations`` provides tools for this more complicated transformations, and is built around the following data format:\n\n {\n # The fields on which to filter\n 'fields': ['name', 'category', 'unit'],\n 'data': [\n (\n # First element is input data in the order of `fields` above\n ('Water', 'air', 'kilogram'),\n # Second element is new values to substitute when all fields match\n {\n 'unit': 'cubic meter',\n '__multiplier__': 0.001\n }\n )\n ]\n }\n\nAnd is implemented with the following pseudo-code:\n\n for element in input_data:\n for original, new in migration['data']:\n if all(element[field] == original[field] for field in migration['fields']):\n element.update(dict(zip(migration['fields'], new)))\n\nThe actual code is a bit more complex, as `bw_migrations` can also do rescaling of probability distributions and disaggregation migrations (splitting one object into several outputs).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/brightway-lca/bw_migrations", "keywords": "", "license": "NewBSD 3-clause; LICENSE", "maintainer": "", "maintainer_email": "", "name": "bw-migrations", "package_url": "https://pypi.org/project/bw-migrations/", "platform": "", "project_url": "https://pypi.org/project/bw-migrations/", "project_urls": { "Homepage": "https://github.com/brightway-lca/bw_migrations" }, "release_url": "https://pypi.org/project/bw-migrations/0.2/", "requires_dist": null, "requires_python": "", "summary": "Migration data and utilities for Brightway IO and LCA in general", "version": "0.2", "yanked": false, "yanked_reason": null }, "last_serial": 11602984, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "8705b78ffa5ca1d9dfa13cb296293f8e", "sha256": "d6f79bbbe4de96d11d9918da93c0021a1ef4e6720f5b32b4b7e5888b5e93f6af" }, "downloads": -1, "filename": "bw_migrations-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8705b78ffa5ca1d9dfa13cb296293f8e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8485, "upload_time": "2019-10-29T20:01:16", "upload_time_iso_8601": "2019-10-29T20:01:16.608640Z", "url": "https://files.pythonhosted.org/packages/4f/01/d62328ede4195cb18ff8dc6e8fc040fdda4095b352a8cb79080788368a09/bw_migrations-0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "e1eb308126c9a8950ff1845fbb8e8e71", "sha256": "5a568fc157735b383bd4fc45ddf739e1a2029cafbe764eb84c9b302a4e52b4d1" }, "downloads": -1, "filename": "bw_migrations-0.1.tar.gz", "has_sig": false, "md5_digest": "e1eb308126c9a8950ff1845fbb8e8e71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8850, "upload_time": "2019-10-29T20:02:02", "upload_time_iso_8601": "2019-10-29T20:02:02.546738Z", "url": "https://files.pythonhosted.org/packages/e2/b1/8c46d0cd0d552cffee729ff7b18c70adbb029e60c52dff750218050e9d6b/bw_migrations-0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2": [ { "comment_text": "", "digests": { "md5": "77dda1fa197b42ad87b42b9f04e7f72f", "sha256": "229d99a820cbcf18854ce6a3870552e8feebb89b9342abbafaa1a6d95a57dff9" }, "downloads": -1, "filename": "bw_migrations-0.2.tar.gz", "has_sig": false, "md5_digest": "77dda1fa197b42ad87b42b9f04e7f72f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10196, "upload_time": "2021-10-01T12:15:45", "upload_time_iso_8601": "2021-10-01T12:15:45.042494Z", "url": "https://files.pythonhosted.org/packages/51/56/647c42d2c7ec041da11a04cb583e8ec4f14b3cae2ed420669ef5e443ae43/bw_migrations-0.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "77dda1fa197b42ad87b42b9f04e7f72f", "sha256": "229d99a820cbcf18854ce6a3870552e8feebb89b9342abbafaa1a6d95a57dff9" }, "downloads": -1, "filename": "bw_migrations-0.2.tar.gz", "has_sig": false, "md5_digest": "77dda1fa197b42ad87b42b9f04e7f72f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10196, "upload_time": "2021-10-01T12:15:45", "upload_time_iso_8601": "2021-10-01T12:15:45.042494Z", "url": "https://files.pythonhosted.org/packages/51/56/647c42d2c7ec041da11a04cb583e8ec4f14b3cae2ed420669ef5e443ae43/bw_migrations-0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }