GithubHelp home page GithubHelp logo

gb2isic's Introduction

GB2ISIC

动机

最近做一些产业、贸易相关研究,发现产品编码之间的转换很麻烦,特别是国家产业的标准编码与国际编码之间转换。找到《中华人民共和国国家标准GB/T 4754-2011》(GB2011)和《中华人民共和国国家标准GB/T 4754-2017》(GB2017),这些文件的附录B有GB之间的转换,附录C有GB与国际标准行业分类(International Standard Industiral Classification, 以下称isic4)第4版的转换,本包即根据这些转换,写了一个对应的函数。

这两个文件我放在了百度网盘里面:

链接: https://pan.baidu.com/s/1OYd-LaoINHiT2N0SVYqmxg

提取码: y3f4

安装

安装很简单,在R语言控制台输入,

devtools::install_github('common2016/GB2ISIC')

其间会问你要不要更新你已有的一些包,如果旧包过多的话,更新时间较长。不更新的话,直接回车。

使用

library(GB2ISIC)
concordGB(c('0142','2411'),origin = "GB2011", destination = "isic4")
# [1] "0113" "0130" "1709" "3290" "2599" "2220"
concordGB(c('3919','3922'),'GB2011','GB2017')
# [1] "3914" "3915" "3919" "3922"
concordGB('37','GB2011','GB2002')

第一个命令把0142和2411两个GB2011编码的行业转换成了isic4编码。第二个命令把3919和3922两个GB2011编码行业转换成GB2017. 目前转换包括:

  • GB2011/GB2017与isic4互转。
  • GB2002,GB2011与GB2017间互转。

感兴趣在国际行业编码HS, HS0, HS1, HS2, HS3, HS4, ISIC2, ISIC3, SITC1, SITC2, SITC3, SITC4, BEC, NAICS和 SIC间进行转换的,可以参考concordance包。

第三个命令转换了2位码的行业,应该注意,行业码越少,转换误差越大。

注意的几个地方

  • 行业编码一般最好是4位,也可以是2位,但精确度会下降。
  • GB2011的文件中也提到,GB与ISIC间的对应并不是一一完全对应。
  • GB间的转换也不是一一完全对应,因为有的行业在新的行业分类中会分解的更细,有些行业会合并掉。

其他

  • 一直没有找到《中华人民共和国国家标准GB/T 4754-2002》文件,要是哪位朋友有,不妨发一份给我,谢先,[email protected]
  • 使用过程中,有任何问题和建议也可以联系[email protected]

gb2isic's People

Contributors

common2016 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.