{"id":18929571,"url":"https://github.com/alexanderthclark/freeride","last_synced_at":"2025-04-15T15:31:08.237Z","repository":{"id":44900689,"uuid":"397681068","full_name":"alexanderthclark/FreeRide","owner":"alexanderthclark","description":"Easy equilibrium analysis for linear demand and supply and other topics covered in an introductory undergraduate microeconomics course. This is an in-progress Python package.","archived":false,"fork":false,"pushed_at":"2025-02-01T18:59:07.000Z","size":4031,"stargazers_count":21,"open_issues_count":4,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T11:55:34.883Z","etag":null,"topics":["econ001","econ101","microeconomics"],"latest_commit_sha":null,"homepage":"https://freeride.readthedocs.io/en/latest/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexanderthclark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-18T17:19:06.000Z","updated_at":"2025-03-12T15:23:15.000Z","dependencies_parsed_at":"2024-11-08T11:37:30.835Z","dependency_job_id":"d18a7684-8450-45cc-bdce-bb4a31ee8c51","html_url":"https://github.com/alexanderthclark/FreeRide","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexanderthclark%2FFreeRide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexanderthclark%2FFreeRide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexanderthclark%2FFreeRide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexanderthclark%2FFreeRide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexanderthclark","download_url":"https://codeload.github.com/alexanderthclark/FreeRide/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249097872,"owners_count":21212365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["econ001","econ101","microeconomics"],"created_at":"2024-11-08T11:33:42.733Z","updated_at":"2025-04-15T15:31:07.258Z","avatar_url":"https://github.com/alexanderthclark.png","language":"Jupyter Notebook","readme":"# Intro-Microeconomics\n\nThis is a package for introductory microeconomics topics. Find additional code, albeit unpackaged, in the loose-code branch. This new refactor does not yet have all of the same capabilities as in the old unpackaged code. \n\n# Example Usage\n\n`Demand` and `Supply` objects can be created in several ways, but most naturally with the `from_formula` class method. The method requires an explicit slope, so `\"P=12-1*Q\"` or `\"P=12-1Q\"` must be used instead of `\"P=12-Q\"`.\n\n```\nfrom freeride.curves import Demand, Supply\nd1 = Demand.from_formula(\"Q = 10 - 1*P\")\nd2 = Demand.from_formula(\"P = 15 - 2*Q\")\ns1 = Supply.from_formula('Q = 2*P')\ns2 = Supply.from_formula('Q = 2*P - 1')\n```\n\nThe addition operator performs horizontal summation, allowing aggregation.\n\n```\nd = d1 + d2\ns = s1 + s2\n```\n\nThen you can solve for and plot an equilibrium.\n\n```\nfrom freeride.equilibrium import Equilibrium\ne = Equilibrium(d, s)\nprint(e.p, e.q)\ne.plot()\n```\n\nUse matplotlib to customize plots further. \n\n```\nimport matplotlib.pyplot as plt\n\nax = e.plot()\nax.set_ylim(0, 16)\n\n# Label curves\nax.text(2, d(2) + 0.05,\n        s='D',\n        fontsize=16,\n        horizontalalignment='left',\n        verticalalignment='bottom')\n\nax.text(16, s(16) + 0.05,\n        s='S',\n        fontsize=16,\n        horizontalalignment='right',\n        verticalalignment='bottom')\n\n# Label equilibrium\nax.text(e.q, e.p + 2,\n        s=f'Q={e.q:.2f}, P={e.p:.2f}',\n        horizontalalignment='center',\n        verticalalignment='bottom')\n\nplt.savefig(\"equilibrium.svg\", transparent=True)\nplt.show()\n```\n\n![equilibrium.svg](equilibrium.svg)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexanderthclark%2Ffreeride","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexanderthclark%2Ffreeride","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexanderthclark%2Ffreeride/lists"}