{"id":16223655,"url":"https://github.com/lykmapipo/us-gas-prices","last_synced_at":"2025-04-08T01:45:31.289Z","repository":{"id":213966081,"uuid":"731201743","full_name":"lykmapipo/US-Gas-Prices","owner":"lykmapipo","description":"Python scripts that scrape US gas prices","archived":false,"fork":false,"pushed_at":"2025-03-25T20:59:29.000Z","size":1773,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T17:53:20.668Z","etag":null,"topics":["aaa","ci-cd","data-extraction","data-preprocessing","data-transformation","gas","github-actions","joblib","lykmapipo","metro","pandas","prices","python","selenium","selenium-python","state","us","webdriver-manager","webscraper","webscraping"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lykmapipo.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":"2023-12-13T15:03:21.000Z","updated_at":"2025-03-25T20:59:33.000Z","dependencies_parsed_at":"2025-04-02T21:28:07.225Z","dependency_job_id":"64ae0973-4a22-4e5a-b7f0-c13da35235fa","html_url":"https://github.com/lykmapipo/US-Gas-Prices","commit_stats":null,"previous_names":["lykmapipo/us-gas-prices"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2FUS-Gas-Prices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2FUS-Gas-Prices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2FUS-Gas-Prices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2FUS-Gas-Prices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lykmapipo","download_url":"https://codeload.github.com/lykmapipo/US-Gas-Prices/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761030,"owners_count":20991533,"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":["aaa","ci-cd","data-extraction","data-preprocessing","data-transformation","gas","github-actions","joblib","lykmapipo","metro","pandas","prices","python","selenium","selenium-python","state","us","webdriver-manager","webscraper","webscraping"],"created_at":"2024-10-10T12:19:38.440Z","updated_at":"2025-04-08T01:45:31.266Z","avatar_url":"https://github.com/lykmapipo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# US-Gas-Prices\n\nPython scripts that scrape US gas prices.\n\n\u003e 👋 This repository's maintainer is available to hire for US gas prices data-extraction consulting projects. To get a cost estimate, send email to lallyelias87@gmail.com (for projects of any size or complexity).\n\n## Requirements\n\n- [Python 3.8.17+](https://www.python.org/)\n- [pip 24.2+](https://github.com/pypa/pip)\n- [selenium 4.14.0+](https://github.com/SeleniumHQ/selenium/tree/trunk/py)\n- [webdriver-manager 4.0.2+](https://github.com/SergeyPirogov/webdriver_manager)\n- [pandas 2.0.3+](https://github.com/pandas-dev/pandas)\n\n## Usage\n\n- Clone this repository\n```sh\ngit clone https://github.com/lykmapipo/US-Gas-Prices.git\ncd US-Gas-Prices\n```\n\n- Install all dependencies\n\n```sh\npip install -r requirements.txt\n```\n\n- To scrape [state gas price daily averages](https://gasprices.aaa.com/state-gas-price-averages/), run:\n\n```sh\npython scrape_state_daily_averages.py\n```\n\n- To scrape [metro gas price daily averages](https://gasprices.aaa.com/state-gas-price-averages/), run:\n\n```sh\npython scrape_metro_daily_averages.py\n```\n\n## Data Exploration\nThe scraped data are saved in `csv` format, and may be found under `data` folder.\n\n- Explore part of the data using `pandas`, use:\n```python\nimport pandas as pd\n\n# file = \"./data/metro-daily-averages/2023-12-27.csv\"\nfile = \"./data/state-daily-averages/2023-12-27.csv\"\ndf = pd.read_csv(file)\n\ndf.info()\n```\n\n- To explore all the data using `pandas`, use:\n```python\nimport glob\nimport pandas as pd\n\n# files = glob.glob(\"./data/metro-daily-averages/*.csv\")\nfiles = glob.glob(\"./data/state-daily-averages/*.csv\")\ndfs = [pd.read_csv(file) for file in files]\ndf = pd.concat(dfs, ignore_index=True)\n\ndf.info()\n```\n\n## Contribute\n\nIt will be nice, if you open an issue first so that we can know what is going on, then, fork this repo and push in your ideas. Do not forget to add a bit of test(s) of what value you adding.\n\n## Questions/Contacts\n\nlallyelias87@gmail.com, or open a GitHub issue\n\n\n## Licence\n\nThe MIT License (MIT)\n\nCopyright (c) lykmapipo \u0026 Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykmapipo%2Fus-gas-prices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flykmapipo%2Fus-gas-prices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykmapipo%2Fus-gas-prices/lists"}