Package 'ispv'

Title: Use Czech labour market survey data
Description: Retrieve and load data from the Czech Information System on Average Earnings (ISPV) at <https://www.ispv.cz>.
Authors: Petr Bouchal [aut, cre]
Maintainer: Petr Bouchal <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0.9000
Built: 2024-08-19 05:33:05 UTC
Source: https://github.com/petrbouchal/ispv

Help Index


Codelist (registry) of regions

Description

Used in ⁠pv_reg_*()⁠ to add proper region IDs and names.

Usage

kraje

Format

A data frame with 14 rows and 4 variables:

kraj_id_ispv

character. Internal region code, appears in Excel file name

kraj_id

character. non-NUTS ID of kraj (region, NUTS3).

kraj_name

character. Czech name of kraj (region, NUTS3).

kraj_id_nuts3

character. NUTS ID of kraj (region, NUTS3)..


Load country-wide data by gender and age

Description

Load country-wide data by gender and age (age in 6 bins)

Usage

pv_cr_monthlypay_age_gender(path, sheet = 2)

Arguments

path

path(s) to file(s), Will be file with "CR_YYQD and either "PLS" or "MZS" in the name.

sheet

sheet number; you should be able to leave this as default (2) if using files downloaded from ISPV

Value

a tibble

Examples

pv_cr_monthlypay_age_gender(system.file("extdata", "CR_204_MZS.xlsx", package = "ispv"))
pv_cr_monthlypay_age_gender(system.file("extdata", "CR_204_PLS.xlsx", package = "ispv"))

Load country-wide data on monthly earnings by education

Description

Loads data on monthly earnings by education level from one or more local Excel files downloaded from ISPV links retrieved by pv_list_reg().

Usage

pv_cr_monthlypay_education(path, sheet = 3)

Arguments

path

path(s) to file(s), Will be file with "CR_YYQD and either "PLS" or "MZS" in the name.

sheet

sheet number; you should be able to leave this as default (3) if using files downloaded from ISPV

Value

a tibble

Examples

pv_cr_monthlypay_education(system.file("extdata", "CR_204_PLS.xlsx", package = "ispv"))
pv_cr_monthlypay_education(system.file("extdata", "CR_204_MZS.xlsx", package = "ispv"))

Load country-wide data by ISCO

Description

Load country-wide data by ISCO (profession classification) at 4 and 5 digits

Usage

pv_cr_monthlypay_isco(path, sheet = 1)

Arguments

path

path(s) to file(s), Will be file with "CR_YYQD and either "PLS" or "MZS" in the name.

sheet

which sheet to open. Will be 1 (the default) in files with only one sheet ("CR_204_MZS_M8r.xlsx") and 7 in comprehensive file ("CR_204_MZS.xlsx")

Value

a tibble

Examples

pv_cr_monthlypay_isco(system.file("extdata", "CR_204_MZS_M8r.xlsx", package = "ispv"), 1)
pv_cr_monthlypay_isco(system.file("extdata", "CR_204_MZS.xlsx", package = "ispv"), 7)
pv_cr_monthlypay_isco(system.file("extdata", "CR_204_PLS_M8r.xlsx", package = "ispv"), 1)
pv_cr_monthlypay_isco(system.file("extdata", "CR_204_PLS.xlsx", package = "ispv"), 7)

Load country-wide data by NACE

Description

Load country-wide data by NACE (single-letter industry codes)

Usage

pv_cr_monthlypay_nace(path, sheet = 5)

Arguments

path

path(s) to file(s), Will be file with "CR_YYQD and either "PLS" or "MZS" in the name.

sheet

sheet number; you should be able to leave this as default (5) if using files downloaded from ISPV

Value

a tibble

Examples

pv_cr_monthlypay_nace(system.file("extdata", "CR_204_MZS.xlsx", package = "ispv"))
pv_cr_monthlypay_nace(system.file("extdata", "CR_204_PLS.xlsx", package = "ispv"))

Get links to Excel files with national data on ISPV website for a given year

Description

This function scrapes the relevant year's archive page for links to Excel files with national data and returns the result in a tibble.

Usage

pv_list_cr(year = NULL, base_url = NULL, user_agent = NULL)

Arguments

year

Year, defaults to scraping page for latest available data. String or numeric in YYYY format of length >= 1

base_url

base url, defaults to https://ispv.cz

user_agent

