Giter VIP home page Giter VIP logo

covid-19-response-greece / covid19-greece-api Goto Github PK

View Code? Open in Web Editor NEW
47.0 16.0 14.0 854.92 MB

🦠 A simple and fast API for tracking the coronavirus (COVID-19) outbreak in Greece 🇬🇷

Home Page: https://covid-19-greece.herokuapp.com

License: European Union Public License 1.2

Python 80.60% CSS 4.19% HTML 15.15% Procfile 0.06%
covid-19 2019-ncov coronavirus coronavirus-tracker coronavirus-real-time api json-api rest-api python flask

covid19-greece-api's Introduction

Coronavirus Tracker API for Greece

This repository provides an API with real-time data about the Coronavirus (COVID-19) outbreak in Greece.

API page: https://covid-19-greece.herokuapp.com

This project is performed by volunteers of COVID-19 Response Greece.

Documentation

API documentation can be found here.

Example

All the endpoints are located at https://covid-19-greece.herokuapp.com/ and are accessible via https.

Example: Get the number of confirmed cases as timeseries

Querying

Request:

You can visit https://covid-19-greece.herokuapp.com/confirmed via a browser or run the following command:

curl https://covid-19-greece.herokuapp.com/confirmed | json_pp

Response:

{
  "cases": [
    {
      "date": "2020-01-22",
      "confirmed": 0
    },
    {
      "date": "2020-01-23",
      "confirmed": 0
    },
    ...
  ]
}   

Javascript

let url = "https://covid-19-greece.herokuapp.com/confirmed"

let response = await fetch(url);

if (response.ok) // if HTTP-status is 200-299
{ 
    // get the response body 
    let json = await response.json();
    console.log(json)
} 
else 
{
    alert("HTTP-Error: " + response.status);
}

Python

import requests

url = "https://covid-19-greece.herokuapp.com/confirmed"
response = requests.get(url)

print(response.json())

Data sources

This API combines data from multiple sources. All data are fetched from here and updated 3 times a day using Github Actions.

Requirements

Run the following command to install depedencies:

pip install -r requirements.txt 

How to run locally

python app.py

How to test locally

Example: Get the number of confirmed cases

Request:

curl -v localhost:5000/confirmed

Projects & Organizations utilizing Coronavirus Greece API (+ add yours!)

Adding your project to the list

If your project/organization utilizes the Coronavirus Greece API, you are kindly asked to place it here, under the following rules:

  • Add only open source projects.
  • Make sure to cite this repo under your project as a source (together with a link).
  • Follow the same order as in the rest of the list * [project_or_organization-name](project_or_organizatio-url) ([repo](repo-url)): description
  • Be careful to conform with the existing text formatting.

👉 Add a new project to the list

covid19-greece-api's People

Contributors

alexdelitzas avatar billmats96 avatar dmanolidis avatar gapan avatar georkoza avatar github-actions[bot] avatar hrkalona avatar macoleman avatar maniatisni avatar michael-xpub avatar mountzou avatar n0toose avatar nikospd avatar phaedon-vagionas avatar stamaleiferis avatar

Stargazers

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

Watchers

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

covid19-greece-api's Issues

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.