Giter VIP home page Giter VIP logo

ncovid-19-api's Introduction

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 โ˜•

ncovid-19-api's People

Contributors

dependabot[bot] avatar imgbotapp avatar mastersam07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ncovid-19-api's Issues

Changes

API has not been consistent due to changes in the data structure on NCDC site. API data could go stale for almost 24hours due to delay in updating data on NCDC site. A new feature is being made to fetch the data every 3hours and account for changes in data structure. This should be a lasting fix as API structure must be maintained.

Stale data

Data seems to be stale again. Api results do not match ncdc data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.