binary_search_r()

Get the position of x in vector y

binary_search_cpp()

Binary search cpp version

Get Score

Find the score of the given x in vector y.

get_score() get_score_vec()

Get the score of a risk factor according to the given config.

Risk Fastors to Score

rf2score()

Raw risk factors value to score.

sum_rf_score()

Sum every risk factor score

cal_user_coef()

A big wrapper of get user insurance discount coef.

Fill NA

More efficient way of filling nas in native R code.

fill_na()

Fill NA with the last no-NA value generic.

Calculate AUC

auc()

Area under the ROC curve (AUC)

Coordinate transform

wgs2gcj() gcj2wgs() gcj2bd() bd2gcj() wgs2bd() bd2wgs()

Coordinate transform

cal_gps_dist()

Calculate earth distance between two points gps longitude and latitude.

Json format transform

fmt_gps_json()

Generate GPS lines data for echarts

Helper

pjutils

pjutils: Utils for data calculation and analysis.