User agent string, defaults to package URL on Github (https://github.com/petrbouchal/ispv).

Value

a tibble with file name, URL and year. File name can be used to determine the time period and region.

Examples

## Not run: 
pv_list_reg(year = 2019:2020)

## End(Not run)

Get links to Excel files with regional data on ISPV website for a given year

Description

This function scrapes the relevant year's archive page for links to Excel files with regional data and returns the result in a tibble.

Usage

pv_list_reg(year = NULL, base_url = NULL, user_agent = NULL)

Arguments

year

Year, defaults to scraping page for latest available data. String or numeric in YYYY format of length >= 1.

base_url

base url, defaults to https://ispv.cz

user_agent

User agent string, defaults to package URL on Github (https://github.com/petrbouchal/ispv).

Value

a tibble with file name, URL and year. File name can be used to determine the time period and region.

Examples

## Not run: 
pv_list_reg(year = 2019:2020)

## End(Not run)

Load regional data on monthly earnings by profession

Description

Load ISPV Excel files with regional data on monthly earnings by ISCO code

Usage

pv_reg_monthlypay_age_gender(path, sheet = 2)

Arguments

path

path(s) to file(s), Will be file with "Reg_YYQ" and either "PLS" or "MZS" in the name.

sheet

sheet number; you should be able to leave this as default (2) if using files downloaded from ISPV

Value

a tibble

Examples

pv_reg_monthlypay_age_gender(system.file("extdata", "Kar_204_pls.xlsx", package = "ispv"))
pv_reg_monthlypay_age_gender(system.file("extdata", "Kar_204_mzs.xlsx", package = "ispv"))

Load regional data on monthly earnings by education

Description

Loads data on monthly earnings by education level from one or more local Excel files downloaded from ISPV links retrieved by pv_list_reg().

Usage

pv_reg_monthlypay_education(path, sheet = 2)

Arguments

path

path(s) to file(s), Will be file with "Reg_YYQ" and either "PLS" or "MZS" in the name.

sheet

sheet number; you should be able to leave this as default (2) if using files downloaded from ISPV

Value

a tibble

Examples

pv_reg_monthlypay_education(system.file("extdata", "Kar_204_pls.xlsx", package = "ispv"))
pv_reg_monthlypay_education(system.file("extdata", "Kar_204_mzs.xlsx", package = "ispv"))

Load regional data on monthly earnings by profession

Description

Loads data on monthly earnings by ISCO code from one or more local Excel files downloaded from ISPV links retrieved by pv_list_reg().

Usage

pv_reg_monthlypay_isco4(path, sheet = 4)

Arguments

path

path(s) to file(s), Will be file with "Reg_YYQ" and either "PLS" or "MZS" in the name.

sheet

sheet number; you should be able to leave this as default (4) if using files downloaded from ISPV

Format

The function returns a data frame with 22 variables. All earnings are monthly gross in CZK.

kraj_id_ispv

character. Internal region code, appears in Excel file name

file

character. File from which this row was read.

isco4_full

character. 4-digit ISCO (occupation) code with Czech ISCO category name. CZSO codelist number 5708

fte_thous

double. Thousand FTEs in this ISCO-4 category - converted to FTE by months paid.

pay_median

double. Median monthly earnings.

pay_d1

double. 1st decile monthly earnings.

pay_q1

double. 1st quartile monthly earnings.

pay_q3

double. 3rd quartile monthly earnings.

pay_d9

double. 9th decline monthly earnings.

pay_mean

double. Mean earnings.

bonus_perc

double. Bonuses ("odměny") as share of pay, as decimal

supplements_perc

double. Supplements ("příplatky") as share of pay, as decimal.

compensation_perc

double. Compensation ("náhrady") as share of pay, as decimal.

hours_per_month

double. Monthly hours worked.

sfera

character. Sphere - salary (pls) or wage (mzs), roughly equals public or private sector

period

character. Time period as appears in file name, e.g. 204 is Q4 of 2020. Regional data only comes in Q4, i.e. for full year.

year

character. Year, as 4-digit character vector

isco4_id

character. 4-digit ISCO code.

isco4_name

character. Czech name of 4-digit ISCO category

kraj_id

character. non-NUTS ID of kraj (region, NUTS3).

kraj_name

character. Czech name of kraj (region, NUTS3).

kraj_id_nuts3

character. NUTS ID of kraj (region, NUTS3)..

Value

a tibble, see Format for details.

Examples

pv_reg_monthlypay_isco4(system.file("extdata", "Kar_204_mzs.xlsx", package = "ispv"))
pv_reg_monthlypay_isco4(system.file("extdata", "Kar_204_pls.xlsx", package = "ispv"))