{"id":16208498,"url":"https://github.com/hugetim/nbstata","last_synced_at":"2025-10-20T04:16:40.782Z","repository":{"id":63057089,"uuid":"564027414","full_name":"hugetim/nbstata","owner":"hugetim","description":"A Jupyter kernel for Stata built on pystata","archived":false,"fork":false,"pushed_at":"2024-10-25T19:20:27.000Z","size":10427,"stargazers_count":28,"open_issues_count":13,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-26T00:16:41.945Z","etag":null,"topics":["jupyter","jupyter-kernels","jupyter-notebook","jupyterlab","nbdev","notebook","python","stata"],"latest_commit_sha":null,"homepage":"https://hugetim.github.io/nbstata/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hugetim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"hugetim","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-11-09T20:52:11.000Z","updated_at":"2024-10-25T19:19:36.000Z","dependencies_parsed_at":"2023-10-03T00:19:38.542Z","dependency_job_id":"5868b37f-036a-47f9-99ef-60002d31dc9b","html_url":"https://github.com/hugetim/nbstata","commit_stats":{"total_commits":290,"total_committers":1,"mean_commits":290.0,"dds":0.0,"last_synced_commit":"9ae2a89c9ada428781bef943a727f0247295dadd"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugetim%2Fnbstata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugetim%2Fnbstata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugetim%2Fnbstata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugetim%2Fnbstata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugetim","download_url":"https://codeload.github.com/hugetim/nbstata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232340083,"owners_count":18508089,"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":["jupyter","jupyter-kernels","jupyter-notebook","jupyterlab","nbdev","notebook","python","stata"],"created_at":"2024-10-10T10:17:18.018Z","updated_at":"2025-10-20T04:16:40.682Z","avatar_url":"https://github.com/hugetim.png","language":"Jupyter Notebook","funding_links":["https://github.com/sponsors/hugetim"],"categories":["Jupyter Kernels"],"sub_categories":[],"readme":"# nbstata: a new Stata kernel\n\n\n\u003c!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! --\u003e\n\n \n\n*nbstata* is a [Jupyter\nkernel](https://docs.jupyter.org/en/latest/projects/kernels.html) for\n[Stata](https://www.stata.com/why-use-stata/) built on top of\n[pystata](https://www.stata.com/python/pystata18/index.html).\n\n**[*For the User Guide, click\nhere.*](https://hugetim.github.io/nbstata/user_guide.html)**\n\n \n\n## What is Jupyter?\n\nA Jupyter notebook allows you to combine interactive code and results\nwith [Markdown](https://daringfireball.net/projects/markdown/basics) in\na single document. Though it is named after the three core programming\nlanguages it supports (Julia, Python, and R), it can be used with with a\nwide variety of languages.\n\n*nbstata* allows you to create Stata notebooks (as opposed to [using\nStata within a *Python*\nnotebook](https://www.stata.com/python/pystata18/notebook/Example2.html),\nwhich is needlessly clunky if you are working primarily with Stata).\n\n### Key *nbstata* features\n\n- [x] [Easy\n  setup](https://hugetim.github.io/nbstata/user_guide.html#install)\n- [x] Works with Stata 17+ (only).\n- [x] DataGrid widget with `browse`-like capabilities (e.g., interactive\n  filtering)\n- [x] Variable and data properties available in a ‘contextual help’ side\n  panel\n- [x] Quarto [inline\n  code](https://quarto.org/docs/computations/inline-code.html) support\n\nUsers of Stata 17 or 18.0 also get these features only built-in natively\nto Stata 18.5+:\n\n- Displays Stata output without the redundant ‘echo’ of (multi-line)\n  commands\n- Autocompletion for variables, macros, matrices, and file paths\n- Interactive/richtext help files accessible within notebook\n- `#delimit ;` interactive support (along with all types of comments)\n\nThe video below demonstrates using Stata in a Jupyter notebook. In\naddition to the\n[NBClassic](https://nbclassic.readthedocs.io/en/stable/notebook.html)\napplication shown there, *nbstata* can also be used with\n[JupyterLab](https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html),\n[VS\nCode](https://code.visualstudio.com/docs/datascience/jupyter-notebooks),\nor [Quarto](https://quarto.org/).\n\n\u003cimg align=\"center\" width=\"650\" src=\"https://github.com/kylebarron/stata_kernel/raw/master/docs/src/img/jupyter_notebook_example.gif\" alt=\"Animated GIF demoing major Stata kernel features\"\u003e\n\n### What can you do with Stata notebooks…\n\n…that you can’t do with the [official Stata\ninterface](https://www.stata.com/features/overview/graphical-user-interface/)?\n\n- Exploratory analysis that is both:\n  - interactive\n  - preserved for future reference/editing\n- Present results in a way that interweaves:[^1]\n  - code\n  - results (including graphs)\n  - rich text:\n    1.  lists\n    2.  **Headings**\n    3.  \u003cimg align=\"left\" width=\"54\" height=\"18.6\" src=\"https://raw.githubusercontent.com/hugetim/nbstata/master/index_files/figure-commonmark/226326ec-1-image-2.png\" alt=\"WordArt of the word 'images'\"\u003e\n    4.  [links](https://hugetim.github.io/nbstata/)\n    5.  math: $y_{it}=\\beta_0+\\varepsilon_{it}$\n\n## Contributing\n\n*nbstata* is being developed using\n[nbdev](https://nbdev.fast.ai/blog/posts/2022-07-28-nbdev2/#whats-nbdev).\nThe `/nbs` directory is where edits to the source code should be made.\n(The python code is then exported to the `/nbdev` library folder.)\n\nFor more, see\n[CONTRIBUTING.md](https://github.com/hugetim/nbstata/blob/master/CONTRIBUTING.md).\n\n## Acknowledgements\n\nKyle Barron authored the original *stata_kernel*, which works for older\nversions of Stata. Vinci Chow created a Stata kernel that instead uses\n[pystata](https://www.stata.com/python/pystata18/), which first became\navailable with Stata 17. *nbstata* was originally derived from his\n[*pystata-kernel*](https://github.com/ticoneva/pystata-kernel), but much\nof the docs and newer features are derived from *stata_kernel*.\n\n[^1]: Stata [dynamic\n    documents](https://www.stata.com/manuals/rptdynamicdocumentsintro.pdf)\n    can do this part, though with a less interactive workflow. (See\n    also: [markstat](https://grodri.github.io/markstat/),\n    [stmd](https://www.ssc.wisc.edu/~hemken/Stataworkshops/stmd/Usage/stmdusage.html),\n    and\n    [Statamarkdown](https://ssc.wisc.edu/~hemken/Stataworkshops/Statamarkdown/stata-and-r-markdown.html))\n    Using *nbstata* with\n    [Quarto](https://www.statalist.org/forums/forum/general-stata-discussion/general/1703835-ado-files-and-literate-programming)\n    instead gives you a similar workflow, with greater flexibility of\n    output.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugetim%2Fnbstata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugetim%2Fnbstata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugetim%2Fnbstata/lists"}