{ "info": { "author": "Shreyas Gadgin Matha", "author_email": "shreyas.gm61@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Economic Complexity and Product Complexity\n\nPython package to calculate economic complexity indices.\n\nSTATA implementation of the economic complexity index available at: https://github.com/cid-harvard/ecomplexity\n\nExplore complexity and associated data using Harvard CID's Atlas tool: http://atlas.cid.harvard.edu\n\n### Tutorial\n\n**Installation**:\nAt terminal: `pip install ecomplexity`\n\n**Usage**:\n```python\nfrom ecomplexity import ecomplexity\nfrom ecomplexity import proximity\n\n# Import trade data from CID Atlas\ndata_url = \"https://intl-atlas-downloads.s3.amazonaws.com/country_hsproduct2digit_year.csv.zip\"\ndata = pd.read_csv(data_url, compression=\"zip\", low_memory=False)\ndata = data[['year','location_code','hs_product_code','export_value']]\n\n# Calculate complexity\ntrade_cols = {'time':'year', 'loc':'location_code', 'prod':'hs_product_code', 'val':'export_value'}\ncdata = ecomplexity(data, trade_cols)\n\n# Calculate proximity matrix\nprox_df = proximity(data, trade_cols)\n```\n**Arguments**:\n```\ndata: pandas dataframe containing production / trade data.\n Including variables indicating time, location, product and value\ncols_input: dict of column names for time, location, product and value.\n Example: {'time':'year', 'loc':'origin', 'prod':'hs92', 'val':'export_val'}\npresence_test: str for test used for presence of industry in location.\n One of \"rca\" (default), \"rpop\", \"both\", or \"manual\".\n Determines which values are used for M_cp calculations.\n If \"manual\", M_cp is taken as given from the \"value\" column in data\nval_errors_flag: {'coerce','ignore','raise'}. Passed to pd.to_numeric\n *default* coerce.\nrca_mcp_threshold: numeric indicating RCA threshold beyond which mcp is 1.\n *default* 1.\nrpop_mcp_threshold: numeric indicating RPOP threshold beyond which mcp is 1.\n *default* 1. Only used if presence_test is not \"rca\".\npop: pandas df, with time, location and corresponding population, in that order.\n Not required if presence_test is \"rca\" (default).\ncontinuous: Used to calculate product proximities, indicates whether\n to consider correlation of every product pair (True) or product\n co-occurrence (False). *default* False.\nasymmetric: Used to calculate product proximities, indicates whether\n to generate asymmetric proximity matrix (True) or symmetric (False).\n *default* False.\n```\n\n### TODO:\n\n- There are very minor differences in the values of density, COI and COG between STATA and Python due to the way matrix computations are handled by the two. These should be aligned in the future.\n- knn options for density: in the future, allow knn parameter for density calculation\n\n### References:\n- Hausmann, R., Hidalgo, C. A., Bustos, S., Coscia, M., Simoes, A., & Y\u0131ld\u0131r\u0131m, M. (2013). The Atlas of Economic Complexity: Mapping Paths to Prosperity (Part 1). Retrieved from https://growthlab.cid.harvard.edu/files/growthlab/files/atlas_2013_part1.pdf\n- Hidalgo, C. A., Klinger, B., Barabasi, A.-L., & Hausmann, R. (2007). The Product Space Conditions the Development of Nations. Science, 317(5837), 482\u2013487. http://doi.org/10.1126/science.1144581\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cid-harvard/py-ecomplexity", "keywords": "pandas python networks economics complexity", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ecomplexity", "package_url": "https://pypi.org/project/ecomplexity/", "platform": "", "project_url": "https://pypi.org/project/ecomplexity/", "project_urls": { "Homepage": "https://github.com/cid-harvard/py-ecomplexity" }, "release_url": "https://pypi.org/project/ecomplexity/0.4/", "requires_dist": [ "pandas (>0.23.0)", "numpy (>1.15.0)" ], "requires_python": ">=3", "summary": "Package to calculate economic complexity and associated variables", "version": "0.4" }, "last_serial": 5081893, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "6ae6e1190ae24942e940e67f0fc39eec", "sha256": "0cb2f6fdfb12f9205065a61115f9ba5c14c90f9c31797548c2ef7717eb6b58f6" }, "downloads": -1, "filename": "ecomplexity-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6ae6e1190ae24942e940e67f0fc39eec", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 10809, "upload_time": "2019-04-03T02:33:32", "url": "https://files.pythonhosted.org/packages/88/6e/af0267072976ff505bd727761dae33ee57c45fa84cfa42c26dd307f7f5eb/ecomplexity-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "98d91ea4a445c1fb2e164659f9d5e502", "sha256": "1d7368fa5b48d55ce1b6e81210e08132cb7f5294fa2ce471297d5a4c02996ac8" }, "downloads": -1, "filename": "ecomplexity-0.3.tar.gz", "has_sig": false, "md5_digest": "98d91ea4a445c1fb2e164659f9d5e502", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 7376, "upload_time": "2019-04-03T02:33:34", "url": "https://files.pythonhosted.org/packages/a9/a3/a46cf99485f5a6a0af830130add9fa8761b51bef013303586bbdb7d65294/ecomplexity-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "1e097faee0674b0adca9232ee69a2141", "sha256": "04697f3e3dfe99c0bcf1a3e76271259e2dae46be3fcbfbfbeb4d8364e129e61c" }, "downloads": -1, "filename": "ecomplexity-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1e097faee0674b0adca9232ee69a2141", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 11371, "upload_time": "2019-04-03T02:45:10", "url": "https://files.pythonhosted.org/packages/65/1e/8e86d5a6a13b26d5bc266429324b09c97d7c6902168793c5a111a470efb2/ecomplexity-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f235fcc0adadce614b87dd96fd664b78", "sha256": "d613e8c39970ad5d588e1dafbc314097b2d36ed3a92cf9deb3253dddbe227cf2" }, "downloads": -1, "filename": "ecomplexity-0.4.tar.gz", "has_sig": false, "md5_digest": "f235fcc0adadce614b87dd96fd664b78", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 7529, "upload_time": "2019-04-03T02:45:13", "url": "https://files.pythonhosted.org/packages/9f/56/ac052fdce6a15279a2f372c7361dee2f1c5f925d5ace349ba74336336e3f/ecomplexity-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1e097faee0674b0adca9232ee69a2141", "sha256": "04697f3e3dfe99c0bcf1a3e76271259e2dae46be3fcbfbfbeb4d8364e129e61c" }, "downloads": -1, "filename": "ecomplexity-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1e097faee0674b0adca9232ee69a2141", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 11371, "upload_time": "2019-04-03T02:45:10", "url": "https://files.pythonhosted.org/packages/65/1e/8e86d5a6a13b26d5bc266429324b09c97d7c6902168793c5a111a470efb2/ecomplexity-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f235fcc0adadce614b87dd96fd664b78", "sha256": "d613e8c39970ad5d588e1dafbc314097b2d36ed3a92cf9deb3253dddbe227cf2" }, "downloads": -1, "filename": "ecomplexity-0.4.tar.gz", "has_sig": false, "md5_digest": "f235fcc0adadce614b87dd96fd664b78", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 7529, "upload_time": "2019-04-03T02:45:13", "url": "https://files.pythonhosted.org/packages/9f/56/ac052fdce6a15279a2f372c7361dee2f1c5f925d5ace349ba74336336e3f/ecomplexity-0.4.tar.gz" } ] }