codes<-read.csv('https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/owid-covid-codebook.csv')
column | source | category | description |
---|---|---|---|
iso_code | International Organization for Standardization | Others | ISO 3166-1 alpha-3 – three-letter country codes. Note that OWID-defined regions (e.g. continents like 'Europe') contain prefix 'OWID_'. |
continent | Our World in Data | Others | Continent of the geographical location |
location | Our World in Data | Others | Geographical location |
date | Our World in Data | Others | Date of observation |
total_cases | COVID-19 Dashboard by the WHO | Confirmed cases | Total confirmed cases of COVID-19. Counts can include probable cases, where reported. |
new_cases | COVID-19 Dashboard by the WHO | Confirmed cases | New confirmed cases of COVID-19. Counts can include probable cases, where reported. In rare cases where our source reports a negative daily change due to a data correction, we set this metric to NA. |
new_cases_smoothed | COVID-19 Dashboard by the WHO | Confirmed cases | New confirmed cases of COVID-19 (7-day smoothed). Counts can include probable cases, where reported. |
total_deaths | COVID-19 Dashboard by the WHO | Confirmed deaths | Total deaths attributed to COVID-19. Counts can include probable deaths, where reported. |
new_deaths | COVID-19 Dashboard by the WHO | Confirmed deaths | New deaths attributed to COVID-19. Counts can include probable deaths, where reported. In rare cases where our source reports a negative daily change due to a data correction, we set this metric to NA. |
new_deaths_smoothed | COVID-19 Dashboard by the WHO | Confirmed deaths | New deaths attributed to COVID-19 (7-day smoothed). Counts can include probable deaths, where reported. |
total_cases_per_million | COVID-19 Dashboard by the WHO | Confirmed cases | Total confirmed cases of COVID-19 per 1,000,000 people. Counts can include probable cases, where reported. |
new_cases_per_million | COVID-19 Dashboard by the WHO | Confirmed cases | New confirmed cases of COVID-19 per 1,000,000 people. Counts can include probable cases, where reported. |
new_cases_smoothed_per_million | COVID-19 Dashboard by the WHO | Confirmed cases | New confirmed cases of COVID-19 (7-day smoothed) per 1,000,000 people. Counts can include probable cases, where reported. |
total_deaths_per_million | COVID-19 Dashboard by the WHO | Confirmed deaths | Total deaths attributed to COVID-19 per 1,000,000 people. Counts can include probable deaths, where reported. |
new_deaths_per_million | COVID-19 Dashboard by the WHO | Confirmed deaths | New deaths attributed to COVID-19 per 1,000,000 people. Counts can include probable deaths, where reported. |
new_deaths_smoothed_per_million | COVID-19 Dashboard by the WHO | Confirmed deaths | New deaths attributed to COVID-19 (7-day smoothed) per 1,000,000 people. Counts can include probable deaths, where reported. |
reproduction_rate | Arroyo Marioli et al. (2020). https://doi.org/10.2139/ssrn.3581633 | Reproduction rate | Real-time estimate of the effective reproduction rate (R) of COVID-19. See https://github.com/crondonm/TrackingR/tree/main/Estimates-Database |
icu_patients | National government reports and European CDC | Hospital & ICU | Number of COVID-19 patients in intensive care units (ICUs) on a given day |
icu_patients_per_million | National government reports and European CDC | Hospital & ICU | Number of COVID-19 patients in intensive care units (ICUs) on a given day per 1,000,000 people |
hosp_patients | National government reports and European CDC | Hospital & ICU | Number of COVID-19 patients in hospital on a given day |
hosp_patients_per_million | National government reports and European CDC | Hospital & ICU | Number of COVID-19 patients in hospital on a given day per 1,000,000 people |
weekly_icu_admissions | National government reports and European CDC | Hospital & ICU | Number of COVID-19 patients newly admitted to intensive care units (ICUs) in a given week (reporting date and the preceeding 6 days) |
weekly_icu_admissions_per_million | National government reports and European CDC | Hospital & ICU | Number of COVID-19 patients newly admitted to intensive care units (ICUs) in a given week per 1,000,000 people (reporting date and the preceeding 6 days) |
weekly_hosp_admissions | National government reports and European CDC | Hospital & ICU | Number of COVID-19 patients newly admitted to hospitals in a given week (reporting date and the preceeding 6 days) |
weekly_hosp_admissions_per_million | National government reports and European CDC | Hospital & ICU | Number of COVID-19 patients newly admitted to hospitals in a given week per 1,000,000 people (reporting date and the preceeding 6 days) |
total_tests | National government reports | Tests & positivity | Total tests for COVID-19 |
new_tests | National government reports | Tests & positivity | New tests for COVID-19 (only calculated for consecutive days) |
total_tests_per_thousand | National government reports | Tests & positivity | Total tests for COVID-19 per 1,000 people |
new_tests_per_thousand | National government reports | Tests & positivity | New tests for COVID-19 per 1,000 people |
new_tests_smoothed | National government reports | Tests & positivity | New tests for COVID-19 (7-day smoothed). For countries that don't report testing data on a daily basis, we assume that testing changed equally on a daily basis over any periods in which no data was reported. This produces a complete series of daily figures, which is then averaged over a rolling 7-day window |
new_tests_smoothed_per_thousand | National government reports | Tests & positivity | New tests for COVID-19 (7-day smoothed) per 1,000 people |
positive_rate | National government reports | Tests & positivity | The share of COVID-19 tests that are positive, given as a rolling 7-day average (this is the inverse of tests_per_case) |
tests_per_case | National government reports | Tests & positivity | Tests conducted per new confirmed case of COVID-19, given as a rolling 7-day average (this is the inverse of positive_rate) |
tests_units | National government reports | Tests & positivity | Units used by the location to report its testing data. A country file can't contain mixed units. All metrics concerning testing data use the specified test unit. Valid units are 'people tested' (number of people tested), 'tests performed' (number of tests performed. a single person can be tested more than once in a given day) and 'samples tested' (number of samples tested. In some cases, more than one sample may be required to perform a given test.) |
total_vaccinations | National government reports | Vaccinations | Total number of COVID-19 vaccination doses administered |
people_vaccinated | National government reports | Vaccinations | Total number of people who received at least one vaccine dose |
people_fully_vaccinated | National government reports | Vaccinations | Total number of people who received all doses prescribed by the initial vaccination protocol |
total_boosters | National government reports | Vaccinations | Total number of COVID-19 vaccination booster doses administered (doses administered beyond the number prescribed by the vaccination protocol) |
new_vaccinations | National government reports | Vaccinations | New COVID-19 vaccination doses administered (only calculated for consecutive days) |
new_vaccinations_smoothed | National government reports | Vaccinations | New COVID-19 vaccination doses administered (7-day smoothed). For countries that don't report vaccination data on a daily basis, we assume that vaccination changed equally on a daily basis over any periods in which no data was reported. This produces a complete series of daily figures, which is then averaged over a rolling 7-day window |
total_vaccinations_per_hundred | National government reports | Vaccinations | Total number of COVID-19 vaccination doses administered per 100 people in the total population |
people_vaccinated_per_hundred | National government reports | Vaccinations | Total number of people who received at least one vaccine dose per 100 people in the total population |
people_fully_vaccinated_per_hundred | National government reports | Vaccinations | Total number of people who received all doses prescribed by the initial vaccination protocol per 100 people in the total population |
total_boosters_per_hundred | National government reports | Vaccinations | Total number of COVID-19 vaccination booster doses administered per 100 people in the total population |
new_vaccinations_smoothed_per_million | National government reports | Vaccinations | New COVID-19 vaccination doses administered (7-day smoothed) per 1,000,000 people in the total population |
new_people_vaccinated_smoothed | National government reports | Vaccinations | Daily number of people receiving their first vaccine dose (7-day smoothed) |
new_people_vaccinated_smoothed_per_hundred | National government reports | Vaccinations | Daily number of people receiving their first vaccine dose (7-day smoothed) per 100 people in the total population |
stringency_index | Oxford COVID-19 Government Response Tracker, Blavatnik School of Government | Policy responses | Government Response Stringency Index: composite measure based on 9 response indicators including school closures, workplace closures, and travel bans, rescaled to a value from 0 to 100 (100 = strictest response) |
population | United Nations, Department of Economic and Social Affairs, Population Division, World Population Prospects 2019 Revision | Others | Population (latest available values). See https://github.com/owid/covid-19-data/blob/master/scripts/input/un/population_latest.csv for full list of sources |
population_density | World Bank World Development Indicators, sourced from Food and Agriculture Organization and World Bank estimates | Others | Number of people divided by land area, measured in square kilometers, most recent year available |
median_age | UN Population Division, World Population Prospects, 2017 Revision | Others | Median age of the population, UN projection for 2020 |
aged_65_older | World Bank World Development Indicators based on age/sex distributions of United Nations World Population Prospects 2017 Revision | Others | Share of the population that is 65 years and older, most recent year available |
aged_70_older | United Nations, Department of Economic and Social Affairs, Population Division (2017), World Population Prospects 2017 Revision | Others | Share of the population that is 70 years and older in 2015 |
gdp_per_capita | World Bank World Development Indicators, source from World Bank, International Comparison Program database | Others | Gross domestic product at purchasing power parity (constant 2011 international dollars), most recent year available |
extreme_poverty | World Bank World Development Indicators, sourced from World Bank Development Research Group | Others | Share of the population living in extreme poverty, most recent year available since 2010 |
cardiovasc_death_rate | Global Burden of Disease Collaborative Network, Global Burden of Disease Study 2017 Results | Others | Death rate from cardiovascular disease in 2017 (annual number of deaths per 100,000 people) |
diabetes_prevalence | World Bank World Development Indicators, sourced from International Diabetes Federation, Diabetes Atlas | Others | Diabetes prevalence (% of population aged 20 to 79) in 2017 |
female_smokers | World Bank World Development Indicators, sourced from World Health Organization, Global Health Observatory Data Repository | Others | Share of women who smoke, most recent year available |
male_smokers | World Bank World Development Indicators, sourced from World Health Organization, Global Health Observatory Data Repository | Others | Share of men who smoke, most recent year available |
handwashing_facilities | United Nations Statistics Division | Others | Share of the population with basic handwashing facilities on premises, most recent year available |
hospital_beds_per_thousand | OECD, Eurostat, World Bank, national government records and other sources | Others | Hospital beds per 1,000 people, most recent year available since 2010 |
life_expectancy | James C. Riley, Clio Infra, United Nations Population Division | Others | Life expectancy at birth in 2019 |
human_development_index | United Nations Development Programme (UNDP) | Others | A composite index measuring average achievement in three basic dimensions of human development—a long and healthy life, knowledge and a decent standard of living. Values for 2019, imported from http://hdr.undp.org/en/indicators/137506 |
excess_mortality | Human Mortality Database (2021), World Mortality Dataset (2021) | Excess mortality | Percentage difference between the reported number of weekly or monthly deaths in 2020–2021 and the projected number of deaths for the same period based on previous years. For more information, see https://github.com/owid/covid-19-data/tree/master/public/data/excess_mortality |
excess_mortality_cumulative | Human Mortality Database (2021), World Mortality Dataset (2021) | Excess mortality | Percentage difference between the cumulative number of deaths since 1 January 2020 and the cumulative projected deaths for the same period based on previous years. For more information, see https://github.com/owid/covid-19-data/tree/master/public/data/excess_mortality |
excess_mortality_cumulative_absolute | Human Mortality Database (2021), World Mortality Dataset (2021) | Excess mortality | Cumulative difference between the reported number of deaths since 1 January 2020 and the projected number of deaths for the same period based on previous years. For more information, see https://github.com/owid/covid-19-data/tree/master/public/data/excess_mortality |
excess_mortality_cumulative_per_million | Human Mortality Database (2021), World Mortality Dataset (2021) | Excess mortality | Cumulative difference between the reported number of deaths since 1 January 2020 and the projected number of deaths for the same period based on previous years, per million people. For more information, see https://github.com/owid/covid-19-data/tree/master/public/data/excess_mortality |
#mydat<- read.csv('https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/owid-covid-data.csv')
#mydat_compl <- read.csv('https://covid.ourworldindata.org/data/owid-covid-data.csv')
#mydat=mydat_compl
library(readxl)
mydat <- read_excel("Data_files_csv/owid-covid-data.xlsx")
iso_code | continent | location | date | total_cases | new_cases | new_cases_smoothed | total_deaths | new_deaths | new_deaths_smoothed | total_cases_per_million | new_cases_per_million | new_cases_smoothed_per_million | total_deaths_per_million | new_deaths_per_million | new_deaths_smoothed_per_million | reproduction_rate | icu_patients | icu_patients_per_million | hosp_patients | hosp_patients_per_million | weekly_icu_admissions | weekly_icu_admissions_per_million | weekly_hosp_admissions | weekly_hosp_admissions_per_million | total_tests | new_tests | total_tests_per_thousand | new_tests_per_thousand | new_tests_smoothed | new_tests_smoothed_per_thousand | positive_rate | tests_per_case | tests_units | total_vaccinations | people_vaccinated | people_fully_vaccinated | total_boosters | new_vaccinations | new_vaccinations_smoothed | total_vaccinations_per_hundred | people_vaccinated_per_hundred | people_fully_vaccinated_per_hundred | total_boosters_per_hundred | new_vaccinations_smoothed_per_million | new_people_vaccinated_smoothed | new_people_vaccinated_smoothed_per_hundred | stringency_index | population | population_density | median_age | aged_65_older | aged_70_older | gdp_per_capita | extreme_poverty | cardiovasc_death_rate | diabetes_prevalence | female_smokers | male_smokers | handwashing_facilities | hospital_beds_per_thousand | life_expectancy | human_development_index | excess_mortality_cumulative_absolute | excess_mortality_cumulative | excess_mortality | excess_mortality_cumulative_per_million |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AFG | Asia | Afghanistan | 2020-02-24 | 5 | 5 | 0.125 | 0.125 | 8.33 | 4.01e+07 | 54.4 | 18.6 | 2.58 | 1.34 | 1.8e+03 | 597 | 9.59 | 37.7 | 0.5 | 64.8 | 0.511 | ||||||||||||||||||||||||||||||||||||||||||||||
AFG | Asia | Afghanistan | 2020-02-25 | 5 | 0 | 0.125 | 0 | 8.33 | 4.01e+07 | 54.4 | 18.6 | 2.58 | 1.34 | 1.8e+03 | 597 | 9.59 | 37.7 | 0.5 | 64.8 | 0.511 | ||||||||||||||||||||||||||||||||||||||||||||||
AFG | Asia | Afghanistan | 2020-02-26 | 5 | 0 | 0.125 | 0 | 8.33 | 4.01e+07 | 54.4 | 18.6 | 2.58 | 1.34 | 1.8e+03 | 597 | 9.59 | 37.7 | 0.5 | 64.8 | 0.511 | ||||||||||||||||||||||||||||||||||||||||||||||
AFG | Asia | Afghanistan | 2020-02-27 | 5 | 0 | 0.125 | 0 | 8.33 | 4.01e+07 | 54.4 | 18.6 | 2.58 | 1.34 | 1.8e+03 | 597 | 9.59 | 37.7 | 0.5 | 64.8 | 0.511 |
Seleccionar las variables y filtrar los datos para hacer un subgrupo con datos solamente de Puerto Rico
df1=mydat %>%
dplyr::select(location,date, total_cases, new_cases, life_expectancy)%>%
filter(location == "Puerto Rico") %>%
head()
gt(df1)
location | date | total_cases | new_cases | life_expectancy |
---|---|---|---|---|
Puerto Rico | 2020-03-01 | NA | NA | 80.1 |
Puerto Rico | 2020-03-02 | NA | NA | 80.1 |
Puerto Rico | 2020-03-03 | NA | NA | 80.1 |
Puerto Rico | 2020-03-04 | NA | NA | 80.1 |
Puerto Rico | 2020-03-05 | NA | NA | 80.1 |
Puerto Rico | 2020-03-06 | NA | NA | 80.1 |
## [1] "Afghanistan" "Africa"
## [3] "Albania" "Algeria"
## [5] "Andorra" "Angola"
## [7] "Anguilla" "Antigua and Barbuda"
## [9] "Argentina" "Armenia"
## [11] "Aruba" "Asia"
## [13] "Australia" "Austria"
## [15] "Azerbaijan" "Bahamas"
## [17] "Bahrain" "Bangladesh"
## [19] "Barbados" "Belarus"
## [21] "Belgium" "Belize"
## [23] "Benin" "Bermuda"
## [25] "Bhutan" "Bolivia"
## [27] "Bonaire Sint Eustatius and Saba" "Bosnia and Herzegovina"
## [29] "Botswana" "Brazil"
## [31] "British Virgin Islands" "Brunei"
## [33] "Bulgaria" "Burkina Faso"
## [35] "Burundi" "Cambodia"
## [37] "Cameroon" "Canada"
## [39] "Cape Verde" "Cayman Islands"
## [41] "Central African Republic" "Chad"
## [43] "Chile" "China"
## [45] "Colombia" "Comoros"
## [47] "Congo" "Cook Islands"
## [49] "Costa Rica" "Cote d'Ivoire"
## [51] "Croatia" "Cuba"
## [53] "Curacao" "Cyprus"
## [55] "Czechia" "Democratic Republic of Congo"
## [57] "Denmark" "Djibouti"
## [59] "Dominica" "Dominican Republic"
## [61] "Ecuador" "Egypt"
## [63] "El Salvador" "Equatorial Guinea"
## [65] "Eritrea" "Estonia"
## [67] "Eswatini" "Ethiopia"
## [69] "Europe" "European Union"
## [71] "Faeroe Islands" "Falkland Islands"
## [73] "Fiji" "Finland"
## [75] "France" "French Polynesia"
## [77] "Gabon" "Gambia"
## [79] "Georgia" "Germany"
## [81] "Ghana" "Gibraltar"
## [83] "Greece" "Greenland"
## [85] "Grenada" "Guam"
## [87] "Guatemala" "Guernsey"
## [89] "Guinea" "Guinea-Bissau"
## [91] "Guyana" "Haiti"
## [93] "High income" "Honduras"
## [95] "Hong Kong" "Hungary"
## [97] "Iceland" "India"
## [99] "Indonesia" "International"
## [101] "Iran" "Iraq"
## [103] "Ireland" "Isle of Man"
## [105] "Israel" "Italy"
## [107] "Jamaica" "Japan"
## [109] "Jersey" "Jordan"
## [111] "Kazakhstan" "Kenya"
## [113] "Kiribati" "Kosovo"
## [115] "Kuwait" "Kyrgyzstan"
## [117] "Laos" "Latvia"
## [119] "Lebanon" "Lesotho"
## [121] "Liberia" "Libya"
## [123] "Liechtenstein" "Lithuania"
## [125] "Low income" "Lower middle income"
## [127] "Luxembourg" "Macao"
## [129] "Madagascar" "Malawi"
## [131] "Malaysia" "Maldives"
## [133] "Mali" "Malta"
## [135] "Marshall Islands" "Mauritania"
## [137] "Mauritius" "Mexico"
## [139] "Micronesia (country)" "Moldova"
## [141] "Monaco" "Mongolia"
## [143] "Montenegro" "Montserrat"
## [145] "Morocco" "Mozambique"
## [147] "Myanmar" "Namibia"
## [149] "Nauru" "Nepal"
## [151] "Netherlands" "New Caledonia"
## [153] "New Zealand" "Nicaragua"
## [155] "Niger" "Nigeria"
## [157] "Niue" "North America"
## [159] "North Korea" "North Macedonia"
## [161] "Northern Cyprus" "Northern Mariana Islands"
## [163] "Norway" "Oceania"
## [165] "Oman" "Pakistan"
## [167] "Palau" "Palestine"
## [169] "Panama" "Papua New Guinea"
## [171] "Paraguay" "Peru"
## [173] "Philippines" "Pitcairn"
## [175] "Poland" "Portugal"
## [177] "Puerto Rico" "Qatar"
## [179] "Romania" "Russia"
## [181] "Rwanda" "Saint Helena"
## [183] "Saint Kitts and Nevis" "Saint Lucia"
## [185] "Saint Pierre and Miquelon" "Saint Vincent and the Grenadines"
## [187] "Samoa" "San Marino"
## [189] "Sao Tome and Principe" "Saudi Arabia"
## [191] "Senegal" "Serbia"
## [193] "Seychelles" "Sierra Leone"
## [195] "Singapore" "Sint Maarten (Dutch part)"
## [197] "Slovakia" "Slovenia"
## [199] "Solomon Islands" "Somalia"
## [201] "South Africa" "South America"
## [203] "South Korea" "South Sudan"
## [205] "Spain" "Sri Lanka"
## [207] "Sudan" "Suriname"
## [209] "Sweden" "Switzerland"
## [211] "Syria" "Taiwan"
## [213] "Tajikistan" "Tanzania"
## [215] "Thailand" "Timor"
## [217] "Togo" "Tokelau"
## [219] "Tonga" "Trinidad and Tobago"
## [221] "Tunisia" "Turkey"
## [223] "Turkmenistan" "Turks and Caicos Islands"
## [225] "Tuvalu" "Uganda"
## [227] "Ukraine" "United Arab Emirates"
## [229] "United Kingdom" "United States"
## [231] "United States Virgin Islands" "Upper middle income"
## [233] "Uruguay" "Uzbekistan"
## [235] "Vanuatu" "Vatican"
## [237] "Venezuela" "Vietnam"
## [239] "Wallis and Futuna" "Western Sahara"
## [241] "World" "Yemen"
## [243] "Zambia" "Zimbabwe"
Favor tener un documento bien organizado y fácil de leer, añadir solamente la información necesaria.
(5 puntos)
Calcula los siguientes parámetros de números de nuevos casos de COVID-19 por día en Puerto Rico - el promedio - la mediana - la moda - la desviación estándar - el error estándar - los cuartiles
(5 puntos)
Selecciona otro país del Caribe y calcula los mismo parámetros
mydat%>%
dplyr::select(location,date, total_cases, new_cases, life_expectancy)%>%
filter(location %in% c("Puerto Rico", "Cuba"))%>%
head(3)%>%
gt()
location | date | total_cases | new_cases | life_expectancy |
---|---|---|---|---|
Cuba | 2020-03-12 | 3 | 3 | 78.8 |
Cuba | 2020-03-13 | 4 | 1 | 78.8 |
Cuba | 2020-03-14 | 4 | 0 | 78.8 |
library(statip)
mydat %>%
dplyr::select(location,date, total_cases, new_cases, life_expectancy)%>%
filter(location %in% c("Puerto Rico", "Cuba", "Jamaica", "Costa Rica", "Haiti", "Bahamas"))%>%
group_by(location) %>%
summarize(mean=mean(new_cases, na.rm=T),
median=median(new_cases, na.rm=T),
de=sd(new_cases, na.rm=T)) %>%
gt()
mean | median | de |
---|---|---|
540.3386 | 43 | 1805.497 |
mydat%>%
dplyr::select(location,date, total_cases, new_cases, life_expectancy)%>%
filter(location %in% c("Puerto Rico", "Cuba", "Jamaica", "Costa Rica", "Haiti", "Bahamas"))%>%
group_by(location)%>%
summarize(mode=statip::mfv(new_cases))
mode |
---|
0 |
Pregunta 1 (5 puntos)
promedio mediana moda desviación estándar error estándar cuantiles
Pregunta 2 (5 puntos)
promedio mediana moda desviación estándar error estándar cuantiles
(5 puntos)
Discutir y comparar los datos. En el pais #1 se observó un promedio diario de xx casos nuevos por dia y el pais #2 se observo tal cantidad. La mediana en los dos paises eran similar/ diferentes ….., de los valores. Tanto la desviación estándar y los cuantiles eran más grande en el pais 1 versus el pais 2.
Uno ejemplos de temas que se podría haber tomado encuenta
Aquí se debería haber discutido componentes sociales que podría explicar como se propaga el virus.