# graphs_for_economics
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
This file will become your README and also the index of your
documentation.
## Install
``` sh
pip install graphs_for_economics
```
## How to use
``` python
graph = Graph_free_market()
supply_function = " x**2"
demand_function = "1000 - x**2"
```
``` python
consumer_surplus = graph.get_consumer_surplus(supply_function, demand_function)
print("Consumer Surplus:", consumer_surplus)
producer_surplus = graph.get_producer_surplus(supply_function, demand_function)
print("Producer Surplus:", producer_surplus)
economic_surplus = graph.get_economic_surplus(supply_function, demand_function)
print("Economic Surplus:", economic_surplus)
```
Consumer Surplus: 7451
Producer Surplus: 18454
Economic Surplus: 25905
``` python
graph.market_graph(supply_function, demand_function,0, 40, 10, complete=True)
```
![](index_files/figure-commonmark/cell-4-output-1.png)
``` python
price = graph.get_price(supply_function, demand_function)
quantity = graph.get_quantity(supply_function, demand_function)
print(f"Price: {price}, Quantity: {quantity}")
```
Price: 500, Quantity: 22
Raw data
{
"_id": null,
"home_page": "https://github.com/uh2000/graphs_for_economics",
"name": "graphs-for-economics",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "nbdev jupyter notebook python",
"author": "Ulrik",
"author_email": "ulrikhaugland1@hotmail.no",
"download_url": "https://files.pythonhosted.org/packages/3e/25/6756f027f6b9d71315209052caa9e9441c0dfeebe25054e93a1c51988445/graphs_for_economics-0.0.5.tar.gz",
"platform": null,
"description": "# graphs_for_economics\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\nThis file will become your README and also the index of your\ndocumentation.\n\n## Install\n\n``` sh\npip install graphs_for_economics\n```\n\n## How to use\n\n``` python\ngraph = Graph_free_market()\nsupply_function = \" x**2\"\ndemand_function = \"1000 - x**2\"\n```\n\n``` python\nconsumer_surplus = graph.get_consumer_surplus(supply_function, demand_function)\nprint(\"Consumer Surplus:\", consumer_surplus)\n\nproducer_surplus = graph.get_producer_surplus(supply_function, demand_function)\nprint(\"Producer Surplus:\", producer_surplus)\n\neconomic_surplus = graph.get_economic_surplus(supply_function, demand_function)\n\nprint(\"Economic Surplus:\", economic_surplus)\n```\n\n Consumer Surplus: 7451\n Producer Surplus: 18454\n Economic Surplus: 25905\n\n``` python\ngraph.market_graph(supply_function, demand_function,0, 40, 10, complete=True)\n```\n\n![](index_files/figure-commonmark/cell-4-output-1.png)\n\n``` python\nprice = graph.get_price(supply_function, demand_function)\nquantity = graph.get_quantity(supply_function, demand_function)\nprint(f\"Price: {price}, Quantity: {quantity}\")\n```\n\n Price: 500, Quantity: 22\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "graphs for economics",
"version": "0.0.5",
"project_urls": {
"Homepage": "https://github.com/uh2000/graphs_for_economics"
},
"split_keywords": [
"nbdev",
"jupyter",
"notebook",
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e1f709103ec37f59962df63554812c59b1d565f9f3d2219266a29a316156c728",
"md5": "62c2357287dfca29eeb08348b9080a40",
"sha256": "6c7e9b39e35949b6b8ba394c3361e6f09c2ef8eaafa2880c5abdd7fb49f14523"
},
"downloads": -1,
"filename": "graphs_for_economics-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "62c2357287dfca29eeb08348b9080a40",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 10264,
"upload_time": "2023-12-24T14:10:53",
"upload_time_iso_8601": "2023-12-24T14:10:53.947705Z",
"url": "https://files.pythonhosted.org/packages/e1/f7/09103ec37f59962df63554812c59b1d565f9f3d2219266a29a316156c728/graphs_for_economics-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3e256756f027f6b9d71315209052caa9e9441c0dfeebe25054e93a1c51988445",
"md5": "af5f54679fb0788d4c6d1123fd524e8f",
"sha256": "4b4c23bf740df7b6065f81ec2e71e882d27a0ae19375ba18f8b661b92eb76b73"
},
"downloads": -1,
"filename": "graphs_for_economics-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "af5f54679fb0788d4c6d1123fd524e8f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 11146,
"upload_time": "2023-12-24T14:10:55",
"upload_time_iso_8601": "2023-12-24T14:10:55.349755Z",
"url": "https://files.pythonhosted.org/packages/3e/25/6756f027f6b9d71315209052caa9e9441c0dfeebe25054e93a1c51988445/graphs_for_economics-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-24 14:10:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "uh2000",
"github_project": "graphs_for_economics",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "graphs-for-economics"
}