{"id":27118333,"url":"https://github.com/mrchypark/tqk","last_synced_at":"2025-04-07T07:37:24.965Z","repository":{"id":41297319,"uuid":"102181005","full_name":"mrchypark/tqk","owner":"mrchypark","description":"한국 주식 데이터를 위한 R 패키지","archived":false,"fork":false,"pushed_at":"2023-08-29T17:49:53.000Z","size":9938,"stargazers_count":60,"open_issues_count":2,"forks_count":28,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-14T07:11:05.242Z","etag":null,"topics":["hacktoberfest","hacktoberfest2021","korea-stock","quant","r","rstats","stock","tidyquant","tidyverse"],"latest_commit_sha":null,"homepage":"https://mrchypark.github.io/tqk/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrchypark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://mrchypark.github.io/donateme/","https://paypal.me/mrchypark"]}},"created_at":"2017-09-02T07:37:09.000Z","updated_at":"2023-11-23T02:46:08.000Z","dependencies_parsed_at":"2022-09-12T13:43:02.094Z","dependency_job_id":null,"html_url":"https://github.com/mrchypark/tqk","commit_stats":{"total_commits":136,"total_committers":4,"mean_commits":34.0,"dds":0.08823529411764708,"last_synced_commit":"7b4778e86500f1d69f049b3ed751d7dd437c0bbe"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrchypark%2Ftqk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrchypark%2Ftqk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrchypark%2Ftqk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrchypark%2Ftqk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrchypark","download_url":"https://codeload.github.com/mrchypark/tqk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289378,"owners_count":20914463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","hacktoberfest2021","korea-stock","quant","r","rstats","stock","tidyquant","tidyverse"],"created_at":"2025-04-07T07:37:24.364Z","updated_at":"2025-04-07T07:37:24.948Z","avatar_url":"https://github.com/mrchypark.png","language":"R","funding_links":["https://mrchypark.github.io/donateme/","https://paypal.me/mrchypark"],"categories":[],"sub_categories":[],"readme":"\n# tqk [\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=140/\u003e](https://mrchypark.github.io/tqk/index.html)\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)\n[![Codecov test coverage](https://codecov.io/gh/mrchypark/tqk/branch/main/graph/badge.svg)](https://app.codecov.io/gh/mrchypark/tqk?branch=main)\n[![R-CMD-check](https://github.com/mrchypark/tqk/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/mrchypark/tqk/actions/workflows/check-standard.yaml)\n[![CRAN status](https://www.r-pkg.org/badges/version/tqk)](https://CRAN.R-project.org/package=tqk)\n[![runiverse-package](https://mrchypark.r-universe.dev/badges/tqk)](https://mrchypark.r-universe.dev/tqk)\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors)\n\n\u003c!-- badges: end --\u003e\n\n## Installation\n\n``` r\n# CRAN version\ninstall.packages(\"tqk\")\n\n# Dev version\ninstall.packages('tqk', repos = c(\n                     'https://mrchypark.r-universe.dev',\n                     'https://cloud.r-project.org'\n                 ))\n```\n\n## How to use\n\n### Stock code\n\n`code_get()` function provide stock code.\n\n``` r\ncode_get()\n```\n\n    ## # A tibble: 2,641 × 6\n    ##    market name           code   name_full              name_eng        code_full\n    ##    \u003cchr\u003e  \u003cchr\u003e          \u003cchr\u003e  \u003cchr\u003e                  \u003cchr\u003e           \u003cchr\u003e    \n    ##  1 KOSDAQ 마이크로컨텍솔 098120 (주)마이크로컨텍솔루션 Micro Contact … KR709812…\n    ##  2 KOSDAQ 스카이이앤엠   131100 (주)스카이이앤엠       SKY E\u0026M Co., L… KR713110…\n    ##  3 KOSDAQ 포스코엠텍     009520 (주)포스코엠텍         POSCO M-TECH C… KR700952…\n    ##  4 KOSPI  AJ네트웍스     095570 AJ네트웍스보통주       AJ Networks Co… KR709557…\n    ##  5 KOSPI  AK홀딩스       006840 AK홀딩스보통주         AK Holdings, I… KR700684…\n    ##  6 KOSPI  BGF리테일      282330 BGF리테일보통주        BGF Retail      KR728233…\n    ##  7 KOSPI  BGF            027410 BGF보통주              BGF             KR702741…\n    ##  8 KOSPI  BNK금융지주    138930 BNK금융지주보통주      BNK Financial … KR713893…\n    ##  9 KOSPI  BYC우          001465 BYC1우선주             BYC(1P)         KR700146…\n    ## 10 KOSPI  BYC            001460 BYC보통주              BYC             KR700146…\n    ## # ℹ 2,631 more rows\n\nIf want to get current version of stock code, add `fresh = TRUE`.\n\n``` r\ncode_get(fresh = TRUE)\n```\n\n    ## # A tibble: 2,746 × 6\n    ##    market name           code   name_full              name_eng        code_full\n    ##    \u003cchr\u003e  \u003cchr\u003e          \u003cchr\u003e  \u003cchr\u003e                  \u003cchr\u003e           \u003cchr\u003e    \n    ##  1 KOSDAQ 마이크로컨텍솔 098120 (주)마이크로컨텍솔루션 Micro Contact … KR709812…\n    ##  2 KOSDAQ 포스코엠텍     009520 (주)포스코엠텍         POSCO M-TECH C… KR700952…\n    ##  3 KOSPI  AJ네트웍스     095570 AJ네트웍스보통주       AJ Networks Co… KR709557…\n    ##  4 KOSPI  AK홀딩스       006840 AK홀딩스보통주         AK Holdings, I… KR700684…\n    ##  5 KOSPI  BGF리테일      282330 BGF리테일보통주        BGF Retail      KR728233…\n    ##  6 KOSPI  BGF            027410 BGF보통주              BGF             KR702741…\n    ##  7 KOSPI  BNK금융지주    138930 BNK금융지주보통주      BNK Financial … KR713893…\n    ##  8 KOSPI  BYC우          001465 BYC1우선주             BYC(1P)         KR700146…\n    ##  9 KOSPI  BYC            001460 BYC보통주              BYC             KR700146…\n    ## 10 KOSPI  CJ우           001045 CJ1우선주              CJ(1P)          KR700104…\n    ## # ℹ 2,736 more rows\n\n### Stock data\n\n`tqk_get()` function provide stock data. First parameter named `x` is\nkorean stock code like “005930” is samsung. Result of `code_get()`\nfunction has `code` column for `x` parameter on `tqk_get()` function.\n\n``` r\ncode_get() %\u003e% \n  dplyr::filter(\"삼성전자\" == name) %\u003e%\n  dplyr::pull(code) %\u003e% \n  tqk_get(from = \"2018-05-01\") -\u003e ss\nss\n```\n\n    ## # A tibble: 1,314 × 6\n    ##    date        open  high   low close   volume\n    ##    \u003cdate\u003e     \u003cint\u003e \u003cint\u003e \u003cint\u003e \u003cint\u003e    \u003cint\u003e\n    ##  1 2023-08-29 66900 67200 66600 66800  9102086\n    ##  2 2023-08-28 66800 67000 66500 66800  5824628\n    ##  3 2023-08-25 67100 67400 66900 67100  7032462\n    ##  4 2023-08-24 68300 68700 67900 68200 15044463\n    ##  5 2023-08-23 66700 67100 66400 67100  9549352\n    ##  6 2023-08-22 67200 67700 66300 66600 10500242\n    ##  7 2023-08-21 66600 67100 66300 66600  9720067\n    ##  8 2023-08-18 66000 66700 65800 66300 11745006\n    ##  9 2023-08-17 66300 66800 66000 66700 10778652\n    ## 10 2023-08-16 66700 67100 66300 67000 13174578\n    ## # ℹ 1,304 more rows\n\n## Built-in dataset\n\n`{tqk}` has built-in dataset called `SHANK` that is data to `2017-09-07`\nwith Samsung Elect, Hyundai Motor, Amore pacific, Naver, Kakao.\n\n``` r\nSHANK %\u003e%\n  dplyr::distinct(symbol)\n```\n\n    ## # A tibble: 5 × 1\n    ##   symbol\n    ##   \u003cchr\u003e \n    ## 1 SS    \n    ## 2 HYD   \n    ## 3 AMP   \n    ## 4 NVR   \n    ## 5 KKO\n\n``` r\nSHANK\n```\n\n    ## # A tibble: 22,259 × 7\n    ##    symbol date          open    high     low   close volume\n    ##    \u003cchr\u003e  \u003cdate\u003e       \u003cint\u003e   \u003cint\u003e   \u003cint\u003e   \u003cint\u003e  \u003cint\u003e\n    ##  1 SS     2017-09-07 2350000 2411000 2350000 2406000 193530\n    ##  2 SS     2017-09-06 2338000 2359000 2335000 2350000 216221\n    ##  3 SS     2017-09-05 2312000 2345000 2298000 2338000 234322\n    ##  4 SS     2017-09-04 2289000 2318000 2275000 2302000 158870\n    ##  5 SS     2017-09-01 2323000 2332000 2315000 2324000 212834\n    ##  6 SS     2017-08-31 2311000 2332000 2300000 2316000 220234\n    ##  7 SS     2017-08-30 2319000 2320000 2298000 2310000 150260\n    ##  8 SS     2017-08-29 2282000 2304000 2258000 2304000 252473\n    ##  9 SS     2017-08-28 2351000 2362000 2298000 2305000 199242\n    ## 10 SS     2017-08-25 2394000 2394000 2336000 2351000 224871\n    ## # ℹ 22,249 more rows\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://chulhongsung.github.io/\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/37679460?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSungChul Hong\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#question-chulhongsung\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://gbkim01.github.io/myblog/\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/30010992?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003egbkim01\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mrchypark/tqk/issues?q=author%3Agbkim01\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrchypark%2Ftqk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrchypark%2Ftqk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrchypark%2Ftqk/lists"}