Confirmed corona cases in Finland (COVID-19)

Here, the data on the COVID-19 cases in Finland and the number of tests as reported by the laboratories performing such tests is described.

API address: https://sampo.thl.fi/pivot/prod/api/epirapo/covid19case.json

Subject area of the data: epirapo

Name of the subject: covid19case

Description of THL’s open data API

THL's open data license and limitation of liability

Description of the data

The data includes the number of COVID-19 cases reported to the National Infectious Disease Register as well as the number of tests reported by laboratories. The data is updated on a daily basis. There may be a delay of 2-4 days in reporting the events to the National Infectious Diseases Register. No data on the municipal level will be shown, if the number of cases is less than 5.
Infectious Disease Register

Change history

From 15 June 2023

New data on the number of tests will no longer be collected. The information on the number of analysed coronavirus samples has been based on the data provided by the laboratories. This separate data collection has ended in June 2023.

Indicators

Indicators Measure ID Description Source
The number of COVID-19 cases n_covid_ttr A case is counted as a COVID-19 disease registered in the National Infectious Diseases Register. One person may have case within 12 months at most. In terms of time, the cases are set for the statistical date of the National Infectious Diseases Register. National Infectious Diseases Register
Number of COVID-19 tests n_labtest Laboratories report on a daily basis how many COVID-19 related tests are carried out in that laboratory on that day. In terms of time, the tests are set on the date of the test. Laboratory notification using a questionnaire
Number of deaths temporally associated (30 d) with COVID-19, infectious diseases register n_deaths_ttr

 1. The death data of the Population Information System, the date of which is within 30 days of the date of statistical reporting of the COVID-19 case.

2. Death data in the National Infectious Diseases Register when a doctor has reported a death to the National Infectious Diseases Register as the end result of treatment for COVID-19. The time of death will be set as the date of the statistics in the Finnish National Infectious Diseases Register.

Population Information System and National Infectious Diseases Register
Population sum_pop_week Population updated weekly Population Information System
Number of deaths due to COVID-19, death certificate (preliminary data) n_deaths_covid_due_kt Deaths in which the coronavirus is recorded as the cause of death, i.e. the death is considered to have been caused by the coronavirus. In terms of time, deaths are set to the date of death. Death certificates, preliminary data compiled by the National Institute for Health and Welfare. Statistics Finland is responsible for official statistics.
Number of deaths in which COVID-19 was a contributing factor, death certificate (preliminary data) n_deaths_covid_ctb_kt Deaths in which the coronavirus is considered to have been a contributing factor, but the cause of death is something else. In terms of time, deaths are set to the date of death. Death certificates, preliminary data compiled by the National Institute for Health and Welfare. Statistics Finland is responsible for official statistics.

 

Dimensions and indicators

The dimensions represent the various dimensions in which data can be represented. Each dimension is divided into one or more levels that allow you to tabulate the desired views of the data you are viewing.  The interpretation of the dimensions depends on the indicator under inspection. The table describes the interpretation of the dimension for each indicator.

Dimension Level General level description Description when the indicator is Number of COVID-19 cases Description when the indicator is Number of COVID-19 tests Number of deaths temporally associated (30 d) with COVID-19 National Infectious Diseases Register Description when indicator is Population Description, when the indicator is Number of deaths due to COVID-19, death certificate (preliminary data) Description, when the indicator is Number of deaths in which COVID-19 was a contributing factor, death certificate (preliminary data)
Time day The date to which the information applies. The indicators have different definitions of temporal statistics. Statistics date of the Infectious Disease Register. The statistics date is calculated as the statistics date of the earliest notification of the notifications related to the disease case, which is the first non-empty value in the following order:
1) sampling date (doctor's and laboratory's notifications)
2) diagnosis date (doctor's notification)
3) notification date (doctor's and laboratory's notifications)
Date of the questionnaire by which the laboratory reports samples examined during that day The patient’s date of the statistics based on their COVID-19 infection. Data not itemised day by day. Date of death Date of death
  week number A week according to the ISO standard. Derived from the day. Total amount for the week. Total amount for the week. Total amount for the week. The week during which the population has been calculated from the Population Register. Total amount for the week. Total amount for the week.
  all dates All days total or most recent total data The total amount over the whole follow-up period. The total amount over the whole follow-up period. The total amount over the whole follow-up period. The most recent demographic data. The total amount over the whole follow-up period. The total amount over the whole follow-up period.

