Mastersam07 / ncovid-19-api

Nigeria covid-19-data api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

covid9ja api

Get Nigeria Covid-19 states by states

Programming Language Framework GitHub contributors GitHub last commit License

This project is discontinued and service shutdown

Serving data from NCDC(Nigeria Center For Disease Control) as a JSON API

πŸ’» Requirements

  • Any Operating System (ie. MacOS X, Linux, Windows)
  • Any IDE with python installed on your system(ie. Pycharm, VSCode etc)
  • A little knowledge of Python, Django and Web scrapping
  • Hands to code πŸ€“
  • A brain to think πŸ€“

✨ Features

  • Nigeria states and cases
  • Nigeria total cases
  • Nigeria daily cases

Dependencies

Routes

  • /: contains coreapi documentation

  • /api/docs: contains swagger documentation

  • /api/confirmed: generate a summary of all cases in Nigeria

  • /api/daily: generate a summary of all cases from apex day to current day

  • /api/daily/{id}: generate a summary of cases on a particular day id

  • /api/states: generate a summary of all infected states cases

  • /api/states/{id}: generate a summary of cases in a particular state given its id

Getting started

2. Clone the repo

$ git clone https://github.com/Mastersam07/ncovid-19-api.git
$ cd ncovid-19-api

4. Get requirements

$ pip install requirements.txt

5. Get the data

$ cd data_getter
$ python scraper.py

6. Migrate database

$ cd ..\api
$ python manage.py migrate

7. Run the application

$ python manage.py runserver

8. Run the application in deployment(debug: false)

  • Create the folder "static" in the project root directory
  • Add the below bit of code to settings.py
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
# Extra places for collectstatic to find static files.
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static'),
)
  • Run the below command in your terminal
$ python manage.py collectstatic
  • Your project is now production ready

πŸ“Έ ScreenShots

||| ||| ||

πŸ“ŠπŸ“ˆπŸ“‰

For the complete data in csv format, check the below:

❀️ Found this project useful?

If you found this project useful or you like what you see, then please consider giving it a ⭐ on Github and sharing it with your friends via social media.

πŸ› Bugs/Request

Encounter any problem(s)? feel free to open an issue. If you feel you could make something better, please raise a ticket on Github and I'll look into it. Pull request are also welcome.

Showcase

⭐️ License

Transitively from NCDC Site, the data may not be used for commercial purposes.

πŸ€“ Developer(s)

Abada Samuel Oghenero

Donate

If you found this project or the data helpful or you learned something from the source code and want to thank me, consider buying me a cup of β˜•

About

Nigeria covid-19-data api

License:MIT License


Languages

Language:Python 100.0%