{"id":467,"date":"2020-07-22T23:24:50","date_gmt":"2020-07-23T03:24:50","guid":{"rendered":"http:\/\/blog.uvm.edu\/tbplante\/?p=467"},"modified":"2021-05-31T16:06:31","modified_gmt":"2021-05-31T20:06:31","slug":"getting-python-to-work-with-stata-in-windows","status":"publish","type":"post","link":"https:\/\/blog.uvm.edu\/tbplante\/2020\/07\/22\/getting-python-to-work-with-stata-in-windows\/","title":{"rendered":"Getting Python and Jupyter to work with Stata in Windows"},"content":{"rendered":"\n<p><em>Note: this post was written prior to Stata 17, which now allows Python to control Stata and vice versa. In Stata 16, Python could not control Stata but Stata could control Python. Because of this functionality, there&#8217;s a more streamlined approach to getting Jupyter to play nicely with Stata 17, detailed <a rel=\"noreferrer noopener\" href=\"https:\/\/www.stata.com\/new-in-stata\/jupyter-notebooks\/\" target=\"_blank\">here<\/a>. You&#8217;ll still need to install Python and Jupyter, so this post is still helpful. <\/em><\/p>\n\n\n\n<p>Stata 16 now integrates with Python. I&#8217;m pretty stoked about using some of the Python figure packages. Getting it up and running has been a bit of a challenge. Here&#8217;s how I got it to work.<\/p>\n\n\n\n<p>Of note, since I started this post, Stata&#8217;s blog has started a series on using Python, which <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.stata.com\/tag\/python\/\" target=\"_blank\">you should check out here<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install part 1: <\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Installing Anaconda (free for individuals, not for institutions)<\/h3>\n\n\n\n<p>Anaconda comes with many built-in statistical packages. The (free) individual version of Anaconda from <a rel=\"noreferrer noopener\" href=\"https:\/\/www.anaconda.com\/products\/individual\" target=\"_blank\">here<\/a>. <em><strong>Just make sure to check the &#8220;set as path&#8221; button during the Anaconda install<\/strong><\/em><strong><em>!<\/em><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Installing the (universally free) traditional Python distribution<\/h3>\n\n\n\n<p>As of July 2020, Python apparently has two versions that are commonly used, the 2.x version and the 3.x version. The end-of-life of 2.x versions is this year, so I wouldn&#8217;t recommend using it (current highest version is 2.7). Instead, use the 3.x version, currently the <strong>3.8 version<\/strong>. You can find it at the <a href=\"https:\/\/www.python.org\/downloads\/windows\/\" target=\"_blank\" rel=\"noreferrer noopener\">Windows Python Download Page<\/a>.<\/p>\n\n\n\n<p><strong><em>Make sure to install the version matching your Stata install!<\/em><\/strong> Stata comes as 32 bit or 64 bit. In Stata, type &#8211;<strong>about<\/strong>&#8211; to see what version you have.  You&#8217;ll see that mine is running the 64-bit version of Stata. If you have a relatively modern computer, <strong><em>you are probably running the 64-bit version of Stata<\/em><\/strong>. Windows can actually run either 32-bit or 64-bit versions if you have a 64-bit processor, so do yourself a favor and just check. <strong><em>Type -about- in Stata to confirm your version.<\/em><\/strong> <\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:67% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"518\" height=\"362\" src=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/09\/python-versions-for-windows.jpg\" alt=\"\" class=\"wp-image-582 size-full\" srcset=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/09\/python-versions-for-windows.jpg 518w, https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/09\/python-versions-for-windows-300x210.jpg 300w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<p>Make sure that you install the corresponding version of Python. The highlighted one (x86-64) is the 64 bit. The other one (x86) is the 32-bit version. For this example, since I have the 64-bit version of stata, I installed the x86-64, 64-bit version of Python.<\/p>\n\n\n\n<p>I had originally installed the 32-bit version of Python and Stata couldn&#8217;t load it. Installing the 64-bit version of Python solved that. There&#8217;s actually a big &#8220;download now&#8221; button on the main Python webpage that will give you the 32-bit version. Make sure to select the specific stable release in the picture above. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">For the love of Pete, check this PATH box when you install it. <\/h3>\n\n\n\n<p>PATH is a list of commands that can be run from the Windows command line, and where their relative program exists. <\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:85% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"831\" height=\"524\" src=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/path-install.png\" alt=\"\" class=\"wp-image-505 size-full\" srcset=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/path-install.png 831w, https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/path-install-300x189.png 300w, https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/path-install-768x484.png 768w\" sizes=\"auto, (max-width: 831px) 100vw, 831px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<p>See this check box right here? Select it. If you don&#8217;t, you&#8217;ll have a heck of a time getting anything to run from the command line. This should be checked on default, I have no idea why it&#8217;s not. If you forgot to check this box, uninstall Python and reinstall it after checking this box. <\/p>\n\n\n\n<p>Also, notice that it says &#8220;64 bit&#8221; on the installer screen above. If it says &#8220;32 bit&#8221;, you probably downloaded the wrong version. Go back and try again!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What the heck did I just install?<\/h3>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:74% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"369\" height=\"244\" src=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/python-apps.png\" alt=\"\" class=\"wp-image-472 size-full\" srcset=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/python-apps.png 369w, https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/python-apps-300x198.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<p>There are two Python shell apps\/programs that came along with the default Python setup. <a href=\"https:\/\/docs.python.org\/3\/library\/idle.html\">IDLE<\/a> is a more user-friendly Python shell. It resembles the command line in Stata, but it has the syntax highlighting of the Do file editor. <\/p>\n\n\n\n<p>The app called &#8220;Python 3.8 (64-bit)&#8221; is the shell without any markup. If you want to play around with Python, I recommend using IDLE.  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Making your first program in IDLE<\/h3>\n\n\n\n<p>Anything you run in Python should be from a script, or a *.py file. Pop one open from within IDLE by hitting Ctrl+N. Enter the following:<\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:75% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"574\" height=\"479\" src=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/hw.png\" alt=\"\" class=\"wp-image-493 size-full\" srcset=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/hw.png 574w, https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/hw-300x250.png 300w\" sizes=\"auto, (max-width: 574px) 100vw, 574px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>print(\"Hello world!\")<\/code><\/pre>\n\n\n\n<p>Then save it and run it (by pressing F5) and you&#8217;ll get the hello world!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How does that look in Stata?<\/h3>\n\n\n\n<p>Let&#8217;s do the same thing in a Stata do file. In order to open up the Python shell within Stata, you have to type &#8211;python&#8211; on its own line, your intended python code, then &#8211;end&#8211; on its own line. Here, I have entered:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python\nprint(\"hello world!\")\nend<\/code><\/pre>\n\n\n\n<p>Then just hit ctrl+d or the run button to get it to work in Stata!<\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:85% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"654\" height=\"345\" src=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/hw-stata.png\" alt=\"\" class=\"wp-image-494 size-full\" srcset=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/hw-stata.png 654w, https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/hw-stata-300x158.png 300w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Install Part 2: How do I get the Pandas, Matplotlib, SciPy, Sklearn, and NumPy libraries installed in Python?<\/h2>\n\n\n\n<p><em>Note: Anaconda comes with all of these except sklearn. For below, just complete the sklearn step.<\/em><\/p>\n\n\n\n<p>Python by itself can do some stuff, but the heavy lifting for stats and visualization is from add-in libraries that aren&#8217;t included with the default Python and must be added in before doing much of anything else. (Note: <a href=\"https:\/\/www.anaconda.com\/\">Anaconda<\/a> <em>does <\/em>come with those and is a Python installation geared towards science, but we&#8217;re doing the classic install here.) Installing these additional libraries can be done with the included <strong>pip<\/strong> library, which automates all downloads and installations. BUT pip it has to be called from the <strong><em>Windows command line<\/em><\/strong>, <strong><em>not in a Python shell<\/em><\/strong> (i.e., not in IDLE). You&#8217;ll know you&#8217;re in the shell if the line starts with this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&gt;&gt;&gt;<\/pre>\n\n\n\n<p>So if you type &#8220;pip install pandas&#8221; in the shell (after the &#8220;&gt;&gt;&gt;&#8221;), you&#8217;ll get an error and you will not be getting pandas. <\/p>\n\n\n\n<p>To pop up the Windows command line, hit the Start button then type &#8220;cmd&#8221; to open it up. Or hit windows key+r and type &#8220;cmd&#8221; to open it up.  If you correctly checked the PATH checkbox in the install, you should get the version reported if you type the following in:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python --version<\/code><\/pre>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:85% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"680\" src=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/cmd.png\" alt=\"\" class=\"wp-image-506 size-full\" srcset=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/cmd.png 975w, https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/cmd-300x209.png 300w, https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/cmd-768x536.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<p>If you get some sort of error, it&#8217;s probably because you didn&#8217;t check the PATH box during the install. Uninstall Python then reinstall it and make for sure you check that stupid PATH box. <\/p>\n\n\n\n<p>A note about the Windows 10 command line: If you type &#8220;Python&#8221; and hit enter, Windows pops up the Windows store and tries to get you to install the version of Python that they host. This is by far the dumbest Windows feature ever, and I have seen BOB. So, <strong><em>avoid ever typing the word &#8220;python&#8221; in the command line<\/em><\/strong>. Instead, use the handy &#8220;py&#8221; command, which does everything you&#8217;ll need it to do. Py is the python launcher. <\/p>\n\n\n\n<p>To call pip, you want to type in &#8220;py&#8221; then &#8220;-m&#8221; then &#8220;pip&#8221; and its commands. the &#8220;-m&#8221; allows you to run library commands as a script. If it&#8217;s been a while since you updated pip, now&#8217;s a good time to update it in the command line to show how to call pip:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>py -m pip install --upgrade pip<\/code><\/pre>\n\n\n\n<p>Now let&#8217;s install the core packages for Python:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>py -m pip install pandas\npy -m pip install matplotlib\npy -m pip install numpy\npy -m pip install scipy\npy -m pip install sklearn<\/code><\/pre>\n\n\n\n<p>You&#8217;ll see a screen like this, and it&#8217;ll let<\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:85% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"898\" height=\"639\" src=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/pip-pandas.png\" alt=\"\" class=\"wp-image-508 size-full\" srcset=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/pip-pandas.png 898w, https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/pip-pandas-300x213.png 300w, https:\/\/blog.uvm.edu\/tbplante\/files\/2020\/07\/pip-pandas-768x546.png 768w\" sizes=\"auto, (max-width: 898px) 100vw, 898px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<p>You only need to do this installation step once. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How do I use Pandas, Matplotlib, NumPy, Scikit-learn (sklearn), and SciPy in Stata?<\/h2>\n\n\n\n<p>Once the libraries are installed, you can then integrate them into your scripts. Each time you want to use them, you need to import them so you can call them. The convention is to import these using common so you don&#8217;t have to type &#8220;pandas&#8221; over and over again, you can just use &#8220;pd&#8221;. Ditto for other libraries:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport scipy as sp\nimport sklearn as sk\nend<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install part 3: How do I install Jupyter Lab and get it to work with Stata? (This is the updated version of Jupyter Notebook)<\/h2>\n\n\n\n<p><em>Note: <\/em> <em>Jupyter lab comes installed with Anaconda, but node.js, npm, and stata_kernel still must be installed.<\/em><\/p>\n\n\n\n<p>Jupyter is a super popular way to cleanly complete analyses. Its origins were in Python, but it now works in R and Stata. Details on installing Jupyter are <a rel=\"noreferrer noopener\" href=\"https:\/\/jupyter.org\/install\" target=\"_blank\">here<\/a>. Specific instructions for getting it to interface with Stata are <a rel=\"noreferrer noopener\" href=\"https:\/\/kylebarron.dev\/stata_kernel\/\" target=\"_blank\">here<\/a>. Here&#8217;s how I got it installed:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">First: install node.js (warning: this takes a long time and requires a reboot)<\/h3>\n\n\n\n<p><strong><em>Make sure that you have the current version of Python installed! <\/em><\/strong>Node.js will install the current version and if your version is outdated, it&#8217;ll create a huge headache. <\/p>\n\n\n\n<p>First, install node.js. Download <a rel=\"noreferrer noopener\" href=\"https:\/\/nodejs.org\/en\/#home-downloadhead\" target=\"_blank\">here<\/a>. I checked the box in the node.js install to also install additional software. At the end of the install, it pops open Windows powershell window and installed a bunch of stuff, including Python if you do not have the current version. It also installs Chocolatey and a few other things. <strong><em>NOW STOP HERE AND REBOOT YOUR COMPUTER.<\/em><\/strong> Come back when it restarts. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Next: install other npm, jupyterlab, and Stata plugins (warning: this also takes a while)<\/h3>\n\n\n\n<p>First, it&#8217;s always good habit to make sure you have the newest version of pip!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>py -m pip install --upgrade pip<\/code><\/pre>\n\n\n\n<p>Then, type the following in the Windows command line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>py -m pip install npm\npy -m pip install jupyterlab\npy -m pip install stata_kernel\npy -m stata_kernel.install\njupyter labextension install jupyterlab-stata-highlight<\/code><\/pre>\n\n\n\n<p>When later trying to run jupyter lab, I got an error saying &#8220;Exception: Jupyter command <code>jupyter-lab<\/code> not found.&#8221; I updated pip then uninstalled and reinstalled npm, jupyterlab, and stata_kernel (just replace the word &#8220;install&#8221; with &#8220;uninstall&#8221; above) then installed everything again. This fixed things. <\/p>\n\n\n\n<p>Finally, <strong><em>you need to do a last step described under &#8220;windows specific steps&#8221; <a rel=\"noreferrer noopener\" href=\"https:\/\/kylebarron.dev\/stata_kernel\/getting_started\/#prerequisites\" data-type=\"URL\" data-id=\"https:\/\/kylebarron.dev\/stata_kernel\/getting_started\/#prerequisites\" target=\"_blank\">here<\/a> <\/em><\/strong>to get this to work in Windows. I found my Stata executable at &#8220;C:\\<strong>Program Files<\/strong>\\Stata16\\StataSE-64.exe&#8221;, not Program Files (x86). You can delete the new Stata desktop shortcut once you run it as an administrator one time. <\/p>\n\n\n\n<p>You might also need to configure Jupyter to work with your Stata install. Details are <a rel=\"noreferrer noopener\" href=\"https:\/\/kylebarron.dev\/stata_kernel\/using_stata_kernel\/intro\/\" target=\"_blank\">here<\/a>. I found the configuration file named .stata_kernel.conf sitting in this folder: C:\\Users\\MYUSERNAME\\.stata_kernel.conf<\/p>\n\n\n\n<p>In reviewing the configuration file, it seems to have correctly identified my Stata SE 16 setup. I changed the graph format from svg to png, but left the rest unchanged. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Now that I have Jupyter Lab installed, how do I open and use it?<\/h2>\n\n\n\n<p>In Anaconda Navigator, just click the &#8220;Jupyter lab&#8221; button. For a traditional Python install, open the Windows command line, type:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>jupyter lab<\/code><\/pre>\n\n\n\n<p>It should open up your web browser to a Jupyter page. <strong><em>Keep the Windows Command line terminal open in the background<\/em><\/strong>. If you close it, Jupyter will cease to work. (Note: This isn&#8217;t true for anaconda if you open Jupyter from the GUI.) Click the &#8220;Stata&#8221; notebook button to start.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2021\/03\/image-4.png\" alt=\"\" class=\"wp-image-706\" width=\"365\" height=\"326\" srcset=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2021\/03\/image-4.png 613w, https:\/\/blog.uvm.edu\/tbplante\/files\/2021\/03\/image-4-300x268.png 300w\" sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/><\/figure>\n\n\n\n<p>It&#8217;ll open up a scripting page for your code. At the bottom it should say &#8220;stata idle&#8221;. That&#8217;s how you know you set it up correctly. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"169\" height=\"89\" src=\"https:\/\/blog.uvm.edu\/tbplante\/files\/2021\/03\/image-5.png\" alt=\"\" class=\"wp-image-707\" \/><\/figure>\n\n\n\n<p>Now you can use traditional Stata code!<\/p>\n\n\n\n<p>There are additional programs called &#8220;Magics&#8221; detailed <a rel=\"noreferrer noopener\" href=\"https:\/\/kylebarron.dev\/stata_kernel\/using_stata_kernel\/magics\/\" target=\"_blank\">here<\/a> that help Stata integrate more seamlessly with Jupyter. Each of these commands begins with a % symbol. There are specific ways to modify these commands.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>%browse &#8211; lists the first 200 rows<\/li><li>%head &#8211; first 10 rows<\/li><li>%tail &#8211; last 10 rows<\/li><li>%set &#8211; can change the graph_format, graph_scale, graph_width, and graph_height<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How do I use SFI to interface Stata and Python?<\/h2>\n\n\n\n<p>Stata and Python talk to each other using the <a href=\"https:\/\/www.stata.com\/python\/api16\/\">Stata function interface<\/a>, or SFI. MORE TO COME ON THIS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: this post was written prior to Stata 17, which now allows Python to control Stata and vice versa. In Stata 16, Python could not control Stata but Stata could control Python. Because of this functionality, there&#8217;s a more streamlined approach to getting Jupyter to play nicely with Stata 17, detailed here. You&#8217;ll still need &hellip; <a href=\"https:\/\/blog.uvm.edu\/tbplante\/2020\/07\/22\/getting-python-to-work-with-stata-in-windows\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Getting Python and Jupyter to work with Stata in Windows<\/span><\/a><\/p>\n","protected":false},"author":4473,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[477491],"tags":[],"class_list":["post-467","post","type-post","status-publish","format-standard","hentry","category-stata-code"],"_links":{"self":[{"href":"https:\/\/blog.uvm.edu\/tbplante\/wp-json\/wp\/v2\/posts\/467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.uvm.edu\/tbplante\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.uvm.edu\/tbplante\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.uvm.edu\/tbplante\/wp-json\/wp\/v2\/users\/4473"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.uvm.edu\/tbplante\/wp-json\/wp\/v2\/comments?post=467"}],"version-history":[{"count":55,"href":"https:\/\/blog.uvm.edu\/tbplante\/wp-json\/wp\/v2\/posts\/467\/revisions"}],"predecessor-version":[{"id":826,"href":"https:\/\/blog.uvm.edu\/tbplante\/wp-json\/wp\/v2\/posts\/467\/revisions\/826"}],"wp:attachment":[{"href":"https:\/\/blog.uvm.edu\/tbplante\/wp-json\/wp\/v2\/media?parent=467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.uvm.edu\/tbplante\/wp-json\/wp\/v2\/categories?post=467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.uvm.edu\/tbplante\/wp-json\/wp\/v2\/tags?post=467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}