Area
municipality Finnish municipalities according to the regional division of Statistics Finland in 2020 Statistics municipality of the case. Primarily home municipality or residence, secondarily the municipality of the place of care, and lastly the municipality where the laboratory that took the sample is located. The data is not itemised by municipality. The data is not itemised by municipality. Home/municipality of residence The data is not itemised by municipality. The data is not itemised by municipality.
  hospital district Derived from the municipality according to the regional division of Statistics Finland The total number of municipalities in the hospital district. The number of tested samples from the hospital district reported by the laboratory. The information was not itemised by hospital district. The total number of municipalities in the hospital district. The information was not itemised by hospital district. The information was not itemised by hospital district.
  all areas Total areas Total number from all municipalities Total number from all hospital districts. Total number from all municipalities. Total number from all municipalities. Total number from Finland Total number from Finland
Age age group Decennial age groups 0–80+ Age on statistics date The data is not itemised by age group. Age on date of death The data is not itemised by age group. Age on date of death Age on date of death
  all ages Total age groups Total number from all age groups. The data is the total age groups. Total number from all age groups. The most recent demographic data. Total number from all age groups. Total number from all age groups.
Gender gender Gender: male, female Gender reported to the National Infectious Diseases Register The data is not itemised by gender. Gender reported to the National Infectious Diseases Register The data is not itemised by gender. gender of the patient gender of the patient
  all sexes Total genders Total number from all genders. The data is the total age groups. Total number from all genders. The most recent demographic data. Total number from all genders.

Total number from all genders.

Dimension levels

The dimensions and levels found in the cube interface and API are described in the table below.

Dimension Level Level ID Node id (sid)
Time day date  
  week week  
  all dates root 509030
Area municipality municipality  
  hospital district hcd  
  all areas root 445222
Age decennial age groups 0-80+ ttr10yage  
  all ages root 444309
Gender gender sexgroup  
  all sexes root 444328

Combinations that can be reviewed

Due to data security reason, not all possible combinations have been calculated into the cube. The table below describes all combinations with available indicators.

Combinations for indicator number of COVID-19 cases

Time Area Age group Gender
All dates / week / day All areas / Hospital districts All ages All sexes
All dates /week Municipalities All ages All sexes
All dates All areas All ages / age groups All sexes / Gender

 

Combinations for indicator COVID-19 test numbers

Time Area Age group Gender
All dates / Week / Day All areas All ages All sexes
All dates / Week Hospital districts All ages All sexes

 

Combinations for indicator Deaths temporally related to coronavirus (30 days), National Infectious Diseases Register

Time Area Age group Gender
All dates / Week / Day All areas All ages All sexes
All dates All areas All ages / Age groups All sexes / Genders

 

Combinations for indicator Deaths due to coronavirus, death certificate (preliminary data)

Time Area Age group Gender
All dates / Week / Day All areas All ages All sexes
All dates All areas All ages / Age groups All sexes / Genders

 

Combinations for the indicator Deaths in with coronavirus as a contributing factor, death certificate (preliminary data)

Time Area Age group Gender
All dates / Week / Day All areas All ages All sexes
All dates All areas All ages / Age groups All sexes / Genders

 

Combinations for indicator Population

Time Area Age group Gender
All dates / Week All areas / Hospital districts / Municipalities All ages All sexes

API logic

You can find a JSON format list of all available id-root pairs at:
https://sampo.thl.fi/pivot/prod/en/epirapo/covid19case/fact_epirapo_covid19case.dimensions.json

Note! If you are using so many dimensions that the data cannot be displayed due to data protection, for example, the API search does not produce an error message; it returns a logically correct structure whose data content is empty.

More information on the

Programming example for the R Language

In this example, COVID-19 cases broken down by age group are retrieved from the THL interface and then compiled into a data set.

#Package for editing and visualizing data
library(tidyverse)

#Package for reading data
library(jsonlite)

#Read in the material
material <- fromJSON("https://sampo.thl.fi/pivot/prod/en/epirapo/covid19case/fact_epirapo_covid19case.json?column=ttr10yage-444309")

#break categories down to pieces
label <- as.data.frame(unlist(aineisto$dataset$dimension$ttr10yage$category$label))
index <- as.data.frame(unlist(aineisto$dataset$dimension$ttr10yage$category$index))

#Name the pieces
names(label)<-"label"
names(index)<-"index"

#Add row numbers as columns to combine these.
label<-rownames_to_column(label)
index<-rownames_to_column(index)

#Join using row name
categories <- index %>% left_join(label,by="rowname")

#Get data
data <- as.data.frame(unlist(aineisto$dataset$value))

#Name
names(data)<-"Number of cases"
data<-rownames_to_column(data)
data$rowname<-as.numeric(data$rowname)

#Join with other material
dataset <- categories %>% left_join(data,by=c("index"="rowname"))

Contact information

Feedback and questions about the open COVID-19 data:
epidemia.avoindata(at)thl.fi

Feedback and questions about the statistical database and API:
tietojarjestelmat(at)thl.fi

Other feedback and questions about THL's open data