COVID-19

COVID-19 Functions & Syntax

Overview

Quickly import data for COVID-19 cases and tests from open data repositories published by Johns Hopkins University, the New York Times, and Our World in Data. With this spreadsheet integration for Google Sheets and Microsoft Excel, you can search and filter COVID-19 data from these repositories directly in your spreadsheet.

What you can do

With this integration, you can:

  • Interactively search and filter worldwide COVID-19 data
  • Lookup current data for COVID-19 cases from daily reports
  • Lookup historical COVID-19 data for multiple countries
  • Import statistics for confirmed cases, deaths, and people tested

What you need

You need to have a Flex.io account to use this integration. Also, if you haven't already installed the Flex.io add-on for Excel or Google Sheets, you need to set this up as well.

Functions and Syntax

This integration for Microsoft Excel or Google Sheets includes the following functions:

Covid-19 Cases (Johns Hopkins)

Returns data about Covid-19 cases from the John Hopkins Covid-19 GitHub Repository

Syntax

=FLEX("YOUR_TEAM_NAME/covid-19-cases-jhu", [properties], [filter])

Sample Usage

=FLEX("YOUR_TEAM_NAME/covid-19-cases-jhu", "country_region, province_state, location, confirmed, deaths, recovered")
=FLEX("YOUR_TEAM_NAME/covid-19-cases-jhu", "", "location:\"New York City\"")
=FLEX("YOUR_TEAM_NAME/covid-19-cases-jhu", "location, confirmed, deaths", "+Illinois +Cook +date:[2020-04-01 TO 2020-04-30]")

Parameters

Property Type Description Required
properties array The properties to return, given as a string or array; defaults to all properties; see "Returns" for available properties false
filter array Search query to determine the rows to return, given as a string or array false

Returns

Property Type Description
country_region string The country/region name
province_state string The province/state name
location string null
latitude number The latitude for the location
longitude number The longitude for the location
confirmed integer The number of confirmed cases
deaths integer The number of deaths
recovered integer The number of recovered cases
active integer The number of active cases
date string The date of the information in UTC
fips integer The fips number

Notes

Additional Resources:

Covid-19 Cases (New York Times)

Returns data about Covid-19 cases from the New York Times Covid-19 GitHub Repository

Syntax

=FLEX("YOUR_TEAM_NAME/covid-19-cases-nyt", [properties], [filter])

Sample Usage

=FLEX("YOUR_TEAM_NAME/covid-19-cases-nyt", "date, state, county, cases, deaths")
=FLEX("YOUR_TEAM_NAME/covid-19-cases-nyt", "", "\"New York\"")
=FLEX("YOUR_TEAM_NAME/covid-19-cases-nyt", "county, cases", "+Illinois +date:2020-04-01")

Parameters

Property Type Description Required
properties array The properties to return, given as a string or array; defaults to all properties; see "Returns" for available properties false
filter array Search query to determine the rows to return, given as a string or array false

Returns

Property Type Description
state string The state name
county string The county name
cases number The number of cases in the state/county
deaths number The number of deaths in the state/county
date string The date of the information
fips integer The fips number

Notes

Data from The New York Times, based on reports from state and local health agencies Additional Resources:

Covid-19 Tests (Our World In Data)

Returns data about Covid-19 tests from the Our World In Data Covid-19 GitHub Repository

Syntax

=FLEX("YOUR_TEAM_NAME/covid-19-tests-owid", [properties], [filter])

Sample Usage

=FLEX("YOUR_TEAM_NAME/covid-19-tests-owid", "entity,date,total_cumulative")
=FLEX("YOUR_TEAM_NAME/covid-19-tests-owid", "", "+CDC +\"United States\"")

Parameters

Property Type Description Required
properties array The properties to return, given as a string or array; defaults to all properties; see "Returns" for available properties false
filter array Search query to determine the rows to return, given as a string or array false

Returns

Property Type Description
entity string The country/entity performing the tests
date string The date of the tests
total_cumulative string The cumulative total number of tests performed
total_cumulative_daily_change integer The daily change in cumulative total number of tests performed
total_cumulative_per_thousand number Cumulative total per thousand
total_cumulative_per_thousand_daily_change number The daily change in cumulative total per thousand
three_day_rolling_mean_daily_change number The three-day rolling mean daily change
three_day_rolling_mean_daily_change_per_thousand number The three-day rolling mean daily change per thousand
source_url string The source url for the information
source_label string The source label for the information
notes string Notes for the information

Notes

Data from Our World In Data, based on data collected by the Our World in Data team from official reports Additional Resources:

Need help?

Have questions? Need help getting started? Need other COVID-19 templates or functions for Microsoft Excel or Google Sheets? Chat with us; we're happy to help!