See what the file looks like before you download. Each row is one person aged 15 and over. The meaning of each column is in Variables.
First rows of the 1402 CSV file
pid
province
urban
quarter
sex
age
status
hours
weight
14029052589
24
1
1
1
16
2
3
436.0
14026175175
11
2
3
2
26
2
5
662.4
14028113071
9
1
3
2
51
1
18
286.4
14023332984
23
2
2
1
66
3
42
531.0
14026775887
5
1
3
2
47
1
21
546.9
Full file: About 150,000 people per quarter
Variables 1402 (2023)
Column
Meaning
Type
Note
pid
Person ID
ID
province
Province (code)
Code
urban
Urban=1, Rural=2
Code
quarter
Quarter (1 to 4)
Code
sex
Sex: male=1, female=2
Code
age
Age (years)
Number
status
Employed=1, Unemployed=2, Inactive=3
Code
hours
Hours worked per week
Number
weight
Sample weight
Number
The full list of codes (for example province codes) is in the guide (codebook) file.
How to use 1402 (2023)
Download the CSV file.
If it is a ZIP file, unzip it.
Check the file check code (below).
Open it in your program. Example code:
R
library(readr)
df <- read_csv("lfs-1402-all-quarters.csv")
head(df)
# weighted mean of age
weighted.mean(df$age, df$weight, na.rm = TRUE)
Python
import pandas as pd
df = pd.read_csv("lfs-1402-all-quarters.csv")
print(df.head())
# weighted mean of age
(df["age"] * df["weight"]).sum() / df["weight"].sum()
Stata
import delimited "lfs-1402-all-quarters.csv", clear encoding(utf-8)
describe
summarize age [aweight=weight]
Important: This is a sample. To get correct numbers for the whole country, always use the weight column (weight).
File check code (SHA-256)
After download, compare this code with your file's code. If they match, the file is complete.
# Windows
certutil -hashfile lfs-1402-all-quarters-csv.zip SHA256
# Mac and Linux
shasum -a 256 lfs-1402-all-quarters-csv.zip