{"id":13671503,"url":"https://github.com/andreagrandi/covid-api","last_synced_at":"2025-03-21T10:31:25.960Z","repository":{"id":46637165,"uuid":"244003580","full_name":"andreagrandi/covid-api","owner":"andreagrandi","description":"COVID19 Api based on Johns Hopkins CSSE data","archived":false,"fork":false,"pushed_at":"2021-10-02T13:24:30.000Z","size":117,"stargazers_count":60,"open_issues_count":8,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-12T18:59:12.690Z","etag":null,"topics":["api","covid","covid-19","covid-api","covid19","covid19-data","database","hacktoberfest","johns-hopkins-csse","python"],"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/andreagrandi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-29T16:38:09.000Z","updated_at":"2023-12-30T23:54:09.000Z","dependencies_parsed_at":"2022-08-29T22:11:48.017Z","dependency_job_id":null,"html_url":"https://github.com/andreagrandi/covid-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/andreagrandi%2Fcovid-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreagrandi%2Fcovid-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreagrandi%2Fcovid-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreagrandi%2Fcovid-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreagrandi","download_url":"https://codeload.github.com/andreagrandi/covid-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221814051,"owners_count":16884971,"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":["api","covid","covid-19","covid-api","covid19","covid19-data","database","hacktoberfest","johns-hopkins-csse","python"],"created_at":"2024-08-02T09:01:11.276Z","updated_at":"2024-10-28T09:49:51.948Z","avatar_url":"https://github.com/andreagrandi.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# covid-api\n\nCOVID19 Api based on Johns Hopkins CSSE data (more data sources are coming).\n\n[![CircleCI](https://circleci.com/gh/andreagrandi/covid-api.svg?style=svg)](https://circleci.com/gh/andreagrandi/covid-api)\n\nThe intent of this project is to create an API which will make easier to access the COVID19 reports provided by the Johns Hopkins CSSE and other data sources available.\nUsing this API researchers can concentrate their efforts on data analysis while we take care of retriving the data, cleaning it and keeping the database always updated.\n\n# Data Sources\n\n- Johns Hopkins CSSE: https://github.com/CSSEGISandData/COVID-19\n\n# Status\n\nWe have essentially reached an MVP status (see #20 for more information) and live data is available at https://api.covid19data.cloud\n\nNow we are working on improving features (like adding more query filters for existing endpoints) and better cleaning the available data.\n\nThe next step will be to add more data sources.\n\n# Usage Example (Python)\n\n```\nIn [1]: import requests\n\nIn [2]: response = requests.get('https://api.covid19data.cloud/v1/jh/daily-reports?last_update_from=2020-04-01\u0026last_update_to=2020-04-03\u0026country=Italy')\n\nIn [3]: response.json()\nOut[3]:\n[{'id': 35343,\n  'country_region': 'Italy',\n  'province_state': None,\n  'fips': None,\n  'admin2': None,\n  'last_update': '2020-04-01T21:58:34',\n  'confirmed': 110574,\n  'deaths': 13155,\n  'recovered': 16847},\n {'id': 37895,\n  'country_region': 'Italy',\n  'province_state': None,\n  'fips': None,\n  'admin2': None,\n  'last_update': '2020-04-02T23:25:14',\n  'confirmed': 115242,\n  'deaths': 13915,\n  'recovered': 18278}]\n```\n\nFurther API documentation is available at https://api.covid19data.cloud/docs\n\n# Development Setup\n\n## Postgres database\nYou will need a postgres database to run the application.\nIf you have [docker](https://docs.docker.com/get-started/) installed, then you can create a database by running\n\n```\ndocker-compose up db\n```\n\nThis creates an empty database called `covidapi`, and a user called `covidapi` with password `dummypassword`.\n\n## Running the app through docker\nIf you run `docker-compose up` instead of `docker-compose up db`, the whole app will be run inside docker as well.\n\nThe first time you do this you will need to run `docker-compose exec app python /covidapi/covidapi/import_data.py` to import the data.\n\n## Running the app directly\nTo run the app directly you will need python 3.7 or later.\n\nCreate a virtualenv, activate it, and then install the dependencies:\n\n```\npython -m venv env\nsource ./env/bin/activate\npip install -r requirements.txt\n```\n\nTo import the data, run\n\n```\npython import_data.py jh --all\n```\n\nThen you can run the app with:\n\n```\nuvicorn covidapi.app:app --reload\n```\n\n## Viewing the API\nThe API will be served at [http://localhost:8000/](http://localhost:8000/)\n\nThe API docs are served at [http://localhost:8000/docs](http://localhost:8000/docs)\n\n## Deployment\nThe lastest `master` branch is automatically deployed to Heroku whenever a pull request is merged (and tests are passing on CircleCI).\n\nSee [deploying to heroku](./docs/heroku-deploy.md).\n\n# Sponsors and Thanks\n\n- [Heroku](https://www.heroku.com): for sponsoring the costs of running the service\n\n# Disclaimer\n\nWe are doing our best to keep the available data updated, clean (removing duplicates), and to provide a reliable service, but we are not in any way responsible for the accuracy of the data nor for the availability of the service itself. Please **use it at your own risk**.\n\n**Abuse notice:** we are currently not requiring any registration or authentication to use this service because we would like to keep it as simple as possible. Please do not abuse the service or you will force us to require a registration (subject to approval) to continue using it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreagrandi%2Fcovid-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreagrandi%2Fcovid-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreagrandi%2Fcovid-api/lists"}