Definition changeeduc The education definition changed. From this year, seminary education has its own code and pre-university is merged with high school. To compare with 1390, combine codes 4 and 5.Added 2024-08-23
Info This year part of the census was done online.Added 2024-08-23
The full list of codes (for example province codes) is in the guide (codebook) file.
How to use 1395 (2016)
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("census-1395-2pct.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("census-1395-2pct.csv")
print(df.head())
# weighted mean of age
(df["age"] * df["weight"]).sum() / df["weight"].sum()
Stata
import delimited "census-1395-2pct.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 census-1395-2pct-csv.zip SHA256
# Mac and Linux
shasum -a 256 census-1395-2pct-csv.zip