{"id":16832524,"url":"https://github.com/misterhtmlcss/eia-co2-api","last_synced_at":"2025-08-03T03:07:34.617Z","repository":{"id":129102020,"uuid":"301520779","full_name":"misterhtmlcss/eia-co2-api","owner":"misterhtmlcss","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-10T20:41:53.000Z","size":204,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T09:09:31.110Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/misterhtmlcss.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":"2020-10-05T19:39:45.000Z","updated_at":"2020-10-10T20:41:55.000Z","dependencies_parsed_at":"2023-06-26T23:20:24.651Z","dependency_job_id":null,"html_url":"https://github.com/misterhtmlcss/eia-co2-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/misterhtmlcss%2Feia-co2-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misterhtmlcss%2Feia-co2-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misterhtmlcss%2Feia-co2-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misterhtmlcss%2Feia-co2-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misterhtmlcss","download_url":"https://codeload.github.com/misterhtmlcss/eia-co2-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244135897,"owners_count":20403797,"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":[],"created_at":"2024-10-13T11:49:21.222Z","updated_at":"2025-03-18T00:49:46.492Z","avatar_url":"https://github.com/misterhtmlcss.png","language":"JavaScript","readme":"## Purpose\n\n- Play with EIA API\n- Do something new with MongoDB\n\n## Requirements\n\n- Internet connection\n- Nodejs v10.x\n- NPM v\\*\n\n## How to install and run locally\n\n- `node -v` check to make sure your version is correct; see above requirements\n- `npm install`\n- Add your API key into the .env-rename file\n- Add your mongodb connection string into the .env-rename file\n- Rename .env-rename to .env\n- Dev `npm run dev` or Prod `npm start`\n- States available for testing are:\n  - ```\n    {\n      name: \"alabama\",\n      label: \"AL.A\",\n    },\n    {\n      name: \"alaska\",\n      label: \"AK.A\",\n    },\n    {\n      name: \"arizona\",\n      label: \"AZ.A\",\n    },\n    {\n      name: \"arkansas\",\n      label: \"AR.A\",\n    },\n    {\n      name: \"california\",\n      label: \"CA.A\",\n    }\n    ```\n\n## Routes to test using Postman\n\n- CO2 Emmissions from the year set in the params:\n  - [GET] `/api/v1/state?year=1980\u0026state=alabama`\n- CO2 Sum of emmissions between the years for the state set in the params:\n  - [GET] `/api/v1/tax?startYear=2003\u0026endYear=2006\u0026state=california`\n- COS Emissions of the states targetted and the data is pushed to MongoDB:\n  - [GET] `/api/v1/local`\n  - [POST] `/api/v1/save?state1=alabama\u0026state2=alaska\u0026state3=california\u0026state4=arizona`\n\n## Caveats\n\n- You'll need your own API Key from EIA\n- You'll need your own MongDB Atlas Key\n- It isn't configured to work in production\n\n## Q\u0026A\n\nWho is this project for?\n\n- No one. It's to meet a made up specification to test my ability to write a backend.\n\nWhat is the performance criteria?\n\n- None. As long as it runs and deploys then it's right.\n\n# Author\n\n- Roger Kondrat\n- URL: rogerkondrat.com\n- Twitter: @misterhtmlcss\n- Last Updated: 07/10/2020 (DD/MM/YYYY)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisterhtmlcss%2Feia-co2-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisterhtmlcss%2Feia-co2-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisterhtmlcss%2Feia-co2-api/lists"}