Ta sử dụng lệnh read.csv() để đọc dữ liệu từ file csv
d <- read.csv(file= 'C:/Users/Admin/OneDrive/Documents/NNLT/2022_Inflation.csv')
Trước khi đọc được dữ liệu từ file excel ta cần thực hiện các bước sau:
- cài đặt gói xử lí dữ liệu excel,xlsx install.packages(‘xlsx’)
- gọi package ra library(‘xlsx’)
- đọc dữ liệu vào file excel read.xlsx()
library(xlsx)
d <- read.xlsx('C:/Users/Admin/OneDrive/Documents/NNLT/afterlife.xlsx', sheetIndex = 1, header = T)
Lưu ý: trước khi sử dụng một package nào đó ta cần cài đặt gói dữ liệu vào máy install.packages()
1. Load package
library(datasets) #gọi package 'datasets' ra
data(package= 'datasets') #xem dữ liệu trong datasets
library(ggplot2) #gọi package 'ggplot2' ra
data(package= 'ggplot2') #xem dữ liệu trong ggplot2
2. Gán dữ liệu cho 1 đối tượng để làm việc
d <- CO2 # gán dữ liệu cho đối tượng
d <- economics # gán dữ liệu cho đối tượng
d <- read.csv('C:/Users/Admin/OneDrive/Documents/NNLT/2022_Inflation.csv')
Lưu ý: trước khi sử dụng một package nào đó ta cần cài đặt gói dữ liệu vào máy sau đó lưu chúng vào thư viện > bằng hai câu lệnh: install.packages() và library()
1. Thông tin dữ liệu
Các câu lệnh sau giúp người dùng tiếp cận với thông tin chi tiết của dữ liệu để dễ dàng phân tích
ntt <- trees
is.data.frame(ntt) # kiểm tra xem ntt có phải là data frame không?
## [1] TRUE
length(ntt) # số biến của ntt
## [1] 3
names(ntt) # tên các biến của ntt
## [1] "Girth" "Height" "Volume"
dim(ntt) #data này có 31 hàng và 3 cột
## [1] 31 3
str(ntt) #thông tin mô tả dữ liệu
## 'data.frame': 31 obs. of 3 variables:
## $ Girth : num 8.3 8.6 8.8 10.5 10.7 10.8 11 11 11.1 11.2 ...
## $ Height: num 70 65 63 72 81 83 66 75 80 75 ...
## $ Volume: num 10.3 10.3 10.2 16.4 18.8 19.7 15.6 18.2 22.6 19.9 ...
library(skimr)
skim(ntt) #thông tin mô tả dữ liệu chi tiết hơn *str*
Name | ntt |
Number of rows | 31 |
Number of columns | 3 |
_______________________ | |
Column type frequency: | |
numeric | 3 |
________________________ | |
Group variables | None |
Variable type: numeric
skim_variable | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
---|---|---|---|---|---|---|---|---|---|---|
Girth | 0 | 1 | 13.25 | 3.14 | 8.3 | 11.05 | 12.9 | 15.25 | 20.6 | ▃▇▃▅▁ |
Height | 0 | 1 | 76.00 | 6.37 | 63.0 | 72.00 | 76.0 | 80.00 | 87.0 | ▃▃▆▇▃ |
Volume | 0 | 1 | 30.17 | 16.44 | 10.2 | 19.40 | 24.2 | 37.30 | 77.0 | ▇▅▁▂▁ |
2. Các thao tác rút trích dữ liệu
names(ntt) <- c('G', 'H', 'V')
a <- ntt[5,3] #lấy tt hàng 5 cột 3
H <- ntt$H #chỉ lấy tt cột H
b <- ntt[,2] # lấy tt trong cột 2
c <- ntt[4,] #lấy tt trong hàng 4
ntt1 <- ntt[,c(1,3)] #lấy tt trong cột 1 và 3
ntt2 <- ntt[3:9,] #lấy tt từ hàng 3 đến 9
ntt3 <- ntt[c(3,5,7,21),] #lấy tt trong hàng 3, 5, 7,và 21
ntt4 <- ntt[c(2,3,6,18),c(2,3)] #lấy tt trong hàng 2, 3, 6, 18 và cột 2,33
ntt5 <- ntt[ntt$H >=80,] #lấy tt trong cột H có giá trị >=80
ntt6 <- ntt[ntt$H >=80 & ntt$H <=86,] #lấy tt trong cột H có giá trị >=80 và <=86
ntt7 <- ntt[ntt$H == 76 | ntt$H == 80,] #lấy tt trong cột H có giá trị =76 hoặc =80
3. Tạo dữ liệu mới từ dữ liệu có sẵn:
ntt <- trees
tich <- ntt$Girth*ntt$Height*ntt$Volume
ntt<- cbind(ntt,tich)
l <- log(tich)
ntt <- cbind(ntt,l)
Ngoài ra chúng ta có thể sử dung package Tidyverse ( một package quan trọng của R, nó bao gồm nhiều package > con ) để thay thế các thao tác trên bằng các lệnh sau:
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ lubridate 1.9.3 ✔ tibble 3.2.1
## ✔ purrr 1.0.2 ✔ tidyr 1.3.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
ntt <- trees
ntt <- ntt %>% mutate(tich = Girth*Height*Volume)
ntt <- ntt %>% mutate(l = log(tich))
Bộ dữ liệu CO2 cũng là một bộ dữ liệu có sẵn trong package datasets, trong bộ dữ liệu này có cả dữ liệu định tính và dữ liệu định lượng.
1. Thông tin dữ liệu:
Các câu lệnh sau giúp người dùng tiếp cận với thông tin chi tiết của dữ liệu để dễ dàng phân tích
d <- CO2
str(d)
## Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame': 84 obs. of 5 variables:
## $ Plant : Ord.factor w/ 12 levels "Qn1"<"Qn2"<"Qn3"<..: 1 1 1 1 1 1 1 2 2 2 ...
## $ Type : Factor w/ 2 levels "Quebec","Mississippi": 1 1 1 1 1 1 1 1 1 1 ...
## $ Treatment: Factor w/ 2 levels "nonchilled","chilled": 1 1 1 1 1 1 1 1 1 1 ...
## $ conc : num 95 175 250 350 500 675 1000 95 175 250 ...
## $ uptake : num 16 30.4 34.8 37.2 35.3 39.2 39.7 13.6 27.3 37.1 ...
## - attr(*, "formula")=Class 'formula' language uptake ~ conc | Plant
## .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv>
## - attr(*, "outer")=Class 'formula' language ~Treatment * Type
## .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv>
## - attr(*, "labels")=List of 2
## ..$ x: chr "Ambient carbon dioxide concentration"
## ..$ y: chr "CO2 uptake rate"
## - attr(*, "units")=List of 2
## ..$ x: chr "(uL/L)"
## ..$ y: chr "(umol/m^2 s)"
head(d,4) # xuất hiện 4 dữ liệu đầu tiên
## Plant Type Treatment conc uptake
## 1 Qn1 Quebec nonchilled 95 16.0
## 2 Qn1 Quebec nonchilled 175 30.4
## 3 Qn1 Quebec nonchilled 250 34.8
## 4 Qn1 Quebec nonchilled 350 37.2
tail(d,5) # xuất hiện 5 dữ liệu cuối
## Plant Type Treatment conc uptake
## 80 Mc3 Mississippi chilled 250 17.9
## 81 Mc3 Mississippi chilled 350 17.9
## 82 Mc3 Mississippi chilled 500 17.9
## 83 Mc3 Mississippi chilled 675 18.9
## 84 Mc3 Mississippi chilled 1000 19.9
2. Rút trích dữ liệu:
d1 <- d[d$Treatment =='chilled',]
str(d1)
## Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame': 42 obs. of 5 variables:
## $ Plant : Ord.factor w/ 12 levels "Qn1"<"Qn2"<"Qn3"<..: 4 4 4 4 4 4 4 6 6 6 ...
## $ Type : Factor w/ 2 levels "Quebec","Mississippi": 1 1 1 1 1 1 1 1 1 1 ...
## $ Treatment: Factor w/ 2 levels "nonchilled","chilled": 2 2 2 2 2 2 2 2 2 2 ...
## $ conc : num 95 175 250 350 500 675 1000 95 175 250 ...
## $ uptake : num 14.2 24.1 30.3 34.6 32.5 35.4 38.7 9.3 27.3 35 ...
## - attr(*, "formula")=Class 'formula' language uptake ~ conc | Plant
## .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv>
## - attr(*, "outer")=Class 'formula' language ~Treatment * Type
## .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv>
## - attr(*, "labels")=List of 2
## ..$ x: chr "Ambient carbon dioxide concentration"
## ..$ y: chr "CO2 uptake rate"
## - attr(*, "units")=List of 2
## ..$ x: chr "(uL/L)"
## ..$ y: chr "(umol/m^2 s)"
d1 <- d[d$Treatment =='chilled' & d$Type =='Quebec', ]
d2 <- d[d$conc>600 ,]
d3 <- d[d$Treatment != 'chilled',]
World Bank lưu trữ rất nhiều thông tin kinh tế vĩ mô của nhiều nước trên thế giới và hoàn toàn cho phép người dùng truy cập và sử dụng dữ liệu.
% dân số tiếp cân được với nhiên liệu và công nghệ sạch
% dân sô tiếp cận được với điện
library(xlsx)
tt <- read.xlsx(file='C:/Users/Admin/OneDrive/Documents/NNLT/Book1.xlsx', sheetIndex = 1, header = T)
names(tt) <- c('CN','CC','SN','SC','nt1','n8','n7','n9','n10','n11','n12','n0','n1','n2','n3','n4','n5','n6','R1')
str(tt)
## 'data.frame': 1064 obs. of 19 variables:
## $ CN : chr "Afghanistan" "Afghanistan" "Afghanistan" "Afghanistan" ...
## $ CC : chr "AFG" "AFG" "AFG" "AFG" ...
## $ SN : chr "Access to clean fuels and technologies for cooking (% of population)" "Access to electricity (% of population)" "Account ownership at a financial institution or with a mobile-money-service provider (% of population ages 15+)" "Account ownership at a financial institution or with a mobile-money-service provider, older adults (% of population ages 25+)" ...
## $ SC : chr "EG.CFT.ACCS.ZS" "EG.ELC.ACCS.ZS" "FX.OWN.TOTL.ZS" "FX.OWN.TOTL.OL.ZS" ...
## $ nt1: chr "10.1688116507536" "22.86124640381" ".." ".." ...
## $ n8 : chr "16.8" "42.4" ".." ".." ...
## $ n7 : chr "15.3" "38.4400024414063" ".." ".." ...
## $ n9 : chr "18.2" "48.2790069580078" ".." ".." ...
## $ n10: chr "19.7" "42.7" ".." ".." ...
## $ n11: chr "21.3" "43.2220189082037" "9.01" "10.54" ...
## $ n12: chr "22.7" "69.1" ".." ".." ...
## $ n0 : chr "6.7" "4.44689083099365" ".." ".." ...
## $ n1 : chr "7.7" "9.29452705383301" ".." ".." ...
## $ n2 : chr "8.8" "14.1336164474487" ".." ".." ...
## $ n3 : chr "10" "18.9711647033691" ".." ".." ...
## $ n4 : chr "11.1" "23.8141822814941" ".." ".." ...
## $ n5 : chr "12.5" "28.6696720123291" ".." ".." ...
## $ n6 : chr "13.9" "33.5444183349609" ".." ".." ...
## $ R1 : chr "10.1688116507536" "22.86124640381" ".." ".." ...
Dữ liệu trên là một data,frame
Gồm có 2665 quan sát và 19 biến
Các biến của dữ liệu bao gồm:
Country.Name: tên quốc gia hoặc khu vực
Country.Code: mã quốc gia hoặc khu vực
Series.Name: tên nội dung phân tích
Series.Code: mã nội dung phân tích
xx..yx: với x là số năm
Theo Cơ quan Năng lượng Quốc tế (IEA), có khoảng 789 triệu người trên thế giới không có điện và 2,8 tỷ người dựa vào sinh khối truyền thống để nấu ăn và sưởi ấm. Điều này không chỉ tăng cường ô nhiễm môi trường mà còn đặt ra những thách thức nặng nề về sức khỏe và kinh tế.
Theo IEA, mở rộng khả năng tiếp cận điện và nhiên liệu nấu ăn sạch có thể tạo ra hàng triệu việc làm mới và thúc đẩy tăng trưởng kinh tế, đặc biệt là ở khu vực nông thôn.Bên cạnh đó Áp dụng các hệ thống năng lượng sạch cũng có thể cải thiện kết quả sức khỏe và giảm bất bình đẳng giới, tạo ra một môi trường sống tích cực cho cộng đồng.
Trong những năm 2000-2012 tình hình dân số thế giới tiếp cận được với điện và nhiên liệu liệu sạch, công nghệ sạch có biến động tăng. Chúng ta có thể xem qua thống kê một số nước khu vực Đông Nam Á trong đó có Việt Nam.
tt1 <- tt[tt$CN=='Viet Nam' | tt$CN=='Cambodia' | tt$CN=='Lao PDR' | tt$CN=='Thailand',]
tt1 <- tt1[ tt1$SC=='EG.CFT.ACCS.ZS', ]
knitr::kable(tt1)
CN | CC | SN | SC | nt1 | n8 | n7 | n9 | n10 | n11 | n12 | n0 | n1 | n2 | n3 | n4 | n5 | n6 | R1 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
133 | Cambodia | KHM | Access to clean fuels and technologies for cooking (% of population) | EG.CFT.ACCS.ZS | 12.0155351022892 | 9.4 | 8.4 | 10.5 | 11.8 | 13 | 14.8 | 3.5 | 4.1 | 4.69999999999999 | 5.29999999999999 | 5.99999999999999 | 6.8 | 7.6 | 12.0155351022892 |
433 | Lao PDR | LAO | Access to clean fuels and technologies for cooking (% of population) | EG.CFT.ACCS.ZS | 9.96875631860021 | 2.9 | 2.6 | 3.2 | 3.6 | 3.9 | 4.3 | 1.3 | 1.5 | 1.6 | 1.7 | 1.9 | 2.1 | 2.4 | 9.96875631860021 |
769 | Thailand | THA | Access to clean fuels and technologies for cooking (% of population) | EG.CFT.ACCS.ZS | 2.04084776535772 | 70.7 | 69.4 | 72 | 73.2 | 74.5 | 75.5 | 59.1 | 60.8 | 62.4 | 64 | 65.3 | 66.7 | 68.1 | 2.04084776535772 |
845 | Viet Nam | VNM | Access to clean fuels and technologies for cooking (% of population) | EG.CFT.ACCS.ZS | 12.8325987482124 | 41.7 | 37.2 | 46.4 | 51.2 | 56.6 | 62.5 | 13.4 | 16.1 | 19.1 | 22.1 | 25.6 | 29.1 | 33 | 12.8325987482124 |
tt2 <- tt[tt$CN=='Viet Nam' | tt$CN=='Cambodia' | tt$CN=='Lao PDR' | tt$CN=='Thailand',]
tt2 <- tt2[ tt2$SC=='EG.ELC.ACCS.ZS', ]
knitr::kable(tt2)
CN | CC | SN | SC | nt1 | n8 | n7 | n9 | n10 | n11 | n12 | n0 | n1 | n2 | n3 | n4 | n5 | n6 | R1 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
134 | Cambodia | KHM | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 7.79486992241446 | 26.4 | 20.2 | 25.6 | 31.1 | 37.4 | 42.3 | 16.6 | 9.52857398986816 | 13.1091279983521 | 19.3 | 14.2 | 20.5 | 27.4857883453369 | 7.79486992241446 |
434 | Lao PDR | LAO | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 4.86732374507423 | 66 | 54.96 | 67.4014282226563 | 70.2244873046875 | 70 | 76.3666277465237 | 42.5835037231445 | 45.3184509277344 | 46.3 | 48 | 53.5000419616699 | 57.2 | 57.0410587037666 | 4.86732374507423 |
770 | Thailand | THA | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 1.56898699790659 | 94.8210525512695 | 94.137336730957 | 98.96 | 99.7 | 99.3199768066406 | 99.1086235489221 | 82.1 | 90.3664245605469 | 90.9764251708984 | 91.5848770141602 | 92.1987991333008 | 92.8251953125 | 99.146201481454 | 1.56898699790659 |
846 | Viet Nam | VNM | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0.865329654946388 | 93.8383331298828 | 93.0883560180664 | 96.1 | 97.43 | 99 | 97.89 | 88.2350997924805 | 88.9198989868164 | 89.1 | 90.270866394043 | 90.951042175293 | 96.1 | 96 | 0.865329654946388 |
tt3<- tt[tt$n8== 100 & tt$n9== 100 & tt$n10== 100 & tt$n7== 100 & tt$n11== 100 & tt$n12== 100 & tt$n1== 100 & tt$n2== 100 & tt$n3== 100 & tt$n4== 100 & tt$n5== 100 & tt$n6== 100, ]
tt3 <- tt3[tt3$SC=='EG.ELC.ACCS.ZS', ]
knitr::kable(tt3)
CN | CC | SN | SC | nt1 | n8 | n7 | n9 | n10 | n11 | n12 | n0 | n1 | n2 | n3 | n4 | n5 | n6 | R1 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18 | Andorra | AND | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
42 | Australia | AUS | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
46 | Austria | AUT | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
54 | Bahamas, The | BHS | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
58 | Bahrain | BHR | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
74 | Belgium | BEL | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
86 | Bermuda | BMU | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
114 | Brunei Darussalam | BRN | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
142 | Canada | CAN | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
146 | Cayman Islands | CYM | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
158 | Channel Islands | CHI | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
206 | Cyprus | CYP | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
214 | Denmark | DNK | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
262 | Faroe Islands | FRO | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
270 | Finland | FIN | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
274 | France | FRA | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
278 | French Polynesia | PYF | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
294 | Germany | DEU | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
306 | Greece | GRC | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
310 | Greenland | GRL | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
318 | Guam | GUM | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
346 | Hong Kong SAR, China | HKG | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
354 | Iceland | ISL | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
374 | Ireland | IRL | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
378 | Isle of Man | IMN | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
382 | Israel | ISR | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
386 | Italy | ITA | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
394 | Japan | JPN | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
418 | Korea, Rep. | KOR | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
426 | Kuwait | KWT | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
458 | Liechtenstein | LIE | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
466 | Luxembourg | LUX | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
470 | Macao SAR, China | MAC | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
522 | Monaco | MCO | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
558 | Netherlands | NLD | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
562 | New Caledonia | NCL | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
566 | New Zealand | NZL | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
590 | Norway | NOR | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
630 | Portugal | PRT | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
634 | Puerto Rico | PRI | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
638 | Qatar | QAT | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
658 | San Marino | SMR | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
686 | Singapore | SGP | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
698 | Slovenia | SVN | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
718 | Spain | ESP | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
750 | Sweden | SWE | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
754 | Switzerland | CHE | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
818 | United Arab Emirates | ARE | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
822 | United Kingdom | GBR | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
826 | United States | USA | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
850 | Virgin Islands (U.S.) | VIR | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |
1006 | North America | NAC | Access to electricity (% of population) | EG.ELC.ACCS.ZS | 0 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 0 |