{"id":21740977,"url":"https://github.com/atxtechbro/feddebtceiling","last_synced_at":"2025-03-21T01:16:01.097Z","repository":{"id":214685333,"uuid":"418249151","full_name":"atxtechbro/fedDebtCeiling","owner":"atxtechbro","description":"$911.91 per capita of federal debt was added to the nations balance sheet on October 14th as the lifting of the federal debt ceiling was followed by a surge of borrowing","archived":false,"fork":false,"pushed_at":"2021-10-18T02:09:31.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T21:28:02.793Z","etag":null,"topics":["json","pandas-tricks-for-data-manipulation","python3","requests","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atxtechbro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-10-17T20:34:22.000Z","updated_at":"2021-10-18T02:09:33.000Z","dependencies_parsed_at":"2023-12-29T23:06:35.253Z","dependency_job_id":null,"html_url":"https://github.com/atxtechbro/fedDebtCeiling","commit_stats":null,"previous_names":["atxtechbro/feddebtceiling"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atxtechbro%2FfedDebtCeiling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atxtechbro%2FfedDebtCeiling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atxtechbro%2FfedDebtCeiling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atxtechbro%2FfedDebtCeiling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atxtechbro","download_url":"https://codeload.github.com/atxtechbro/fedDebtCeiling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717339,"owners_count":20498284,"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":["json","pandas-tricks-for-data-manipulation","python3","requests","rest-api"],"created_at":"2024-11-26T06:16:07.691Z","updated_at":"2025-03-21T01:16:01.079Z","avatar_url":"https://github.com/atxtechbro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fedDebtCeiling\n$911.91 was added to YOUR portion of the federal debt last week on just one day! Is that true? Let's test it out in Python using high quality federal data sources\n\nPython test framework - https://github.com/mojo-py/fedDebtCeiling\nThe code is short enough at about 25 lines to serve as it's own documentation, and includes a link to the official API documentation from Treasury Dept.\n\n\nIn this short script, we take the following steps:\n\n1) construct a parametized url\n2) using the url, making a GET request from the US Treasury 'debt_to_penny' API endpoint\n3) loading the response data into JSON\n4) passing that response to create a pandas DataFrame object\n5) shifting the dataframe back by 1 day to make a calculated column called ['netChange'] which is net daily debt change ie todays debt - yesterdays debt = df['netChange\n6) calculating the quotient of the numerator (net daily debt change or $299,000,000,000) over the denominator, total USA population(population=328_239_523)\n7) population / df.loc['2021-10-14']['netChange'] = result\n8) apply string formatting to result and interpolate result into f-string and print it\n\n## evaluates as TRUE\n\nSources - \u003e\n\nUS Census Bureau Population estimates, July 1, 2019, (V2019)\nU.S. Department of the Treasury FiscalData Rest API https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/debt_to_penny?fields=record_date,tot_pub_debt_out_amt\u0026filter=record_date:gte:2021-08-01\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatxtechbro%2Ffeddebtceiling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatxtechbro%2Ffeddebtceiling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatxtechbro%2Ffeddebtceiling/lists"}