{"id":22394855,"url":"https://github.com/blakley/census-api","last_synced_at":"2025-03-26T22:43:05.372Z","repository":{"id":157487693,"uuid":"400926656","full_name":"Blakley/Census-API","owner":"Blakley","description":"Custom built API for various US 2020 Census data","archived":false,"fork":false,"pushed_at":"2021-08-31T21:01:55.000Z","size":6162,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T04:27:33.398Z","etag":null,"topics":["flask-api","python","selenium-python","us-census"],"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/Blakley.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-29T01:40:05.000Z","updated_at":"2021-08-31T21:01:57.000Z","dependencies_parsed_at":"2023-06-17T20:33:46.585Z","dependency_job_id":null,"html_url":"https://github.com/Blakley/Census-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blakley%2FCensus-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blakley%2FCensus-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blakley%2FCensus-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blakley%2FCensus-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blakley","download_url":"https://codeload.github.com/Blakley/Census-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245749800,"owners_count":20666084,"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":["flask-api","python","selenium-python","us-census"],"created_at":"2024-12-05T05:11:58.218Z","updated_at":"2025-03-26T22:43:05.346Z","avatar_url":"https://github.com/Blakley.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# United States 2020 Census API\nAn unofficial API for various US 2020 Census data\n\n![census api](https://thumbs.gfycat.com/PartialBlissfulFlyingsquirrel-max-1mb.gif)\n\n## File Information\n`census.py` \nCreated a [selenium](https://selenium-python.readthedocs.io/) webscraper using the usa 2020 census from [census.gov](census.gov/data)\n\n`census_dictionary.py`\nA python dictionary of the extracted census values for each state\n\n`server.py`\nCreated a local API on `localhost:5000` for accessing the data for each state \n\n`states.py`\nA list of urls for each state on [census.gov](census.gov/data)\n\n`xpaths.py`\nxpath values for various elements used for accessing data on the census webpage\n\n## Routes\nAPI routes where `name` is the name of a state.\nNote: the first letter must be capitalized. Example: Alabama\n\n* return all the data for the state: `/state?=name` \n* get an overview of data for the state `/overview?=name`\n* get the population data for the state `/population?=name`\n* get the income data for the state `/income?=name`\n* get the education data for the state `/education?=name`\n* get the employment data for the state `/employment?=name`\n* get the housing data for the state `/housing?=name`\n* get the health data for the state `/health?=name`\n* get the economy data for the state `/economy?=name`\n* get the family data for the state `/family?=name`\n* get the race data for the state `/race?=name`\n\n\n## Dependencies\nDownload [ChromeDriver](https://chromedriver.chromium.org/downloads) and replace chromedriver.exe with the version that matches your chrome version\n\ninstall the following using pip\n```\n$ pip install selenium\n$ pip install flask\n$ pip install pprintpp\n```\n\n## Deployment\nTo test out the webscraper run the following\n```\n$ python census.py\n```\n\nTo simply use the API run the following \n```\n$ python server.py\n```\n\n## TODO\n * put the datasets into a csv file format\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakley%2Fcensus-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblakley%2Fcensus-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakley%2Fcensus-api/lists"}