Convert Figma logo to code with AI

pomber logocovid19

JSON time-series of coronavirus cases (confirmed, deaths and recovered) per country - updated daily

1,227
375
1,227
10

Top Related Projects

29,136

Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE

Data on COVID-19 (coronavirus) cases, deaths, hospitalizations, tests • All countries • Updated daily by Our World in Data

2,127

COVID-19 App

Coronavirus tracker app for iOS & macOS with maps & charts

Tracking the impact of COVID-19 in India

Quick Overview

The pomber/covid19 repository is a JSON time-series of coronavirus cases by country, updated daily. It provides a simple and accessible way to track the progression of COVID-19 cases across different countries over time, making it useful for data analysis, visualization, and research purposes.

Pros

  • Regularly updated with daily data
  • Easy-to-use JSON format
  • Covers a wide range of countries
  • Data sourced from reliable sources (Johns Hopkins University Center for Systems Science and Engineering)

Cons

  • Limited to confirmed cases, deaths, and recovered numbers
  • May not include detailed regional or city-level data
  • Potential for delays in data updates depending on source reporting
  • Does not include additional contextual information (e.g., testing rates, population demographics)

Code Examples

// Fetch the latest COVID-19 data
fetch("https://pomber.github.io/covid19/timeseries.json")
  .then(response => response.json())
  .then(data => {
    console.log(data["US"]);
  });
# Plot COVID-19 cases for a specific country
import requests
import matplotlib.pyplot as plt

data = requests.get("https://pomber.github.io/covid19/timeseries.json").json()
country_data = data["Italy"]

dates = [entry["date"] for entry in country_data]
confirmed_cases = [entry["confirmed"] for entry in country_data]

plt.plot(dates, confirmed_cases)
plt.title("COVID-19 Confirmed Cases in Italy")
plt.xlabel("Date")
plt.ylabel("Confirmed Cases")
plt.show()
# Calculate daily new cases for a country
library(jsonlite)
library(dplyr)

data <- fromJSON("https://pomber.github.io/covid19/timeseries.json")
uk_data <- data$UK %>% 
  mutate(new_cases = confirmed - lag(confirmed, default = first(confirmed)))

print(uk_data)

Getting Started

To use the COVID-19 data in your project:

  1. Make a GET request to https://pomber.github.io/covid19/timeseries.json
  2. Parse the JSON response
  3. Access country data using country names as keys

Example in JavaScript:

async function getCOVIDData() {
  const response = await fetch("https://pomber.github.io/covid19/timeseries.json");
  const data = await response.json();
  return data;
}

getCOVIDData().then(data => {
  const usData = data["US"];
  console.log("Latest US data:", usData[usData.length - 1]);
});

Competitor Comparisons

29,136

Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE

Pros of COVID-19

  • More comprehensive dataset, including global and US-specific data
  • Regularly updated by Johns Hopkins University, a trusted source
  • Includes additional data points like recovered cases and testing rates

Cons of COVID-19

  • Raw data format requires more processing for immediate use
  • Larger file sizes due to comprehensive nature
  • May be overwhelming for users seeking simple, straightforward data

Code Comparison

COVID-19 data format (CSV):

Province/State,Country/Region,Lat,Long,Date,Confirmed,Deaths,Recovered
New York,US,40.7128,-74.0060,2023-04-15,1234567,98765,1111111

covid19 data format (JSON):

{
  "US": [
    {
      "date": "2023-04-15",
      "confirmed": 1234567,
      "deaths": 98765,
      "recovered": 1111111
    }
  ]
}

The COVID-19 repository provides raw CSV data, while covid19 offers pre-processed JSON data, making it easier to integrate into web applications. However, COVID-19's format allows for more detailed geographical information.

Data on COVID-19 (coronavirus) cases, deaths, hospitalizations, tests • All countries • Updated daily by Our World in Data

Pros of covid-19-data

  • More comprehensive dataset, including vaccination data and additional metrics
  • Regularly updated with daily frequency
  • Includes data visualization tools and pre-made charts

Cons of covid-19-data

  • Larger file size and more complex structure
  • May require more processing for simple use cases
  • Steeper learning curve for data manipulation

Code Comparison

covid-19-data:

import pandas as pd

df = pd.read_csv('https://covid.ourworldindata.org/data/owid-covid-data.csv')
country_data = df[df['location'] == 'United States']
print(country_data[['date', 'total_cases', 'new_cases', 'total_deaths']])

covid19:

import requests
import json

url = 'https://pomber.github.io/covid19/timeseries.json'
response = json.loads(requests.get(url).text)
us_data = response['US']
print(us_data)

The covid-19-data repository offers a more extensive dataset with additional features, making it suitable for complex analyses. However, covid19 provides a simpler JSON structure that may be easier to work with for basic use cases. Both repositories offer valuable COVID-19 data, but users should choose based on their specific needs and data processing capabilities.

2,127

COVID-19 App

Pros of app

  • Official WHO repository, likely more authoritative and reliable
  • Broader scope, covering general health information beyond COVID-19
  • Multi-platform support (iOS, Android, Web) for wider accessibility

Cons of app

  • Less frequently updated compared to covid19
  • More complex codebase, potentially harder for contributors to get started
  • Focuses on general health information, may lack detailed COVID-19 statistics

Code Comparison

app (React Native):

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
  return (
    <View style={styles.container}>
      <Text>WHO Health Alert</Text>
    </View>
  );
}

covid19 (JavaScript):

const fs = require("fs");
const fetch = require("node-fetch");

const ENDPOINT = "https://pomber.github.io/covid19/timeseries.json";

async function getData() {
  const response = await fetch(ENDPOINT);
  const data = await response.json();
  return data;
}

The app repository uses React Native for cross-platform mobile development, while covid19 is a simpler JavaScript project focused on data retrieval and processing. The covid19 repository is more specialized for COVID-19 data, making it easier to use for specific pandemic-related projects, while app provides a more comprehensive health information platform.

Coronavirus tracker app for iOS & macOS with maps & charts

Pros of CoronaTracker

  • Provides a native iOS app for tracking COVID-19 data
  • Offers a more user-friendly interface with visualizations and charts
  • Includes additional features like news updates and prevention tips

Cons of CoronaTracker

  • Limited to iOS platform, reducing accessibility for non-Apple users
  • May require more frequent updates to maintain app functionality
  • Potentially slower data updates compared to the simpler API approach

Code Comparison

CoronaTracker (Swift):

func fetchData() {
    let url = URL(string: "https://corona.lmao.ninja/v2/countries")!
    URLSession.shared.dataTask(with: url) { (data, response, error) in
        // Process and update UI with fetched data
    }.resume()
}

covid19 (JavaScript):

const getData = async () => {
  const response = await fetch("https://pomber.github.io/covid19/timeseries.json");
  const data = await response.json();
  return data;
};

The CoronaTracker code snippet shows data fetching for an iOS app, while the covid19 repository provides a simpler JavaScript function to retrieve data from its API. The covid19 approach is more versatile and can be easily integrated into various projects, whereas CoronaTracker's code is specific to iOS development.

Tracking the impact of COVID-19 in India

Pros of covid19india-react

  • More comprehensive and detailed data specific to India
  • Interactive and user-friendly interface with visualizations
  • Regular updates and active community contributions

Cons of covid19india-react

  • Limited to India-specific data, not suitable for global statistics
  • More complex codebase due to additional features and visualizations
  • Potentially higher resource usage due to React framework

Code Comparison

covid19india-react:

const [states, setStates] = useState(null);
const [stateDistrictWiseData, setStateDistrictWiseData] = useState(null);
const [fetched, setFetched] = useState(false);

useEffect(() => {
  if (fetched === false) {
    getStates();
  }
}, [fetched]);

covid19:

const data = await fetchData();
const lastDay = data[data.length - 1];
const prevDay = data[data.length - 2];

return {
  date: lastDay.date,
  confirmed: lastDay.confirmed,
  deaths: lastDay.deaths,
  recovered: lastDay.recovered,
  newConfirmed: lastDay.confirmed - prevDay.confirmed,
  newDeaths: lastDay.deaths - prevDay.deaths,
  newRecovered: lastDay.recovered - prevDay.recovered
};

The covid19india-react code snippet shows React hooks for state management and data fetching, while the covid19 code focuses on data processing and calculation of daily changes in statistics.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Transforms the data from CSSEGISandData/COVID-19 into a json file. Available at https://pomber.github.io/covid19/timeseries.json. Updated three times a day using GitHub Actions.

The json contains the number of Coronavirus confirmed cases, deaths, and recovered cases for every country and every day since 2020-1-22:

{
  "Thailand": [
    {
      "date": "2020-1-22",
      "confirmed": 2,
      "deaths": 0,
      "recovered": 0
    },
    {
      "date": "2020-1-23",
      "confirmed": 3,
      "deaths": 0,
      "recovered": 0
    },
    ...
  ],
  ...
}

For example, if you want to use it from a web site:

fetch("https://pomber.github.io/covid19/timeseries.json")
  .then(response => response.json())
  .then(data => {
    data["Argentina"].forEach(({ date, confirmed, recovered, deaths }) =>
      console.log(`${date} active cases: ${confirmed - recovered - deaths}`)
    );
  });

Projects using this dataset (+ add yours)

APIs

Tutorials

Visualizations

Analysis

Adding your project to the list

Pull requests adding more projects to this list are welcome, just a few rules:

  • Add only open source projects
  • Make sure the project cite this repo as a data source (with a link)
  • Follow the same order as the rest of the list - [project-name](your-project-url) ([repo](repo-url)): description
  • Try not to add extra blank lines, it breaks the formatting

👉 add a new project to the list

License

The code from this repo is MIT licensed.
The data is under CSSEGISandData/COVID-19 terms of use.