<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>User Interface &#8211; Aptech</title>
	<atom:link href="https://www.aptech.com/blog/category/user-interface/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.aptech.com</link>
	<description>GAUSS Software - Fastest Platform for Data Analytics</description>
	<lastBuildDate>Thu, 16 Jan 2025 00:28:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Installing the GAUSS Package Manager [Video]</title>
		<link>https://www.aptech.com/blog/installing-gauss-package-manager/</link>
					<comments>https://www.aptech.com/blog/installing-gauss-package-manager/#respond</comments>
		
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Tue, 31 May 2022 14:54:43 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[User Interface]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=11582519</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<iframe width="560" height="315" src="https://www.youtube.com/embed/sXrFAVCtFyc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<p>GAUSS packages provide access to powerful tools for performing data analysis.  Learn how to install the <a href="https://www.aptech.com/blog/gauss-package-manager-basics/">GAUSS Package Manager</a>, and get the quickest access to the full suite of GAUSS packages, in this short video. </p>
<h3 id="additional-resources">Additional Resources</h3>
<ul>
<li><a href="https://www.aptech.com/blog/gauss-package-manager-basics/">GAUSS Package Manager</a></li>
<li><a href="https://www.aptech.com/blog/using-gauss-packages-complete-guide/">Using GAUSS Packages a Complete Guide</a></li>
</ul>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/installing-gauss-package-manager/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Getting to Know Your Data With GAUSS 22</title>
		<link>https://www.aptech.com/blog/getting-to-know-your-data-with-gauss-22/</link>
					<comments>https://www.aptech.com/blog/getting-to-know-your-data-with-gauss-22/#respond</comments>
		
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Thu, 02 Dec 2021 17:52:06 +0000</pubDate>
				<category><![CDATA[Econometrics]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[User Interface]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=11582000</guid>

					<description><![CDATA[There is no getting around the fact that data wrangling, cleaning, and exploring plays an important role in any empirical research. Data management can be time-consuming, error-prone, and can make or break results.  

GAUSS 22 is built to take the pain out of dealing with your data and to let you move seamlessly towards tackling your important research questions.

In today’s blog, we walk through how to efficiently prepare and explore real-world data before modeling or estimation. We'll look at:

<ul>
<li>  Loading and merging data. </li> 
<li> Cleaning data to eliminate misentries, missing values, and more.</li> 
<li> Exploring data. </li> 
</ul>]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>There is no getting around the fact that data wrangling, cleaning, and exploring plays an important role in any empirical research. Data management can be time-consuming, error-prone, and can make or break results.  </p>
<p>GAUSS 22 is built to take the pain out of dealing with your data and to let you move seamlessly towards tackling your important research questions.</p>
<p>In today’s blog, we walk through how to efficiently prepare and explore real-world data before modeling or estimation. We'll look at:</p>
<ul>
<li>Loading data. </li>
<li>Cleaning data to eliminate misentries, missing values, and more.</li>
<li>Exploring data. </li>
</ul>
<p>Throughout the blog, we will use Kick Starter 2018 data available on <a href="https://www.kaggle.com/kemical/kickstarter-projects?select=ks-projects-201801.csv">Kaggle</a>. </p>
<h2 id="loading-data">Loading Data</h2>
<p>Let's get started by opening up our data in the <strong>Data Import</strong> window. This can be done two ways:</p>
<ul>
<li>Selecting <strong>File &gt; Import Data</strong> from the main GAUSS menu.</li>
<li>Double-clicking the filename in the <strong>Project Folders</strong> window.</li>
</ul>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/11/opening-data-editor-1.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/11/opening-data-editor-1.jpg" alt="" width="764" height="488" class="alignnone size-full wp-image-11582141" /></a></p>
<p>The data preview shows us exactly how our data will be loaded and is useful for identifying data issues before we even load our data. </p>
<p>We can tell from the data preview if:</p>
<ul>
<li>Our data has any additional headers that shouldn't be loaded. </li>
<li>There are unintended symbols or unacceptable characters. </li>
<li>Observations are missing. </li>
<li>Data is loading as the type we intend. </li>
</ul>
<p>For example, in the data preview of our Kickstarter data, we can see that GAUSS is detecting that the variable <code>Category</code> is a string. In the next section, we'll look at how to change this to a <a href="https://www.aptech.com/blog/easy-management-of-categorical-variables/">categorical variable</a>. </p>
<h3 id="managing-data-in-the-data-import-window">Managing Data in the Data Import Window</h3>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/12/data-cleaning2-gif.gif"><img src="https://www.aptech.com/wp-content/uploads/2021/12/data-cleaning2-gif.gif" alt="" width="765" height="496" class="alignnone size-full wp-image-11582167" /></a></p>
<p>Let's look at how to complete preliminary data cleaning using the <strong>Import Window</strong>. Specifically, we will:</p>
<ol>
<li>Change the dataframe name for more convenient referencing.
<ul>
<li>For the Kickstarter data, the default symbol name is <code>ks_projects_201801</code>.</li>
<li>Let's change this to a simpler name,  <code>ks_projects</code>, using the <strong>Symbol Name</strong> textbox.
<div class="alert alert-info" role="alert">When importing data with the <strong>Data Import</strong> tool, GAUSS uses the filename, minus the extension, as the default symbol name. </div></li>
</ul></li>
<li>Change the <code>Category</code> variable type from <strong>String</strong> to <strong>Category</strong>.
<ul>
<li>Variable types are changed using the <strong>Type</strong> drop-down menu in the <strong>Variables</strong> list. </li>
<li>If necessary, we can change the categorical mappings using the <a href="https://docs.aptech.com/gauss/data-management/data-cleaning.html?highlight=category#changing-categorical-mappings"><strong>Modify Column Mapping</strong></a> dialog.</li>
</ul></li>
<li>Remove unneeded variables from the import list to avoid workspace clutter. 
<ul>
<li>Raw datasets often contain excess variables that we don't need.</li>
<li>Our Kickstarter data contains the fundraising pledges in local currency <em>and</em> in real USD. </li>
<li>We can deselect the variable <code>pledged</code>, along with <code>currency</code> from <strong>Variables</strong>.</li>
</ul></li>
<li>Filter the data to build the appropriate model. 
<ul>
<li>Datasets often also contain excess observations that we don't want to include in our model.</li>
<li>The <strong>Filter</strong> tab is a quick and easy way to remove observations.</li>
<li>Let's filter our data to remove all observations with launch dates earlier than &quot;2015&quot;.</li>
</ul></li>
</ol>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/12/filtering-gif2.gif"><img src="https://www.aptech.com/wp-content/uploads/2021/12/filtering-gif2.gif" alt="" width="765" height="468" class="alignnone size-full wp-image-11582174" /></a></p>
<p>After performing our preliminary data cleaning steps, we click <strong>Import</strong> to load our data.</p>
<h2 id="reusable-auto-generated-code">Reusable Auto-generated Code</h2>
<p>One of the most powerful features of the <strong>Data Import</strong> tool is that it auto-generates the code for all of our steps performed using the <strong>Data Import</strong> tool.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">/*
** Perform import
*/
ks_projects = loadd("C:/research/data/ks-projects-201801.csv", "ID + str(name) + cat(category) + cat(main_category) + date($deadline) + date($launched) + pledged + cat(state) + backers + cat(country) + usd pledged + usd_pledged_real + usd_goal_real");

/*
** Filter the data
*/
ks_projects = selif(ks_projects, ks_projects[., "launched"] .&gt;= "2015");
</code></pre>
<p>The autogenerated code is printed to the <strong>Command</strong> window after import and is listed in the <strong>Command History</strong>. It can be copied and pasted for later use.</p>
<h2 id="cleaning-up-our-data">Cleaning Up Our Data</h2>
<p>Now that we have loaded our data, let's get a better feel for our data. We'll do a few quick checks for common data problems such as:</p>
<ul>
<li>Duplicate observations. </li>
<li>Missing values. </li>
<li>Data misentries. </li>
</ul>
<h3 id="viewing-the-data">Viewing the Data</h3>
<p>Let's open our <code>ks_projects</code> data in the <strong>Symbol Editor</strong> to confirm that it loaded correctly. </p>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/11/ks-projects-data-editor2.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/11/ks-projects-data-editor2.jpg" alt="" width="761" height="442" class="alignnone size-full wp-image-11582147" /></a></p>
<div class="alert alert-info" role="alert">I like to use the <strong>Symbol Editor</strong> to view my data during the data cleaning stage because:<br><ul><li>It's easily accessible. I can open my data in the <strong>Symbol Editor</strong> by using hotkeys or by <a href="https://docs.aptech.com/gauss/data-management/data-cleaning.html#open-the-data-management-page">selecting my data from the <strong>Symbols</strong> list</a>.</li><li>I can access a full set of data cleaning tools for everything from changing variable names to changing categorical labels.</li></ul> </div>
<h3 id="checking-for-duplicate-data">Checking for Duplicate Data</h3>
<p>After loading my data, one of the first steps I take is to check for duplicate data. Duplicate data can distort results and should be eliminated before modeling. </p>
<p>GAUSS includes three functions, introduced in <a href="https://www.aptech.com/blog/gauss22/">GAUSS 22</a>, to address duplicate data: </p>
<table style="width: 100%">
  <colgroup>
       <col span="1" style="width: 20%;">
       <col span="1" style="width: 40%;">
       <col span="1" style="width: 40%;">
    </colgroup>
<tr>
<th><b>Procedure</b></th><th>Description</th><th>Example</th>
</tr>
<tr>
<td><a href="https://docs.aptech.com/gauss/isunique.html"><code>isunique</code></a></td><td>Checks if a dataframe or matrix contains unique observations with the option to specify which variables to examine.</td><td><code>
isunique(mydata, "time"$|"country")</code> </td>
</tr>
<tr>
<td><a href="https://docs.aptech.com/gauss/getduplicates.html"><code>getduplicates</code></a></td><td>Generates a report of duplicate observations found in the specified variables.</td><td><code>
getDuplicates(mydata, "time"$|"country")</code> ​</td>
</tr>
<tr>
<td><a href="https://docs.aptech.com/gauss/dropduplicates.html"><code>dropduplicates</code></a></td><td>Drops identified duplicates for the specified variables.</td><td><code>
dropDuplicates(mydata, "time"$|"country")</code> ​</td>
</tr>
</table>
<p>As a preliminary check, let's see if our data has any duplicate <code>ID</code> observations:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Check for unique ID numbers
isunique(ks_projects, "ID");</code></pre>
<p>The <code>isunique</code> procedure returns <code>1.0000000</code> which tells us that our data is unique. </p>
<hr>
<div style="text-align:center">Interested in seeing how GAUSS 22 can help you? <a href="https://www.aptech.com/request-demo/">Start your free trial!</a></div>
<hr>
<h3 id="checking-for-misentries-and-typos">Checking for Misentries and Typos</h3>
<p>Categorical and string data present the opportunity for errors in spellings, abbreviations, and more. It can sometimes be difficult to locate those errors in data. </p>
<p>The <a href="https://docs.aptech.com/gauss/frequecy.html"><code>frequency</code></a> procedure is a great way to check the quality of categorical variables. </p>
<p>Let's look at the frequency report for the <code>country</code> variable</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Check frequencies of countries
frequency(ks_projects, "country");</code></pre>
<pre>Label      Count   Total %    Cum. %
   AT        597    0.3196    0.3196
   AU       5385     2.883     3.202
   BE        617    0.3303     3.533
   CA       9679     5.181     8.714
   CH        760    0.4068     9.121
   DE       4171     2.233     11.35
   DK        996    0.5332     11.89
   ES       2276     1.218      13.1
   FR       2939     1.573     14.68
   GB      19889     10.65     25.32
   HK        618    0.3308     25.66
   IE        736     0.394     26.05
   IT       2878     1.541     27.59
   JP         40   0.02141     27.61
   LU         62   0.03319     27.64
   MX       1752    0.9379     28.58
 N,0&quot;       3028     1.621      30.2
   NL       2081     1.114     31.32
   NO        633    0.3389     31.66
   NZ        994    0.5321     32.19
   SE       1589    0.8506     33.04
   SG        555    0.2971     33.34
   US     124533     66.66       100
Total     186808       100       </pre>
<p>In this list, we see one odd category, <code>N,0"</code>. However, given the frequency of this category, it's unlikely that this is a misentry and we probably don't want to remove this label. </p>
<p>It is reasonable though, that we remove the non-standard characters <code>,</code> and <code>"</code> from the label:  </p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Replace the N,0" with N_0 
ks_projects[., "country"] = strreplace(ks_projects[., "country"], "N,0\"", "N_0");</code></pre>
<p>Now if we check our frequencies, we see our updated <code>country</code> label:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Recheck frequencies of countries
frequency(ks_projects, "country");</code></pre>
<pre>Label      Count   Total %    Cum. %
   AT        597    0.3196    0.3196
   AU       5385     2.883     3.202
   BE        617    0.3303     3.533
   CA       9679     5.181     8.714
   CH        760    0.4068     9.121
   DE       4171     2.233     11.35
   DK        996    0.5332     11.89
   ES       2276     1.218      13.1
   FR       2939     1.573     14.68
   GB      19889     10.65     25.32
   HK        618    0.3308     25.66
   IE        736     0.394     26.05
   IT       2878     1.541     27.59
   JP         40   0.02141     27.61
   LU         62   0.03319     27.64
   MX       1752    0.9379     28.58
  N_0       3028     1.621      30.2
   NL       2081     1.114     31.32
   NO        633    0.3389     31.66
   NZ        994    0.5321     32.19
   SE       1589    0.8506     33.04
   SG        555    0.2971     33.34
   US     124533     66.66       100
Total     186808       100     </pre>
<h3 id="generating-new-variables">Generating New Variables</h3>
<p>GAUSS <a href="https://www.aptech.com/blog/what-is-a-gauss-dataframe-and-why-should-you-care/">dataframes</a> make it easy to create new variables using existing variables, even with strings, categorical data, or dates.</p>
<p>Let's suppose we are interested in the impact that the amount of time between the campaign launch and deadline has on pledges. The raw data doesn't include any variable that measures the amount of time between launch and deadline. </p>
<p>Fortunately, GAUSS <a href="https://www.aptech.com/blog/dates-and-times-made-easy/">date handling</a> and variable name referencing make it easy to create our variable. </p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Create variable that measures total days between
// campaign launch and deadline
total_days = timeDiffPosix(ks_projects[., "deadline"], 
                           ks_projects[., "launched"], "days");</code></pre>
<div class="alert alert-info" role="alert">I've used the <a href=https://docs.aptech.com/gauss/timediffposix.html><code>timeDiffPosix</code></a> procedure. This procedure calculates the difference between two dates and allows you to specify what units you want that difference in.</div>
<p>One important thing to note is that our new variable <code>total_days</code> is a standard GAUSS matrix, not a dataframe. We can use the <a href="https://docs.aptech.com/gauss/asdf.html"><code>asDF</code></a> procedure to convert <code>total_days</code> to a GAUSS dataframe and add a variable name. </p>
<p>Let's do this and concatenate the new variable to our original data:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Convert `total_days` to a dataframe
// and concatenate with original data
ks_projects = ks_projects ~ asDF(total_days, "Total Time");</code></pre>
<p>When we open <code>ks_projects</code> in the <strong>Symbol Editor</strong>, we now see our new variable, <code>Total Time</code>, and its type listed in the variable list. </p>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/12/total-time-var.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/12/total-time-var.jpg" alt="" width="690" height="386" class="alignnone size-full wp-image-11582169" /></a></p>
<h2 id="getting-to-know-our-data">Getting to Know Our Data</h2>
<p>Now that we've performed some preliminary <a href="https://docs.aptech.com/gauss/data-management/data-cleaning.html">data cleaning steps</a>, it's time to get to know our data better with some simple data exploration. </p>
<h3 id="summary-statistics">Summary Statistics</h3>
<p>Quick summary statistics give us insight into our data and can be helpful for finding outliers and other data abnormalities. </p>
<p>The <a href="https://docs.aptech.com/gauss/dstatmt.html"><code>dstatmt</code></a> procedure allows us to compute descriptive statistics in a single line. It computes the following statistics:</p>
<ul>
<li>Mean</li>
<li>Standard deviation</li>
<li>Variance</li>
<li>Minimum</li>
<li>Maximum</li>
<li>Valid cases</li>
<li>Missing cases</li>
</ul>
<p>There are a few things to note about the <code>dstatmt</code> procedure:</p>
<ul>
<li>Only the valid and missing observations are computed for string variables. </li>
<li><em>Mean</em>, <em>Std Dev</em>, and <em>Variance</em> are not computed for categorical variables. However, the minimum and maximum observations are computed based on the underlying key values. </li>
</ul>
<div class="alert alert-info" role="alert">One useful thing to note is that the minimum category will always be the <a href="https://docs.aptech.com/gauss/data-management/data-cleaning.html?highlight=base%20case#changing-categorical-mappings">base case</a> whenever a categorical variable is used in estimation. </div>
<p>Let's look at the summary statistics for our <code>ks_projects</code> data:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Compute summary statistics
call dstatmt(ks_projects);</code></pre>
<pre>-------------------------------------------------------------------------------------------------
Variable                 Mean     Std Dev      Variance     Minimum     Maximum     Valid Missing
-------------------------------------------------------------------------------------------------
ID                  1.075e+09   6.189e+08     3.831e+17   1.852e+04   2.147e+09    186808    0
name                    -----       -----         -----       -----       -----    186807    1
category                -----       -----         -----       -----       -----    186808    0
main_category           -----       -----         -----         Art     Theater    186808    0
deadline                -----       -----         -----  2015-01-05  2018-03-03    186808    0
launched                -----       -----         -----  2015-01-01  2018-01-02    186808    0
pledged             1.192e+04   1.167e+05     1.361e+10           0   2.034e+07    186808    0
state                   -----       -----         -----    canceled   undefined    186808    0
backers                 114.1        1029      1.06e+06           0   2.194e+05    186808    0
country                 -----       -----         -----          AT          US    186808    0
usd pledged              6423   8.693e+04     7.557e+09           0   2.034e+07    183780 3028
usd_pledged_real    1.054e+04   1.084e+05     1.176e+10           0   2.034e+07    186808    0
usd_goal_real       6.052e+04   1.429e+06     2.041e+12        0.49   1.514e+08    186808    0
Total Time              32.71       11.61         134.7    0.005058       89.57    186808    0</pre>
<p>One of the first things that stands out from these descriptive statistics is that there are a lot of missing observations of <code>usd_pledged</code>. </p>
<p>One solution for this, is to use <code>usd_pledged_real</code> and drop the <code>usd_pledged_variable</code> using the <a href="https://docs.aptech.com/gauss/delcols.html"><code>delcols</code></a> procedure:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Eliminate usd_pledged column 
// because of excess missing values
ks_projects = delcols(ks_projects, "usd pledged");</code></pre>
<h3 id="statistics-by-groups">Statistics by Groups</h3>
<p>Now, let's see how the mean of the variable <code>usd_pledged_real</code> varies across the variable <code>main_category</code> using the <a href="https://docs.aptech.com/gauss/aggregate.html"><code>aggregate</code></a> procedure. </p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Find mean of `usd_pledged_real` across `main_category`
aggregate(ks_projects[., "main_category" "usd_pledged_real"], "mean");</code></pre>
<pre>   main_category usd_pledged_real
             Art        3472.4776
          Comics        6507.6264
          Crafts        1692.6939
           Dance        3344.5054
          Design        27245.928
         Fashion        5906.9240
    Film &amp; Video        6065.4645
            Food        4736.2799
           Games        21032.577
      Journalism        2403.8985
           Music        3767.5486
     Photography        4571.2224
      Publishing        3792.7673
      Technology        20029.666
         Theater        3886.6224 </pre>
<p>This is useful and we can see that there are clear differences in the mean amount pledged across project categories. However, it may be easier to see these differences if we sort our results using <a href="https://docs.aptech.com/gauss/sortcsortcc.html"><code>sortc</code></a>:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Sort aggregated data based on its second column, 
sortc(aggregate(ks_projects[., "main_category" "usd_pledged_real"], "mean"), 2);</code></pre>
<pre>   main_category usd_pledged_real
          Crafts        1692.6939
      Journalism        2403.8985
           Dance        3344.5054
             Art        3472.4776
           Music        3767.5486
      Publishing        3792.7673
         Theater        3886.6224
     Photography        4571.2224
            Food        4736.2799
         Fashion        5906.9240
    Film &amp; Video        6065.4645
          Comics        6507.6264
      Technology        20029.666
           Games        21032.577
          Design        27245.928 </pre>
<p>Now we can clearly see that the mean pledged amount is the lowest for <em>Craft</em> projects and is the largest for <em>Design</em> projects. </p>
<div class="alert alert-info" role="alert">For more information on how to use aggregate see our blog, <a href="https://www.aptech.com/blog/how-to-aggregate-panel-data-in-gauss/"> How to Aggregate Panel Data in GAUSS</a>.</div>
<h3 id="exploring-our-data-with-visualizations">Exploring our Data with Visualizations</h3>
<p>Data visualizations are one of the most powerful tools for preliminary data exploration. They can help us:</p>
<ul>
<li>Identify outliers and abnormalities in data.</li>
<li>Find relationships between variables. </li>
<li>Identify time-series dynamics. </li>
</ul>
<p>All of these provide insights that can help guide modeling. </p>
<p>Unlike publication graphics, preliminary data visualizations for exploration don't need much custom formatting and annotation. Instead, it is more important that we can make quick and clear plots. </p>
<p>In GAUSS 22, plots were enhanced with intelligent graph attributes which make data visualization substantially easier and more useful, including:</p>
<ul>
<li>The ability to specify variables to plot by name with convenient <a href="https://www.aptech.com/resources/tutorials/formula-string-syntax/">formula strings</a>.</li>
<li>Automatic use of variable names and category labels. </li>
<li>Data splitting using the new <code>by</code> keyword. </li>
</ul>
<p>For example, let's see how the <code>usd_pledged_real</code> is related to the <code>Total Time</code> variable that we created using a scatter plot:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Create scatter plot of `usd_pledged_real` against `Total Time` 
plotScatter(ks_projects, "usd_pledged_real ~ Total Time");</code></pre>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/11/scatter-plot-usd-pledged.jpeg"><img src="https://www.aptech.com/wp-content/uploads/2021/11/scatter-plot-usd-pledged.jpeg" alt="" width="600" height="400" class="alignnone size-full wp-image-11582091" /></a></p>
<p>Our plot provides some quick data insights:</p>
<ul>
<li>The majority of campaigns are between 0-60 days in length. </li>
<li>There appear to be clusters of campaigns around approximately 30, 45, and 60 days in length. </li>
<li>There doesn't appear to be much of a correlation between campaign length and pledged dollars. </li>
<li>The majority of campaigns earned less than 3e+06 and there are a lot of campaigns that didn't receive any pledges. </li>
</ul>
<p>Based on the last observation, it might be useful to:</p>
<ol>
<li>Filter out the observations that received no pledges (we won't address the topic of truncated data here and I'm not suggesting that this is in general a good modeling step)</li>
</ol>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Filter out observations with no pledges
ks_projects = selif(ks_projects, (ks_projects[., "usd_pledged_real"] .!= 0));</code></pre>
<ol>
<li>Look at the percentiles <code>usd_pledged_real</code> using the <a href="https://docs.aptech.com/gauss/quantile.html"><code>quantile</code></a> procedure:</li>
</ol>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Create sequence of percentiles
e = seqa(0.1, .1, 10);

// Compute quantiles
quantile(ks_projects[., "usd_pledged_real"], e);</code></pre>
<pre> quantile    usd_pledged_real
      0.1           12.000000
      0.2           51.720000
      0.3           151.00000
      0.4           390.60800
      0.5           896.00000
      0.6           1868.1440
      0.7           3664.7240
      0.8           7442.5860
      0.9           18309.240 </pre>
<p>This is helpful, it tells us that 50% of <code>usd_pledged_real</code> observations fall below about $1,000, 80% fall below about $10,000 and 90% fall below about $19,000. </p>
<p>Given these observations let's look at histogram of the pledges that fall between the 10% and 50%: </p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Filter our data to look at
// data between 10% and 50% 
ks_projects = selif(ks_projects, 
                   (ks_projects[., "usd_pledged_real"] .&gt; 12 .and 
                    ks_projects[., "usd_pledged_real"] .&lt; 1000));

// Histogram of remaining data
plotHist(ks_projects[., "usd_pledged_real"], 100); </code></pre>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/11/use-pledged-real-histogram.jpeg"><img src="https://www.aptech.com/wp-content/uploads/2021/11/use-pledged-real-histogram.jpeg" alt="" width="600" height="400" class="alignnone size-full wp-image-11582093" /></a></p>
<h2 id="conclusion">Conclusion</h2>
<p>Data cleaning is tedious and time-consuming, but we've seen in this blog how the right tools and make it less painful. We've looked at how to efficiently prepare and explore real-world data before modeling or estimation including:</p>
<ul>
<li>Loading. </li>
<li>Cleaning data to eliminate misentries, missing values, and more.</li>
<li>Exploring data.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/getting-to-know-your-data-with-gauss-22/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Easy Management of Categorical Variables</title>
		<link>https://www.aptech.com/blog/easy-management-of-categorical-variables/</link>
					<comments>https://www.aptech.com/blog/easy-management-of-categorical-variables/#respond</comments>
		
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Fri, 19 Mar 2021 21:30:35 +0000</pubDate>
				<category><![CDATA[Econometrics]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[categorical data]]></category>
		<category><![CDATA[categorical variables]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=11581058</guid>

					<description><![CDATA[Categorical variables offer an important opportunity to capture qualitative effects in statistical modeling. Unfortunately, it can be tedious and cumbersome to manage categorical variables in statistical software. 

The new GAUSS category type, introduced in GAUSS 21, makes it easy and intuitive to work with categorical data. 

In today's blog we use real-life housing data to explore the numerous advantages of the GAUSS category type including:
<ul>
<li>Easy set up and viewing of categorical data.</li>
<li>Simple renaming of category labels.</li>
<li>Easy changing of the reference base case and reordering of categories.</li>
<li>Single-line frequency plots and tables.</li>
<li>Internal creation of dummy variables for regressions.</li>
<li>Proper labeling of categories in regression output.</li> 
</ul>
]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>Categorical variables offer an important opportunity to capture qualitative effects in statistical modeling. Unfortunately, it can be tedious and cumbersome to manage categorical variables in statistical software. </p>
<p>The new GAUSS category type, introduced in <a href="https://www.aptech.com/blog/easy-and-fast-data-management-in-gauss-21/">GAUSS 21</a>, makes it easy and intuitive to work with categorical data. </p>
<p>In today's blog we use real-life housing data to explore the numerous advantages of the GAUSS category type including:</p>
<ul>
<li>Easy set-up and viewing of categorical data.</li>
<li>Simple renaming of category labels.</li>
<li>Easy changing of the reference base case and reordering of categories.</li>
<li>Single-line frequency plots and tables. </li>
<li>Internal creation of dummy variables for regressions.</li>
<li>Proper labeling of categories in regression output. </li>
</ul>
<div style="text-align:center;background-color:#f0f2f4"><hr>Want to see these advantages for yourself? <a href="https://www.aptech.com/request-demo/">Contact us for a GAUSS 21 demo!<hr></a></div>
<h2 id="the-data">The data</h2>
<p>Throughout today's blog, we will be using the <a href="https://www.kaggle.com/dansbecker/melbourne-housing-snapshot/home">Melbourne Housing Snapshot</a> dataset. </p>
<p>The dataset contains the following variables:</p>
<table>
 <thead>
<tr><th>Variable</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td>Suburb</td><td>Number of the suburb.</td></tr>
<tr><td>Address</td><td>House address.</td></tr>
<tr><td>Rooms</td><td>Number of rooms.</td></tr>
<tr><td>Type</td><td>Type of house.</td></tr>
<tr><td>Price</td><td>Sale price.</td></tr>
<tr><td>Method</td><td>Method of sale.</td></tr>
<tr><td>SellerG</td><td>Real estate agent.</td></tr>
<tr><td>Date</td><td>Date sold.</td></tr>
<tr><td>Distance</td><td>Distance from CBD.</td></tr>
<tr><td>Postcode</td><td>Postal code.</td></tr>
<tr><td>Bedroom2</td><td>Number of bedrooms.</td></tr>
<tr><td>Bathrooms</td><td>Number of bathrooms.</td></tr>
<tr><td>Car</td><td>Number of carspots.</td></tr>
<tr><td>Landsize</td><td>Land size.</td></tr>
<tr><td>BuildingArea</td><td>Building size.</td></tr>
<tr><td>YearBuilt</td><td>Year the house was built.</td></tr>
<tr><td>CouncilArea</td><td>Governing council for the area.</td></tr>
<tr><td>Latitude</td><td>Location latitude.</td></tr>
<tr><td>Longitude</td><td>Location longitude.</td></tr>
<tr><td>Regionname</td><td>General region.</td></tr>
<tr><td>Propertycount</td><td>Number of properties that exist in the suburb.</td></tr>
</tbody>
</table>
<h2 id="loading-our-data">Loading our Data</h2>
<p>Let's start by loading our dataset using the GAUSS <strong>Data Import</strong> window: </p>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/03/data-import-melbourne-2.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/data-import-melbourne-2.jpg" alt="" width="1202" height="496" class="aligncenter size-full wp-image-11581138" /></a></p>
<p>When we open the dataset for loading we can see quickly from the color-coded columns what type GAUSS is assigning to our variables. For example:</p>
<ul>
<li><code>Type</code> and <code>Method</code> (highlighted orange) are categorical variables.</li>
<li><code>Suburb</code>, <code>Address</code>, and <code>SellerG</code> (highlighted yellow) are listed as string variables. </li>
<li><code>Rooms</code> and <code>Price</code> (highlighted blue) are numbers. </li>
</ul>
<div class="alert alert-info" role="alert">GAUSS uses an algorithm based on the number of repeated labels and the ratio of varying labels to total observations to detect categorical variables.</div>
<h3 id="changing-a-variable-to-a-category">Changing a Variable to a Category</h3>
<p>Suppose that we also want the variable <code>Suburb</code> to be loaded as a categorical variable. This can be easily done using the <strong>Variables</strong> tab. </p>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/03/suburb-change-type.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/suburb-change-type.jpg" alt="" width="327" height="427" class="aligncenter size-full wp-image-11581099" /></a></p>
<p>When we change the variable <code>Suburb</code> type to <strong>Category</strong>, the <b>Modify Column Mapping</b> window opens:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/03/modify-suburb-type.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/modify-suburb-type.jpg" alt="" width="327" height="427" class="aligncenter size-full wp-image-11581101" /></a></p>
<p>This window is very useful and gives us a number of insights. For example, from this window we can tell that:</p>
<ul>
<li>The category <em>Abbotsford</em> is the <a href="https://docs.aptech.com/gauss/data-management/interactive-import.html?highlight=categorical%20variables#specify-the-category-to-be-the-base-case">base case</a>.</li>
<li>All <a href="https://docs.aptech.com/gauss/data-management/interactive-import.html?highlight=categorical%20variables#change-the-category-mapping">labels and category mapping</a>.  </li>
<li>There are 314 different categories.</li>
</ul>
<p>If we want to explore the categories more we can use the <strong>Label Filter</strong>:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/03/filter-suburb-cats.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/filter-suburb-cats.jpg" alt="" width="327" height="427" class="aligncenter size-full wp-image-11581102" /></a></p>
<p>Once we are done changing the type to category, if we click <strong>OK</strong>, the preview for <code>Suburb</code> is changed to <strong>Category</strong> with orange highlighting:
<a href="https://www.aptech.com/wp-content/uploads/2021/03/suburb-category-now.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/suburb-category-now.jpg" alt="" width="1920" height="937" class="aligncenter size-full wp-image-11581104" /></a></p>
<h3 id="importing-our-data">Importing our Data</h3>
<p>Now that we've set <code>Suburb</code> to be a categorical variable, we're ready to load our data. Clicking <strong>Import</strong> loads our data and auto-generates the GAUSS code for all import steps. </p>
<h2 id="managing-the-properties-of-categorical-variables">Managing the Properties of Categorical Variables</h2>
<p>One of the advantages of using the category type is that the <a href="https://docs.aptech.com/gauss/data-management/data-cleaning.html#changing-categorical-mappings">category properties can be easily modified</a> using the <b>Data Management</b> pane.</p>
<h3 id="changing-category-labels-interactively">Changing Category Labels Interactively</h3>
<p>Suppose that after loading our data, we realize that our current labels for the <code>Type</code> variable are not very clear. Instead, we wish to rename the labels such that :</p>
<table>
 <thead>
<tr><th>Original label</th><th>New label</th></tr>
</thead>
<tbody>
<tr><td>h</td><td>House</td></tr>
<tr><td>t</td><td>Townhouse</td></tr>
<tr><td>u</td><td>Duplex unit</td></tr>
</tbody>
</table>
<p>Once we <a href="https://www.aptech.com/resources/tutorials/introduction-to-gauss-viewing-data-in-gauss/">open the dataframe</a> in the data editor, this is easy to do. We simply:</p>
<ol>
<li> Select the <b>Manage</b> button to open the <b>Data Management</b> pane: 

<a href="https://www.aptech.com/wp-content/uploads/2021/03/data-management-pane.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/data-management-pane.jpg" alt="" width="1920" height="362" class="aligncenter size-full wp-image-11581109"></a> </li>

<li> Click the drop-down button to the right of the variable name and select <b>Properties</b> to open the <b>Modify Column Mapping</b> dialog. 

<a href="https://www.aptech.com/wp-content/uploads/2021/03/variable-properities.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/variable-properities.jpg" alt="" width="354" height="145" class="aligncenter size-full wp-image-11581110"></a> </li>

<li> Enter the new label in the <b>Renamed Label</b> textbox next to the category label we want to change.
<a href="https://www.aptech.com/wp-content/uploads/2021/03/rename-label.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/rename-label.jpg" alt="" width="322" height="353" class="aligncenter size-full wp-image-11581111"></a></li>
</ol>
<p>Let's use the same process to also change the category labels on for the <code>Method</code> variable:
<a href="https://www.aptech.com/wp-content/uploads/2021/03/modify-method-type.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/modify-method-type.jpg" alt="" width="315" height="392" class="aligncenter size-full wp-image-11581112" /></a></p>
<p>Once we've done this, the variable names <code>Type</code> and <code>Method</code> are highlighted in red. This indicates that we have unsaved changes.</p>
<p>When we click <strong>Apply</strong> the changes are saved and the commands GAUSS uses to change the category labels are generated in the <strong>Program Input/Output</strong> window.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">melb_data = setcollabels(move(melb_data), "House"$|"Townhouse"$|"Duplex unit", 0|1|2, "Type");
melb_data = setcollabels(move(melb_data), "Passed in"$|"Sold"$|"Sold after auction"$|"Sold prior auction"$|"Vendor bid", 0|1|2|3|4, "Method");</code></pre>
<h3 id="changing-the-base-case">Changing the Base Case</h3>
<p>When working with categorical variables, it is useful to know that GAUSS always treats the variable with the key value &quot;0&quot; as the base case. For example, we saw earlier that the base case for the <code>Suburb</code> variable was <em>Abbotsford</em>.</p>
<p>If you want to change the assigned base case (or otherwise reorder the categories), this can quickly be done using the <b>Modify Column Mapping</b> dialog. </p>
<p>For example, suppose we want to replicate a study that uses the category <em>Chelsea</em> as the base case. To do this we:</p>
<ol>
<li> Locate and select the category <em>Chelsea</em> using the <b>Label Filter</b></li>
<li> Use the <b>Double Arrow</b> button to move <em>Chelsea</em> to the top of the list.
<a href="https://www.aptech.com/wp-content/uploads/2021/03/change-base-case.jpg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/change-base-case.jpg" alt="" width="321" height="341" class="aligncenter size-full wp-image-11581116"></a></li>
<li> <b>Apply</b> our changes. </li>
</ol>
<div class="alert alert-info" role="alert">More detailed information on how to manage categorical variables, both interactively and programmatically, can be found in our <a href="https://docs.aptech.com/gauss/data-management.html">Data Management Guide.</a>  </div>
<h2 id="exploring-our-categorical-variables">Exploring our Categorical Variables</h2>
<p>To dive deeper into our categorical variables we can use the <a href="https://docs.aptech.com/gauss/dstatmt.html">dstatmt</a>, <a href="https://docs.aptech.com/gauss/frequency.html">frequency</a>, and <a href="https://docs.aptech.com/gauss/plotfreq.html">plotFreq</a> procedures.</p>
<h3 id="general-summary-statistics">General Summary Statistics</h3>
<p>First, let's get a general overview of our data, including the categorical variables, using the <code>dstatmt</code> function:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Print descriptive statistics for all variables in 'melb_data'
call dstatmt(melb_data);</code></pre>
<p>This prints a table of descriptive statistics to the <strong>Program Input/Output</strong> window:</p>
<pre>----------------------------------------------------------------------------------------------
Variable              Mean     Std Dev      Variance     Minimum     Maximum     Valid Missing
----------------------------------------------------------------------------------------------

Suburb               -----       -----         -----     Chelsea  Yarraville     13580    0
Address              -----       -----         -----       -----       -----     13580    0
Rooms                2.938      0.9557        0.9135           1          10     13580    0
Type                 -----       -----         -----       House  Duplex uni     13580    0
Price            1.076e+06      639311     4.087e+11     8.5e+04       9e+06     13580    0
Method               -----       -----         -----   Passed in  Vendor bid     13580    0
SellerG              -----       -----         -----       -----       -----     13580    0
Date                 -----       -----         -----  28/01/2016  23/09/2017     13580    0
Distance             10.14       5.869         34.44           0        48.1     13580    0
Postcode              3105       90.68          8222        3000        3977     13580    0
Bedroom2             2.915      0.9659         0.933           0          20     13580    0
Bathroom             1.534      0.6917        0.4785           0           8     13580    0
Car                   1.61      0.9626        0.9267           0          10     13518   62
Landsize             558.4        3991     1.593e+07           0    4.33e+05     13580    0
BuildingArea           152         541        292697           0   4.452e+04      7130 6450
YearBuilt             1965       37.27          1389        1196        2018      8205 5375
CouncilArea          -----       -----         -----     Banyule  Yarra Rang     12211 1369
Latitude            -37.81     0.07926      0.006282      -38.18      -37.41     13580    0
Longitude              145      0.1039        0.0108       144.4       145.5     13580    0
Regionname           -----       -----         -----  Eastern Me  Western Vi     13580    0
Propertycount         7454        4379     1.917e+07         249   2.165e+04     13580    0 </pre>
<p>Though traditional summary statistics aren't valid for categorical data, the descriptive statistics still provide some insights:</p>
<ul>
<li>The minimum category is always the base case for the variable. </li>
<li>We can identify if there are any missing observations. </li>
</ul>
<h3 id="frequency-table-of-categories">Frequency Table of Categories</h3>
<p>The <code>frequency</code> procedure was introduced in GAUSS 21 specifically to provide frequency count tables. The procedure requires two inputs:</p>
<hr>
<dl>
<dt>x</dt>
<dd>Data matrix or data frame.</dd>
<dt>varlist</dt>
<dd>String, names or indices of variables to be counted. If names, should be entered as a formula string e.g <code>"rep78 + foreign"</code>.
<hr></dd>
</dl>
<p>To see frequency counts for both <code>Method</code> and <code>Type</code> in our dataframe <code>melb_data</code> we enter:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Print frequency tables for the 'Type' and 'Method' variables
// in the 'melb_data' dataframe
frequency(melb_data, "Type + Method");</code></pre>
<p>This prints the category names along with:</p>
<ul>
<li>Total counts.</li>
<li>Frequency percentages.</li>
<li>Cumulative percentages.</li>
</ul>
<pre>             Label      Count   Total %    Cum. %
             House       9449     69.58     69.58
         Townhouse       1114     8.203     77.78
       Duplex unit       3017     22.22       100
             Total      13580       100<br />

             Label      Count   Total %    Cum. %
         Passed in       1564     11.52     11.52
              Sold       9022     66.44     77.95
Sold after auction         92    0.6775     78.63
Sold prior auction       1703     12.54     91.17
        Vendor bid       1199     8.829       100
             Total      13580       100    </pre>
<h3 id="frequency-plot-of-categories">Frequency Plot of Categories</h3>
<p>The information provided with the <code>frequency</code> procedure can be quickly visualized using the <code>plotFreq</code> procedure. </p>
<p>For example, let's plot the frequencies for the <code>Method</code> variable:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">plotFreq(melb_data, "Method");</code></pre>
<p><a href="https://www.aptech.com/wp-content/uploads/2021/03/frequency-plot-2-scaled.jpeg"><img src="https://www.aptech.com/wp-content/uploads/2021/03/frequency-plot-2-scaled.jpeg" alt="" width="1280" height="960" class="aligncenter size-full wp-image-11581140" /></a></p>
<h2 id="estimation-with-categorical-variables">Estimation with Categorical Variables</h2>
<p>The final area we will explore today is the use of the GAUSS category type in estimation. Estimation of one of the areas that the GAUSS category type offers the greatest advantages. </p>
<p>GAUSS category variables can be used in estimation routines, such as <a href="https://docs.aptech.com/gauss/olsmt.html">olsmt</a> or <a href="https://docs.aptech.com/gauss/glm.html">glm</a> without taking any additional step. </p>
<p>When category variables are detected in estimation routines GAUSS will automatically:</p>
<ul>
<li>Create and use dummy variables during estimation. </li>
<li>Exclude the base case category.</li>
<li>Print output tables using specified category labels. </li>
</ul>
<div style="text-align:center;background-color:#37444d;padding-top:40px;padding-bottom:40px;"><span style="color:#FFFFFF">Using categorical data in your models?</span> <a href="https://www.aptech.com/request-demo/">See how the new category type works for you!</a></div>
<p> 
 </p>
<p>As an example, let's run a simple linear regression model estimating the role of <code>Method</code>, <code>Bedroom2</code>, and <code>Bath</code> on <code>Price</code>:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">call olsmt(melb_data, "price ~ method + bedroom2 + bath");</code></pre>
<pre>                                           Standard                 Prob   Standardized  Cor with
Variable                       Estimate      Error      t-value     &gt;|t|     Estimate    Dep Var
-------------------------------------------------------------------------------------------------

CONSTANT                        59797.1     20407.1     2.93022     0.003       ---         ---<br />
Method: Sold                    40895.7     14857.5     2.75252     0.006   0.0302079   0.0256233
Method: Sold after auction     -54790.4     57921.6    -0.94594     0.344 -0.00703034  -0.0064481
Method: Sold prior auction      -109114     18989.1    -5.74614     0.000  -0.0565257   -0.104125
Method: Vendor bid              77144.6     20737.2      3.7201     0.000   0.0342371   0.0442128
Bedroom2                         202813     5924.64     34.2321     0.000    0.306426    0.475951
Bathroom                         263854      8314.3      31.735     0.000    0.285481    0.467038 </pre>
<p>Notice that the results include estimated coefficients for each of the <code>Method</code> categories, except the base case, <em>Passed In</em>.</p>
<div class="alert alert-info" role="alert">For more information on how to use and interpret categorical variables in linear regression see our earlier blog, <a href="https://www.aptech.com/blog/introduction-to-categorical-variables/">&quot;Introduction to Categorical Variables&quot;</a>. </div>
<h2 id="conclusion">Conclusion</h2>
<p>Today we've seen how fast and easy it can be to work with categorical variables using the new GAUSS category type. Whether you're just getting started exploring your data or you're in the final stage of estimation, the category type can speed up your work and get you to your results faster. </p>
<h2 id="further-reading">Further reading</h2>
<ol>
<li><a href="https://www.aptech.com/blog/introduction-to-categorical-variables/">Introduction to Categorical Variables</a>. </li>
<li><a href="https://www.aptech.com/blog/easy-and-fast-data-management-in-gauss-21/">Easy and Fast Data Management in GAUSS 21</a> .</li>
<li><a href="https://www.aptech.com/blog/preparing-and-cleaning-data-fred-data-in-gauss/">Preparing and Cleaning FRED data in GAUSS</a>/</li>
</ol>
<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/easy-management-of-categorical-variables/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Preparing and Cleaning FRED data in GAUSS</title>
		<link>https://www.aptech.com/blog/preparing-and-cleaning-data-fred-data-in-gauss/</link>
					<comments>https://www.aptech.com/blog/preparing-and-cleaning-data-fred-data-in-gauss/#comments</comments>
		
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Wed, 23 Dec 2020 13:27:53 +0000</pubDate>
				<category><![CDATA[Time Series]]></category>
		<category><![CDATA[User Interface]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=11580534</guid>

					<description><![CDATA[In today’s blog, we look at how to save time and reduce errors using GAUSS’s new data management tools.  

Using the <a href="https://fred.stlouisfed.org/series/GDPC1">quarterly real GDP dataset</a> from the FRED database we explore GAUSS’s new data management tools. 

In particular, we examine how to: 
<ul>
<li>Deal with irregular dataset headers.</li>
<li>Change variable names. </li>
<li>Filter dates and change the date display.</li>
</ul>]]></description>
										<content:encoded><![CDATA[<h2 id="introduction">Introduction</h2>
<p>The <a href="https://fred.stlouisfed.org/">FRED data repository</a> provides access to a wide variety of economic time-series data. It is widely used in research across a number of fields including <a href="https://www.aptech.com/industry-solutions/social-science/">social sciences</a>, <a href="https://www.aptech.com/industry-solutions/econometrics/">economics</a>, and <a href="https://www.aptech.com/industry-solutions/finance/">finance</a>.  </p>
<p>FRED provides extensive access to data. However, that data must be pre-processed and properly cleaned before usage. This can be a time-consuming and tedious part of data analysis. </p>
<p>In today’s blog, we look at how to save time and reduce errors using GAUSS’s new data management tools.  </p>
<p>Using the <a href="https://fred.stlouisfed.org/series/GDPC1">quarterly real GDP dataset</a> from the FRED database we explore GAUSS’s new data management tools. </p>
<p>In particular, we examine how to: </p>
<ul>
<li>Deal with irregular dataset headers.</li>
<li>Change variable names. </li>
<li>Filter dates and change the date display.</li>
</ul>
<h2 id="simple-data-import-example">Simple Data Import Example</h2>
<p>The real GDP series from the FRED database was downloaded and is stored in the file <code>fred_rgdp.xlsx</code>. To start, we open our dataset in the <strong>Data Import</strong> window by double-clicking on the filename, <code>fred_rgdp.xlsx</code> in the <strong>Project Folders</strong> tab.</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-project-folders-10.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-project-folders-10.jpg" alt="" width="387" height="273" class="aligncenter size-full wp-image-11580544" /></a></p>
<p>This opens the <strong>Data Import</strong> tool:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-import-window-10.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-import-window-10.jpg" alt="" width="1988" height="1444" class="aligncenter size-full wp-image-11580545" /></a></p>
<p>The data preview window indicates that there are a number of issues to address in our raw dataset:</p>
<ul>
<li>The raw data includes an irregular header. </li>
<li>The variable names are not correct.</li>
</ul>
<h3 id="updating-the-header-row">Updating the header row</h3>
<p>We can see in our data preview that more appropriate variable names are located row 11. This can be specified using the <strong>Header Row</strong> text box on the <strong>Import Options</strong> tab:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-import-window-options-header0.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-import-window-options-header0.jpg" alt="" width="1988" height="1444" class="aligncenter size-full wp-image-11580546" /></a></p>
<p>The variable names are automatically updated in the preview to reflect the names contained in row 11. Also notice that the <strong>Row Range</strong> input is automatically updated to 12, one past the header row.</p>
<h3 id="importing-data">Importing data</h3>
<p>The FRED real GDP data is now ready for import and we can select <strong>Import</strong> to bring the data into the GAUSS workspace. </p>
<p>Note that when we do, the GAUSS code used to import the data is auto-generated and can be used to replicate the interactive steps we performed.</p>
<p>The auto-generated code can be accessed a few different ways:</p>
<ol>
<li>The <a href="https://www.aptech.com/resources/tutorials/getting-started-with-gauss/#interactive-commands"><strong>command history</strong></a>. To send the code from the command history to a file, right-click on the command in the <strong>History</strong> list and select <strong>Send to File</strong>.</li>
<li>The <strong>Program Input/Output</strong> window. The code snippet can be directly copied by selecting the code snippet, right-clicking, and selecting <strong>Copy</strong>.</li>
</ol>
<h3 id="cleaning-data-in-memory">Cleaning Data in Memory</h3>
<p>Suppose that after importing the real GDP data, we decide we want to perform some data cleaning steps. </p>
<p>Specifically, let’s consider performing the following:</p>
<ul>
<li>Changing the name of the <code>GDPC1</code> variable. </li>
<li>Changing the display format of the <code>observation_date</code>.</li>
<li>Filtering by date to only include observations from 1970 or later.  </li>
</ul>
<p>To begin, double-click <em>fred_rgdp</em> in the <strong>Symbols</strong> window on the left to open it in the symbol editor.</p>
<h3 id="changing-a-variable-name">Changing a variable name</h3>
<p>To change a variable name, click the triangle next to the <code>GCPC1</code> variable name to open the <strong>Variable</strong> settings menu and select <strong>Rename</strong>:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-rename-variable.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-rename-variable.jpg" alt="" width="2144" height="1204" class="aligncenter size-full wp-image-11580578" /></a>
Enter the new variable name, <code>real_gdp</code>, in the <strong>Rename Column</strong> dialog box and select <strong>OK</strong>:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-rename-variable-name-box0.png"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-rename-variable-name-box0.png" alt="" width="200" height="137" class="aligncenter size-full wp-image-11580548" /></a></p>
<div class="alert alert-info" role="alert"><strong>Note:</strong> When we click <strong>OK</strong>, <code>real_gdp</code> now shows up in the <strong>Variables</strong> tab in red. The red text indicates that there are unsaved changes. To save changes we must click <strong>Apply</strong>.</div>
<h3 id="changing-the-date-display-format">Changing the date display format</h3>
<p>The observation dates for our quarterly data, contained in <code>observation_date</code>, are currently displayed in the <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO-8601</a> (“Year-Month-Day”)  format  (<code>1947-01-01</code>). Since we are working with quarterly data, let’s update this to display the year and quarter, <code>1947-Q1</code>.</p>
<p>This can be done by expanding the <strong>Variable</strong> settings menu for <code>observation_date</code> and selecting <strong>Properties</strong>. This opens the <strong>Specify Date Format</strong> dialog:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-date-properties-selector.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-date-properties-selector.jpg" alt="" width="50%" height="50%" class="aligncenter size-full wp-image-11580580" /></a></p>
<p>We enter our new date display format, <code>%Y-Q%q</code>, in the <strong>Date Display</strong> text box and click <strong>OK</strong>. </p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-date-properties-set0.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-date-properties-set0.jpg" alt="" width="70%" height="70%" class="aligncenter size-full wp-image-11580551" /></a></p>
<p>The data editor preview now shows:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-date-after-reset0.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-date-after-reset0.jpg" alt="" width="100%" height="100%" class="aligncenter size-full wp-image-11580570" /></a></p>
<p>The asterisk on the matrix name tab indicates that our dataframe <em>fred_rgdp</em> has unsaved changes. </p>
<h2 id="filtering-dates">Filtering dates</h2>
<p>To finish our real GDP FRED data cleaning example, let's filter the dataframe to include only observations that occur in 1970 and later. </p>
<p>To do this, select the <strong>Filter</strong> tab and set:</p>
<ol>
<li>The <strong>Variable</strong> equal to <code>observation_date</code> (this is the default).</li>
<li>The <strong>Operation</strong> to <code>&gt;=</code>.</li>
<li>The <strong>Value</strong> equal to <code>1970-01-01</code>.</li>
</ol>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-filter-date.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-filter-date.jpg" alt="" width="50%" height="50%" class="aligncenter size-full wp-image-11580590" /></a></p>
<div class="alert alert-info" role="alert"><strong>Note</strong>: The <strong>Value</strong> combo-box for date variables allows you to manually enter a date or select one using the <strong>Calendar</strong> widget. To open the <strong>Calendar</strong> date selector, click on the down arrow in the right-hand corner of the <strong>Value</strong> box. </div>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-filter-dates-calendar.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-filter-dates-calendar.jpg" alt="" width="80%" height="80%" class="aligncenter size-full wp-image-11580573" /></a></p>
<p>After setting all three parts of the filter, we click the <code>+</code> button to add the filter. When we do this, the data preview updates to indicate which values will be included after hitting <strong>Apply</strong>:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-filter-date-before-apply0-2.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/12/gblog-fred-filter-date-before-apply0-2.jpg" alt="" width="40%" height="40%" class="aligncenter size-full wp-image-11580593" /></a></p>
<h3 id="conclusion">Conclusion</h3>
<p>The first, and least glamorous, step in successful data modeling is data cleaning -- the quality of any model depends on the quality of the data coming in. </p>
<p>Today, we’ve examined how the interactive data management tools in GAUSS can make this process less painful and less tedious. </p>
<p>Specifically, we’ve seen how to interactively:</p>
<ul>
<li>Remove irregular headers.</li>
<li>Change variable names. </li>
<li>Filter by date.</li>
<li>Change a date display format. </li>
</ul>
<h2 id="further-reading">Further reading:</h2>
<ul>
<li>For a complete guide to the GAUSS data management, check out our online <a href="https://docs.aptech.com/gauss/data-management.html">Data Management Guide</a>. </li>
<li>The blog, <a href="https://www.aptech.com/blog/easy-and-fast-data-management-in-gauss-21/">Easy and Fast Data Management in GAUSS 21</a> provides an overview of all the new GAUSS 21 data management tools. </li>
<li>For a video example of the data management tools, see our latest YouTube video, <a href="https://youtu.be/jhLP_iJeheA">Quick and Easy Interactive Data Cleaning</a></li>
</ul>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/preparing-and-cleaning-data-fred-data-in-gauss/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>How to Interactively Create Reusable Graphics Profiles</title>
		<link>https://www.aptech.com/blog/how-to-interactively-create-reusable-graphics-profiles/</link>
					<comments>https://www.aptech.com/blog/how-to-interactively-create-reusable-graphics-profiles/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Thu, 07 May 2020 19:41:03 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[User Interface]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=21922</guid>

					<description><![CDATA[Learn how to create reusable graphics profiles with a few clicks of your mouse.]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>You probably know that you can use GAUSS code to create repeatable styling for your graphs. However, you might not know that GAUSS also allows you to build reusable graphics profiles with a few clicks of your mouse.</p>
<p>We will show you how to clone existing graphics profiles and how to control:</p>
<ul>
<li>Font settings for the title, axes labels, and tick labels.</li>
<li>Line colors and styles.</li>
<li>Legend location and styling.</li>
</ul>
<p>While this tutorial will not cover all available options, you should learn enough to be comfortable making most other changes without additional help.</p>
<h2 id="our-project">Our Project</h2>
<p>For this tutorial, our goal will be to create a graph profile to replicate the style of the graph below. <a href="https://github.com/aptech/gauss_blog/tree/master/graphics/interactive-graphics-profiles-05.07.20">Data for the graph can be downloaded from here</a>.</p>
<p><a href="/wp-content/uploads/2020/05/blog-graph-profiles-cook-county-final-1.jpg"><img src="/wp-content/uploads/2020/05/blog-graph-profiles-cook-county-final-1.jpg" alt="" width="520" height="400" class="aligncenter size-full wp-image-21996" /></a></p>
<h2 id="video-tutorial">Video Tutorial</h2>
<iframe width="560" height="315" src="https://www.youtube.com/embed/qwcP1wFOTXc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<p>This video tutorial will show you how to:</p>
<ol>
<li>Clone an Existing Graph Profile.</li>
<li>Modify Title and Axis Font Settings.</li>
<li>Modify Line Style and Legend Descriptions.</li>
<li>Set the Legend Properties.</li>
<li>Set the Y-axis Label.</li>
</ol>
<p>or read the text instructions below.</p>
<h2 id="step-1-clone-an-existing-graph-profile">Step 1: Clone an Existing Graph Profile</h2>
<p><a href="/wp-content/uploads/2020/05/blog-create-graph-profile-round-2.jpg"><img src="/wp-content/uploads/2020/05/blog-create-graph-profile-round-2.jpg" alt="Create GAUSS graphics profile." width="1916" height="754" class="aligncenter size-full wp-image-21965" /></a></p>
<ol>
<li>Select <strong>Tools &gt; Preferences</strong> from the main GAUSS menu.<br/></li>
<li>Select <strong>Graphics</strong> on the left side of the <strong>Preferences</strong> window.<br/></li>
<li>Select the <strong>Profiles</strong> button at the top of the <strong>Graphics Preferences</strong>.<br/></li>
<li>Select the profile you would like to clone from the dropdown list.<br/></li>
<li>Select the <strong>Clone</strong> button.<br/></li>
<li>Enter the name for your new profile and click <em>OK</em>.<br/></li>
</ol>
<h2 id="step-2-modify-font-settings">Step 2: Modify Font Settings</h2>
<h3 id="set-the-title-font">Set the Title Font</h3>
<p><a href="/wp-content/uploads/2020/05/blog-graph-profile-title-font-round.jpg"><img src="/wp-content/uploads/2020/05/blog-graph-profile-title-font-round.jpg" alt="Modify graphics profile title font." width="1614" height="710" class="aligncenter size-full wp-image-21967" /></a></p>
<p>Using the graphics profile created in the previous step:</p>
<ol>
<li>Select <strong>Title</strong> from the list of graph settings on the left.<br/></li>
<li>Click <strong>Change</strong> button on the right.<br/></li>
</ol>
<p>This will open your operating system's font dialog, where you can select your desired font, weight, and size:</p>
<p><a href="/wp-content/uploads/2020/05/blog-create-graph-profiles-font-dialog.jpg"><img src="/wp-content/uploads/2020/05/blog-create-graph-profiles-font-dialog.jpg" alt="" width="363" height="203" class="aligncenter size-full wp-image-21952" /></a></p>
<h3 id="set-the-axes-label-and-tick-label-fonts">Set the Axes Label and Tick Label Fonts</h3>
<p><a href="/wp-content/uploads/2020/05/blog-create-graph-profile-axes-font-round.jpg"><img src="/wp-content/uploads/2020/05/blog-create-graph-profile-axes-font-round.jpg" alt="Set axes fonts for GAUSS graphics profile." width="1502" height="654" class="aligncenter size-full wp-image-21970" /></a></p>
<ol>
<li>Select <strong>Axes Style</strong> from the list of graph settings on the left.<br/></li>
<li>From the <em>Caption</em> section, select the <strong>Change</strong> button to modify the axes label font.<br/></li>
<li>Click the <em>Numbers</em> <strong>Change</strong> button and select your preferred font settings for the tick labels.<br/></li>
</ol>
<h2 id="step-3-modify-line-style-and-legend-descriptions">Step 3: Modify Line Style and Legend Descriptions</h2>
<p><a href="/wp-content/uploads/2020/05/blog-graph-profile-create-line-style.png"><img src="/wp-content/uploads/2020/05/blog-graph-profile-create-line-style.png" alt="Modify line style, legend entry and color for GAUSS graphics preference." width="1240" height="674" class="aligncenter size-full wp-image-21973" /></a></p>
<p>We'll start by modifying the third line which marks the date of the first U.S. location transmission.</p>
<ol>
<li>Select <strong>Series 3</strong>.</li>
<li>Enter the legend text for this line in the <strong>Legend Title</strong> text input box.</li>
<li>Double-click the color box next to <strong>Line Color</strong> and select a gray color.</li>
<li>Select <em>Dash Line</em> from the dropdown box next to <strong>Style</strong>.</li>
</ol>
<p>Then repeat step 2 above to add the legend text for <strong>Series 1</strong> and <strong>Series 2</strong>.</p>
<h2 id="step-4-set-the-legend-properties">Step 4: Set the Legend Properties</h2>
<p><a href="/wp-content/uploads/2020/05/blog-graph-profile-legend-options.jpg"><img src="/wp-content/uploads/2020/05/blog-graph-profile-legend-options.jpg" alt="Modify legend location, font and border color for GAUSS graphic profile." width="748" height="445" class="aligncenter size-full wp-image-21977" /></a></p>
<ol>
<li>Select <strong>Legend</strong>.</li>
<li>Click the font <strong>Change</strong> button and set the desired font and font size.</li>
<li>Select the legend location, using the <em>Vertical Position</em>, <em>Horizontal Position</em>, <em>Inside/Outside</em> and <em>Orientation</em> options.</li>
<li>Double-click the color box next to <strong>Line Color</strong> and set it to white so the legend outline is unseen.</li>
</ol>
<h2 id="step-5-set-y-axis-label">Step 5: Set Y-axis Label</h2>
<p><a href="/wp-content/uploads/2020/05/blog-graph-profile-axes-label.jpg"><img src="/wp-content/uploads/2020/05/blog-graph-profile-axes-label.jpg" alt="Set axes labels in GAUSS graph profile." width="408" height="345" class="aligncenter size-full wp-image-21980" /></a></p>
<ol>
<li>Select <strong>Axes Text</strong>.</li>
<li>Enter the desired axis label in the appropriate text box.</li>
</ol>
<h2 id="use-the-custom-graphics-profile">Use the Custom Graphics Profile</h2>
<p>You can access the settings from a graph profile using the <code>plotGetDefaults</code> function as you would for the default settings. Below is a simple example.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Load variables
Y = loadd("cook-county-covid.csv", "cases + deaths");

x = seqa(1, 1, rows(Y));

// Declare myPlot to be a plotControl structure
// and fill with the settings from our covid profile
struct plotControl myPlot;
myPlot = plotGetDefaults("covid");

// Draw plot using covid profile settings
plotXY(myPlot, x, Y);</code></pre>
<p>which will produce the plot below:</p>
<p><a href="/wp-content/uploads/2020/05/blog-graph-profiles-xy-with-profile-1.jpg"><img src="/wp-content/uploads/2020/05/blog-graph-profiles-xy-with-profile-1.jpg" alt="XY graph using custom graphics profile." width="520" height="400" class="aligncenter size-full wp-image-21990" /></a></p>
<h3 id="further-customize">Further Customize</h3>
<p>While the graphs for a given project may share many features, it is likely that some attributes such as the title or legend text will need to be different. You could clone your custom profile and make these changes. However, it might be simpler to make these changes in your code.</p>
<p>Fortunately, you can use the <code>plotSet</code> functions to further customize the settings for a particular graph. You can modify any settings that you would like to change. </p>
<p>The code below shows how to change the title, keeping all other settings unchanged.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Load variables
Y = loadd("cook-county-covid.csv", "cases + deaths");

x = seqa(1, 1, rows(Y));

// Declare myPlot to be a plotControl structure
// and fill with the settings from our covid profile
struct plotControl myPlot;
myPlot = plotGetDefaults("covid");

// Set title text
plotSetTitle(&amp;myPlot, "COVID-19 Cook County");

// Draw plot using covid profile settings
plotXY(myPlot, x, Y);</code></pre>
<p>These settings will not modify the custom graphics profile that you created. Next time you call <code>myPlot = plotGetDefaults("covid")</code>, <code>myPlot</code> will be filled with the custom profile settings that you selected in the <strong>Preferences</strong> dialog window.</p>
<h2 id="full-code-for-time-series-plot">Full Code for Time Series Plot</h2>
<p>Full code to create the time series plot shown at the top of this post, using the &quot;covid&quot; custom graphics profile we created, can be <a href="https://github.com/aptech/gauss_blog/tree/master/graphics/interactive-graphics-profiles-05.07.20">downloaded here</a>.</p>
<h3 id="conclusion">Conclusion</h3>
<p>Great job! You've learned how to interactively create custom graphics profiles that can be easily reused and further modified.</p>
<h3 id="next-steps">Next Steps</h3>
<ul>
<li><a href="/blog/how-to-mix-match-and-style-different-graph-types/">How to Mix, Match and Style Different Graph Types</a>.</li>
<li><a href="/blog/five-hacks-for-creating-custom-gauss-graphics/">Five Hacks For Creating Custom GAUSS Graphics</a>.</li>
<li><a href="/blog/graph-high-frequency-forex-data/">Graph high-frequency Forex data</a>.</li>
</ul>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/how-to-interactively-create-reusable-graphics-profiles/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Advanced Search and Replace in GAUSS</title>
		<link>https://www.aptech.com/blog/advanced-search-and-replace-in-gauss/</link>
					<comments>https://www.aptech.com/blog/advanced-search-and-replace-in-gauss/#comments</comments>
		
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Tue, 17 Dec 2019 18:15:37 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[User Interface]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=21302</guid>

					<description><![CDATA[You're probably familiar with the basic find-and-replace. However, large projects with many files across several directories, require a more powerful search tool. The GAUSS Source Browser is the powerful search-and-replace tool you need. In this blog, you'll learn more about using the advanced search-and-replace tools in GAUSS to effectively navigate and edit in projects with multiple files and directories.]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>You're probably familiar with the basic find-and-replace. However, large projects with many files across several directories, require a more powerful search tool.</p>
<p>The GAUSS <strong>Source Browser</strong> is the powerful search-and-replace tool you need. We'll discuss some ways you can use it to make your life easier, including:</p>
<ol>
<li>How to find all usages of a function or variable in a file with two clicks.</li>
<li>How to perform searches across multiple files and directories.</li>
<li>Advanced search options, such as how to find only variable assignments.</li>
<li>How to replace search terms across files and directories.</li>
</ol>
<h2 id="how-to-view-all-uses-of-a-variable-or-function">How to View All Uses of a Variable or Function</h2>
<p>If an output seems incorrect or is causing an error, you need a quick way to trace the progress of specific variables. GAUSS's <strong>Find Usages</strong> functionality does exactly that.</p>
<h3 id="find-usages-basics">Find Usages Basics</h3>
<p>As shown in the image below, right-click on the variable you want to search for and select <strong>Find Usages</strong>.</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/12/gblog-open-find-usages-bhat.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/12/gblog-open-find-usages-bhat.jpg" alt="Find all uses of a GAUSS variable." width="482" height="375" class="aligncenter size-full wp-image-21339" /></a></p>
<p>This will search our current file for every instance of our search variable and display them in the GAUSS <strong>Source Browser</strong>.</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/12/gblog-find-usages-result-1.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/12/gblog-find-usages-result-1.jpg" alt="List of all uses of a variable in GAUSS." width="1802" height="502" class="aligncenter size-full wp-image-21340" /></a></p>
<p>As we can see in the above image, <strong>Find Usages</strong> has shown us:</p>
<ol>
<li>The name and full path of the file.</li>
<li>The full line of code containing our search term, which:
<ul>
<li>Starts with the line number.</li>
<li>Highlights our search term.</li>
</ul></li>
</ol>
<p>We can double-click on a line in the <strong>Source Browser</strong> to open it in the GAUSS editor.</p>
<h2 id="how-to-search-across-directories">How to Search Across Directories</h2>
<p>The <strong>Find Usages</strong> basics alone are great, but the GAUSS <strong>Source Browser</strong> has much more to offer.</p>
<h3 id="how-to-open-the-source-browser">How to Open the Source Browser</h3>
<p>In addition to right-clicking and selecting <strong>Find Usages</strong>, the <strong>Source Browser</strong> can be opened two ways:</p>
<ol>
<li>Select <strong>View &gt; Source Browser</strong> from the GAUSS main menu.
<a href="https://www.aptech.com/wp-content/uploads/2019/12/gblog-open-source-browser.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/12/gblog-open-source-browser.jpg" alt="Open GAUSS Source Browser" width="368" height="290" class="aligncenter size-full wp-image-21344" /></a></li>
<li>Use the <code>Ctrl+Shift+F</code> (<code>Command+Shift+F</code>) keyboard shortcut.</li>
</ol>
<h2 id="basic-multi-file-search">Basic Multi-file Search</h2>
<h3 id="the-search-tab">The Search Tab</h3>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/12/gblog-source-browser-search-tab-mac.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/12/gblog-source-browser-search-tab-mac.jpg" alt="Advanced search and replace in GAUSS." width="50%" height="50%" class="aligncenter size-full wp-image-21371" /></a></p>
<p>The <strong>Search Tab</strong> is the starting point for any search. It has three input boxes:</p>
<ol>
<li><strong>Search for</strong> accepts your search query.</li>
<li><strong>File pattern</strong> allows you to restrict your search to specific file types.
<ul>
<li>The default search pattern is <code>*.*</code>, where <code>*</code> is a wildcard character that will match any character or characters. </li>
<li>You can add a comma-separated list of files, or file types to match. For example: <code>*.gss, estimate.src</code>.</li>
<li>Click the downward-pointing arrow at the end of the <strong>File pattern</strong> box to bring up a list of common GAUSS file extensions, such as <code>*.gss,*.src,*.sdf,*.gau,*.prg</code>.</li>
</ul></li>
<li><strong>Directory</strong> specifies the location to search. 
<ul>
<li>The default options from the dropdown-list are:
<ul>
<li><a href="https://www.aptech.com/blog/the-current-working-directory-what-you-need-to-know/">Current working directory</a>.</li>
<li><a href="https://www.aptech.com/resources/tutorials/src_path/">GAUSS Search Paths</a>.</li>
<li>Project View Locations.</li>
<li>Current File.</li>
</ul></li>
<li>You can also enter the name of any file or folder on your computer.</li>
</ul></li>
</ol>
<h3 id="executing-the-search">Executing the search</h3>
<p>Using these tools together can help us quickly locate the information we're looking for. For, example, suppose we want to find uses of the GAUSS generalized method of moments procedure, <a href="https://docs.aptech.com/gauss/gmmfit.html">gmmFit</a>, in internal GAUSS source code. </p>
<p>We can achieve this by:</p>
<ol>
<li>Entering <code>gmmFit</code> in the <strong>Search for</strong> box.</li>
<li>Entering <code>/Users/Research/gauss/src</code> as our <strong>Directory</strong>. </li>
<li>Selecting the <strong>Search</strong> button.</li>
</ol>
<p>We could also set the <strong>File pattern</strong> option to <code>*.src</code> to limit our search to <code>.src</code> files. However, we left the default option to search all files in this case.</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/12/gblog-gmmfit-search-source-browser-1.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/12/gblog-gmmfit-search-source-browser-1.jpg" alt="Multi-file search in GAUSS." width="836" height="239" class="aligncenter size-full wp-image-21348" /></a></p>
<p>Our search results show that the term <code>gmmFit</code> is used between 1 and 37 times in each of five files in the specified directory.</p>
<h2 id="advanced-search-options">Advanced Search Options</h2>
<h3 id="the-advanced-tab">The Advanced Tab</h3>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/12/gblog-source-browser-advanced-tab.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/12/gblog-source-browser-advanced-tab.jpg" alt="Advanced search and replace in GAUSS." width="50%" height="50%" class="aligncenter size-full wp-image-21372" /></a></p>
<p>The <strong>Advanced Tab</strong> provides many useful options for further refining our search. We'll discuss some of the most helpful and less common options.</p>
<h3 id="how-to-find-variable-assignments">How to Find Variable Assignments</h3>
<p>The <strong>Assignments</strong> checkbox allows us to restrict our search to only the instances when a variable is assigned to. Narrowing the list of uses to assignments only is invaluable when tracking down the cause of an incorrect value.
<a href="https://www.aptech.com/wp-content/uploads/2019/12/gblog-assignments-only.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/12/gblog-assignments-only.jpg" alt="Search for variable assignments only in GAUSS." width="895" height="239" class="aligncenter size-full wp-image-21355" /></a>
The screenshot above shows our original <strong>Find Usages</strong> search after adding the <strong>Assignments</strong> filter.</p>
<p><strong>References</strong> is the opposite of <strong>Assignments</strong>, returning instances where a variable is used, but not assigned to.</p>
<div class="alert alert-info" role="alert">Advanced users should know that the <em>RegEx</em> checkbox will enable Perl Compatible Regular Expressions.</div>
<h3 id="how-to-search-subdirectories">How to Search Subdirectories</h3>
<p>By default, the <strong>Source Browser</strong> will search the directory that you specify and all subdirectories. Uncheck the <strong>Search Subdirs</strong> checkbox to restrict the search to the main search directory only.</p>
<h2 id="how-to-replace-across-directories">How to Replace Across Directories</h2>
<h3 id="the-replace-tab">The Replace Tab</h3>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/12/gblog-source-browser-replace-across-files.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/12/gblog-source-browser-replace-across-files.jpg" alt="Replace across multiple files in GAUSS." width="910" height="254" class="aligncenter size-full wp-image-21364" /></a> </p>
<h3 id="executing-a-replace-across-multiple-files">Executing a Replace Across Multiple Files</h3>
<p>After we have completed our desired search, we can perform our replace by:</p>
<ol>
<li>Selecting the <strong>Replace</strong> tab in the <strong>Source Browser</strong> window.</li>
<li>Entering the new term in the <strong>Replace</strong> box.</li>
<li>Clicking the <strong>Replace</strong> button.</li>
</ol>
<h3 id="advanced-multi-file-replace-options">Advanced Multi-file Replace Options</h3>
<p><strong>The checkboxes</strong> at the start of each line of the search results allow you to quickly control which results are replaced.</p>
<p><strong>Backup Original</strong> will create a copy of your files with a <code>.bak</code> file extension before making the replace. Since there is no undo option for replacements made to files not open in the editor, the <code>.bak</code> copies allow you to recover the original file if you make a mistake.</p>
<p><strong>Overwrite Backup</strong> will copy over any pre-existing <code>.bak</code> files made by previous searches with <strong>Backup Original</strong> selected. If this option is <em>unchecked</em>, GAUSS will use <code>.bak2</code>, <code>.bak3</code>, etc if pre-existing <code>.bak</code> files are found.</p>
<h3 id="conclusion">Conclusion</h3>
<p>After reading this post, you now know how to use the advanced search and replace tools in GAUSS to be more productive! </p>
<p>We have learned:</p>
<ol>
<li>How to quickly search your current file with <strong>Find Usages</strong>.</li>
<li>How to find the exact code you need to see across multiple files and directories.</li>
<li>How to find only variable assignments or variable references.</li>
<li>How to replace search terms across files and directories.</li>
</ol>

]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/advanced-search-and-replace-in-gauss/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>GAUSS Package Manager Basics</title>
		<link>https://www.aptech.com/blog/gauss-package-manager-basics/</link>
					<comments>https://www.aptech.com/blog/gauss-package-manager-basics/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Fri, 15 Nov 2019 20:53:00 +0000</pubDate>
				<category><![CDATA[User Interface]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=21099</guid>

					<description><![CDATA[The GAUSS Package Manager, first introduced in <a href="https://www.aptech.com/blog/gauss-20-initial-release/">version 20</a>, allows you to download, install and uninstall GAUSS packages without leaving GAUSS. It supports the paid <a href="https://store.aptech.com/gauss-applications-category.html">GAUSS Application Modules</a>, free GAUSS packages and even allows you to create custom packages and channels. This post will guide you through the basics needed to install and uninstall GAUSS packages.]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>The GAUSS Package Manager, first introduced in <a href="https://www.aptech.com/blog/gauss-20-initial-release/" rel="noopener noreferrer" target="_blank">version 20</a>, allows you to download, install and uninstall GAUSS packages without leaving GAUSS.</p>
<p>It supports the paid <a href="https://store.aptech.com/gauss-applications-category.html" rel="noopener noreferrer" target="_blank">GAUSS Application Modules</a>, free GAUSS packages and even allows you to create custom packages and channels.</p>
<p>This post will guide you through the basics needed to install and uninstall GAUSS packages.</p>
<h2 id="install-the-package-manager">Install the Package Manager</h2>
<p>The <strong>Package Manager</strong> must be downloaded and installed before its first use. To begin this process, select <strong>Tools &gt; Package Manager</strong> from the main GAUSS menu. This will open a window which looks like this:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/11/gauss-install-package-manager-mark-up.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/11/gauss-install-package-manager-mark-up.jpg" alt="" width="567" height="399" class="aligncenter size-full wp-image-21105" /></a></p>
<p>For complete instructions on installing the <strong>Package Manager</strong> see our online video:</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/sXrFAVCtFyc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<h3 id="the-installation-directory">The Installation Directory</h3>
<p>By default, the <strong>Package Manager</strong> will install inside a folder named <code>conda</code> inside your GAUSSHOME folder. In most cases, you should leave the default installation directory.</p>
<p>However, the initial release of the <strong>Package Manager</strong> does not support installation directories with spaces in the path names. If your GAUSSHOME directory contains a space, you will need to point this to another folder in which your user has write permissions.</p>
<h3 id="download-account-credentials">Download Account Credentials</h3>
<p>The next section is for your GAUSS Download Account username and password. This allows you to download any <a href="https://store.aptech.com/gauss-applications-category.html" rel="noopener noreferrer" target="_blank">GAUSS Application Modules</a> which you have purchased. If you do not know your username and password, <a href="https://www.aptech.com/contact-us/" rel="noopener noreferrer" target="_blank">contact Aptech</a>.</p>
<p>A username and password are not required to download free packages.</p>
<h3 id="install">Install</h3>
<p>Click the <em>install</em> button on the bottom right of the <strong>Install Package Manager</strong> window. This will begin the download and installation of the <strong>Package Manager</strong>. It will take a minute or two. When the installation has completed you will see the following pop-up window.</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/11/gauss-package-manager-install-finished.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/11/gauss-package-manager-install-finished.jpg" alt="" width="279" height="157" class="aligncenter size-full wp-image-21109" /></a></p>
<h2 id="how-to-install-a-gauss-package">How to Install a GAUSS Package</h2>
<p>If you have not already installed the <strong>Package Manager</strong>, see the previous steps.</p>
<ol>
<li>Select <strong>Tools &gt; Package Manager</strong> to open the <strong>Installed Packages</strong> window shown below:
<a href="https://www.aptech.com/wp-content/uploads/2019/11/gauss-package-manager-press-install.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/11/gauss-package-manager-press-install.jpg" alt="" width="502" height="351" class="aligncenter size-full wp-image-21111" /></a>
<br/>
As the name implies, it will list all the packages you have previously installed. If you have not installed any packages, the window will be blank as we see above.</li>
<li>Click the plus icon (<code>+</code>) on the top right of the <strong>Installed Packages</strong> window to open the <strong>Repository Packages</strong> window.</li>
<li>Click the name of an available package from the list in the <strong>Repository Packages</strong> window.
<a href="https://www.aptech.com/wp-content/uploads/2019/11/install-gauss-package-bet-1.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/11/install-gauss-package-bet-1.jpg" alt="" width="649" height="443" class="aligncenter size-full wp-image-21121" /></a></li>
<li>Click the <em>Install Package</em> button on the bottom-left.</li>
<li>Click <em>Close</em> when the package has finished installing.
<a href="https://www.aptech.com/wp-content/uploads/2019/11/package-installed.png"><img src="https://www.aptech.com/wp-content/uploads/2019/11/package-installed.png" alt="" width="600" height="102" class="aligncenter size-full wp-image-21126" /></a></li>
</ol>
<h2 id="package-install-faq">Package Install FAQ</h2>
<h3 id="why-are-some-of-the-packages-locked">Why are some of the packages locked?</h3>
<p>If a package in the <strong>Repository Packages</strong> window has a red background color, it means that the username and password you have entered do not allow access to the package.</p>
<h3 id="how-can-i-reset-my-username-and-password">How can I reset my username and password?</h3>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/11/package-manager-update-password.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/11/package-manager-update-password.jpg" alt="" width="747" height="5042" class="aligncenter size-full wp-image-21135" /></a></p>
<ol>
<li>Open the <strong>Repository Packages</strong> window:
<ul>
<li>Select <strong>Tools &gt; Package Manager</strong> from the main GAUSS menu. </li>
<li>Then select the plus icon (<code>+</code>) on the right of the <strong>Installed Packages</strong> window.</li>
</ul></li>
<li>Click the <em>Settings</em> button.</li>
<li>Enter your username and password in the appropriate boxes and click <em>OK</em>.</li>
</ol>
<h2 id="how-to-uninstall-a-gauss-package">How to Uninstall a GAUSS Package</h2>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/11/uninstall-gauss-package-bet.png"><img src="https://www.aptech.com/wp-content/uploads/2019/11/uninstall-gauss-package-bet.png" alt="" width="700" height="211" class="aligncenter size-full wp-image-21131" /></a></p>
<ol>
<li>Select <strong>Tools &gt; Package Manager</strong> from the main GAUSS menu.</li>
<li>Click the name of the package to uninstall.</li>
<li>Select the uninstall (<code>-</code>) icon.</li>
</ol>
<h3 id="conclusion">Conclusion</h3>
<p>In this post, you've learned:</p>
<ol>
<li>How to install the GAUSS <strong>Package Manager</strong>.</li>
<li>How to use the GAUSS <strong>Package Manager</strong> to install and uninstall GAUSS packages.</li>
<li>How to reset your username and password.</li>
</ol>
<h3 id="further-reading">Further Reading</h3>
<ol>
<li><a href="https://www.aptech.com/blog/using-gauss-packages-complete-guide/" target="_blank" rel="noopener">Using GAUSS Packages [Complete Guide]</a></li>
<li><a href="https://www.aptech.com/blog/understanding-errors-g0025-undefined-symbol/" target="_blank" rel="noopener">Understanding Errors | G0025 : Undefined symbol</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-2-running-a-program/" target="_blank" rel="noopener">GAUSS Basics 2: Running a program</a></li>
</ol>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/gauss-package-manager-basics/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>The Current Working Directory: What you need to know</title>
		<link>https://www.aptech.com/blog/the-current-working-directory-what-you-need-to-know/</link>
					<comments>https://www.aptech.com/blog/the-current-working-directory-what-you-need-to-know/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Fri, 31 May 2019 00:33:19 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[User Interface]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=20348</guid>

					<description><![CDATA[Today we cover what the GAUSS working directory is and how to make the most of it. We'll show you how some common GAUSS functions use your working directory and some of the errors you're most likely to run into.]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>Whether you are new to GAUSS, or have been around for a while, today's blog will have something for you. </p>
<p>We'll answer the questions:</p>
<ul>
<li>What is the current working directory in GAUSS?</li>
<li>How can I find my working directory?</li>
<li>How can I change my working directory?</li>
</ul>
<p>Then we'll show you how some common GAUSS functions use your working directory and some of the errors you're most likely to run into.</p>
<h2 id="what-is-the-gauss-current-working-directory">What is the GAUSS Current Working Directory?</h2>
<p>In GAUSS, the working directory is the default search location for any function, procedure or command that works on files. This includes:</p>
<ul>
<li>Functions that read and write data.</li>
<li>The <code>#include</code> and <code>output</code> commands.</li>
<li><code>deleteFile</code> and <code>renameFile</code>.</li>
<li>The <code>run</code>, <code>edit</code> and <code>debug</code> commands.</li>
</ul>
<div class="alert alert-info" role="alert">GAUSS first searches for files in your current working directory.</div>
<h2 id="how-can-i-find-my-current-working-directory">How can I find my current working directory?</h2>
<h3 id="user-interface">User Interface</h3>
<p>The <strong>Working Directory Toolbar Widget</strong> located on the main GAUSS toolbar, displays the current working directory.
<a href="https://www.aptech.com/wp-content/uploads/2019/05/working-directory-toolbar.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/05/working-directory-toolbar.jpg" alt="GAUSS Working Directory Toolbar Widget." width="634" height="79" class="aligncenter size-full wp-image-20354" /></a></p>
<h3 id="commands">Commands</h3>
<p>Pass a zero to the <code>cdir</code> command to print out your current working directory as shown below.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Print a string containing your current working directory
cdir(0);</code></pre>
<h2 id="how-can-i-set-my-current-working-directory">How can I set my current working directory?</h2>
<h3 id="user-interface-1">User Interface</h3>
<ol>
<li>Click the button with three horizontal dots, <code>...</code>, on the right of the working directory widget to browse and select a new folder.<br/>
<a href="https://www.aptech.com/wp-content/uploads/2019/05/working-directory-three-dots-button.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/05/working-directory-three-dots-button.jpg" alt="Change the GAUSS current working directory." width="304" height="41" class="aligncenter size-full wp-image-20358" /></a></li>
<li>Click on the name of the current working directory to bring up a list of recent working directories.
<a href="https://www.aptech.com/wp-content/uploads/2019/05/working-directory-toolbar-recent.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/05/working-directory-toolbar-recent.jpg" alt="Recent working directories" width="395" height="84" class="aligncenter size-full wp-image-20362" /></a></li>
<li>Set your working directory to a folder open in your <strong>Project Folders Window</strong> by right-clicking the name of the folder and selecting <strong>Set to Working Directory</strong>.
<a href="https://www.aptech.com/wp-content/uploads/2019/05/set-working-directory-project-folders.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/05/set-working-directory-project-folders.jpg" alt="Set working directory." width="454" height="350" class="aligncenter size-full wp-image-20368" /></a></li>
<li>Right-click on the tab of an open file to change your working directory to the location of that file.
<a href="https://www.aptech.com/wp-content/uploads/2019/05/set-working-directory-file-location.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/05/set-working-directory-file-location.jpg" alt="Set working directory." width="640" height="149" class="aligncenter size-full wp-image-20373" /></a></li>
</ol>
<h3 id="commands-1">Commands</h3>
<p>Pass a literal path, or a string prepended with the caret operator, <code>^</code>, to the <code>chdir</code> keyword to programmatically change your working directory.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">/*
** Change your working directory using a literal path
*/

// Windows
chdir C:\gauss;

// macOS
chdir /Users/gauss;

/*
** Change your working directory using a string containing the path.
** Note the use of the caret operator, '^'.
*/

// Windows
new_path = "C:\gauss";
chdir ^new_path;

// macOS
new_path = "/Users/gauss";
chdir ^new_path;</code></pre>
<h2 id="applications-and-common-errors">Applications and common errors</h2>
<p>Now that we've learned a little about the GAUSS working directory as well as several ways to check it and set it, we'll go over some cases where your working directory needs to be set correctly. We'll also discuss the errors that you'll encounter if it is not.</p>
<h3 id="loading-data">Loading data</h3>
<p>The data loading functions in GAUSS only search one folder for the data file.</p>
<p><strong>Fully pathed file names</strong> tell GAUSS exactly which folder to search for the data file. For example:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Load the 'price' variable from the file 'auto2.dta'
// located in the folder C:\gauss
auto_prices = loadd("C:\\gauss\\auto2.dta", "price");</code></pre>
<p><strong>File names without paths</strong> tell GAUSS to search for the file <em>only</em> in the current working directory.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Load data from the file 'nba_ht_wt.xlsx'. Since there is
// no path, look for the file only in the current working directory.
height = xlsReadM("nba_ht_wt.xlsx", "C2:C10");</code></pre>
<p><strong>Errors</strong> </p>
<p>If you run the above code, but the <code>nba_ht_wt.xlsx</code> file is not in your current working directory, you will get the error:</p>
<pre>Error in xlsReadM: file '/Your/cwd/nba_ht_wt.xlsx' not found [xls.src, line 953]</pre>
<p>assuming your current working directory was <code>/Your/cwd</code>. While this error message is pretty clear about the problem, sometimes (especially when running someone else's code) the error message might come from an advanced or internal function. Below are a few that you may run into.</p>
<pre>Filename not found: my_data_file.dta

Error in xlsGetSheetSize: file '/Your/cwd/my_data_file.xlsx' not found
[xls.src, line 953]

G0122 : Bad file handle [formula_parse.src, line 635]

G0014 : File not found 'my_data_file.fmt'</pre>
<p>We'll discuss some of these errors in future blog posts, but one key thing to notice is that if GAUSS is looking in your current working directory, it will either mention the file with your current working directory, or the file with no path at all.</p>
<h3 id="include">#include</h3>
<p>The <code>#include</code> command is seen in quite a bit of public GAUSS code. You can find <a href="https://www.aptech.com/blog/what-you-need-to-know-about-include/">an entire post dedicated to <code>#include</code> here</a>.</p>
<p>For our purposes, we only need to mention a couple of things. A <code>#include</code> statement without a path, like this:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">#include my_procs.src;</code></pre>
<p>will search for <code>my_procs.src</code> in:</p>
<ol>
<li>Your current working directory.</li>
<li>The folders in your <a href="https://www.aptech.com/resources/tutorials/src_path/">SRC_PATH</a>.</li>
</ol>
<p><strong>Errors</strong> </p>
<p>If GAUSS cannot find a file referenced in a <code>#include</code> statement like the one above (i.e. without a path), the error message will look something like this:</p>
<pre>G0014 : File not found 'C:/gauss/pkgs/tsmt/src/my_procs.src' [my_code.gss, line 8]</pre>
<p>The path in the error message will be the last folder where GAUSS looked for the file. This will correspond to the last entry in your <a href="https://www.aptech.com/resources/tutorials/src_path/">SRC_PATH</a>. It does not mean that GAUSS <em>only</em> looked in that folder.</p>
<h3 id="run-edit-and-debug">Run, edit and debug</h3>
<p>The <code>run</code>, <code>edit</code> and <code>debug</code> commands look for files in the same location as <code>#include</code>.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">run my_program.gss</code></pre>
<ol>
<li>Your current working directory.</li>
<li>The folders in your <a href="https://www.aptech.com/resources/tutorials/src_path/">SRC_PATH</a>.</li>
</ol>
<p><strong>Errors</strong></p>
<p>If you try to <code>run</code> or <code>debug</code> a file that is not in your current working directory or your SRC_PATH, the error will simply state:</p>
<pre>G0014 : File not found 'my_program.gss'</pre>
<h2 id="a-current-working-directory-alternative">A current working directory alternative</h2>
<p>While it is common to reference files without a path in the ways that we have seen above, it is not necessarily the best practice.</p>
<p>The GAUSS __FILE_DIR command allows you to set up code projects that will work on any computer without changing path references or your working directory. <a href="https://www.aptech.com/blog/make-your-code-portable-data-paths/">Read more about __FILE_DIR</a>. </p>
<h3 id="conclusion">Conclusion</h3>
<p>Congratulations! You've learned:</p>
<ol>
<li>That your current working directory is the first place that all GAUSS functions will look for a file when a path is not specified.</li>
<li>How to find and set your current working directory.</li>
</ol>
<p>as well as some information about a few of the functions which use the current working directory and their error messages.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/the-current-working-directory-what-you-need-to-know/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Five Hacks For Creating Custom GAUSS Graphics</title>
		<link>https://www.aptech.com/blog/five-hacks-for-creating-custom-gauss-graphics/</link>
					<comments>https://www.aptech.com/blog/five-hacks-for-creating-custom-gauss-graphics/#respond</comments>
		
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Sat, 16 Mar 2019 13:51:15 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[User Interface]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=19690</guid>

					<description><![CDATA[GAUSS includes a plethora of tools for creating publication-quality graphics. Unfortunately, many people fail to use these tools to their full potential. Today we unlock five advanced GAUSS hacks for building beautiful graphics:  
<ul><li>Using HSL, and Colorbrewer color palettes.</li>
<li>Controlling graph exports.</li>
<li>Changing the plot canvas size.</li>
<li>Annotating graphs with shapes, text boxes, and lines.</li>
<li>Using LaTeX for GAUSS legends, labels and text boxes.</li>
</ul>
]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>GAUSS includes a plethora of tools for creating publication-quality graphics. Unfortunately, many people fail to use these tools to their full potential. Today we unlock five advanced GAUSS hacks for building beautiful graphics: </p>
<ol>
<li>Using <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.413.9004&amp;rep=rep1&amp;type=pdf">HSL</a>, <a href="http://www.hsluv.org/">HSLuv</a>, and <a href="http://colorbrewer2.org/#type=sequential&amp;scheme=BuGn&amp;n=3">Colorbrewer</a> color palettes.</li>
<li>Controlling graph exports.</li>
<li>Changing the plot canvas size.</li>
<li>Annotating graphs with shapes, text boxes, and lines.</li>
<li>Using LaTeX for GAUSS legends, labels and text boxes.</li>
</ol>
<h2 id="using-custom-color-palettes">Using custom color palettes</h2>
<img src="https://www.aptech.com/wp-content/uploads/2017/10/wage_scatter_scatter_bar.png" width="320" height="217" alt="Custom GAUSS color palettes" class="aligncenter size-full"/>
<p>GAUSS color schemes include <a href="https://www.aptech.com/releases/gauss18/graphics-updates/color-brewer-palettes/">30 built-in color palettes</a> designed for optimal visual impacts. These include pre-made palettes for sequential, quantitative and diverging data and colorblind friendly palettes.</p>
<p>If you can't find the pre-made palette you like, you can create your own evenly spaced colors in HSL hue space, evenly spaced circular hues in the HSLuv system, or blend custom color palettes. </p>
<p>Color palettes can be controlled using a number of GAUSS procedures:</p>
<table style="width: 100%">
    <colgroup>
       <col span="1" style="width: 25%;">
       <col span="1" style="width: 30%;">
       <col span="1" style="width: 45%;">
    </colgroup>
<tr>
<th>Procedure</th><th>Description</th><th>Format</th>
</tr>
<tr>
<td><b>getColorPalette</b></td><td>Retrieves a named <a href="https://www.aptech.com/releases/gauss18/graphics-updates/color-brewer-palettes/">color palette</a> as a string array.</td><td><i>clrs</i> = <b>getColorPalette</b>(<i>name</i>);<br>
<i>clrs</i> = <b>getColorPalette</b>(<i>name, ncolors</i>);</td>
</tr>
<tr>
<td><b>getHSLPalette</b></td><td>Create a set of evenly spaced colors in HSL hue space.</td><td><i>clrs</i> = <b>getHSLPalette</b>(<i>ncolors, h, s, l</i>);</td>
</tr>
<tr>
<td><b>getHSLuvPalette</b></td><td>Create a set of evenly spaced circular hues in the HSLuv system.</td><td><i>clrs</i> = <b>getHSLuvPalette</b>(<i>ncolors, h, s, l</i>);<br></td>
</tr>
<tr>
<td><b>blendColorPalette</b></td><td>Create a new palette that blends between a list of colors.</td><td><i>clrs</i> = <b>blendColorPalette</b>(<i>colors, ncolors</i>);<br></td>
</tr>
</table>
<p>As an example, let's look at getting the first three colors from the <a href="http://colorbrewer2.org/#type=sequential&amp;scheme=BuGn&amp;n=3">ColorBrewer</a> <i>Dark2</i> color palette:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Get the first 3 colors from the ColorBrewer 'Dark2' palette
clrs = getColorPalette("Dark2", 3);</code></pre>
<p>The resulting colors are:</p>
<table align="center" style="width: 50%">
  <colgroup>
       <col span="1" style="width: 25%;">
       <col span="1" style="width: 25%;">
    </colgroup>
<tr>
<td>#1b9e77</td><td style="background-color: #1b9e77;"></td>
</tr>
<tr>
<td>#d95f02</td><td style="background-color: #d95f02;"></td>
</tr>
<tr>
<td>#7570b3</td><td style="background-color: #7570b3;"></td>
</tr>
</table>
<p>Once the color palette is set, we can use these colors in GAUSS graphs for the line, background, or bar colors. </p>
<p>For example, to use our color palette to plot different colors for each series in a bar graph we would use <code>plotSetFill</code> to change the color assignment in our <code>plotControl</code> structure:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Declare plotControl structure
struct plotControl myPlot;

// Initialize plotControl structure
myPlot = plotGetDefaults("bar");

// Set all bars to have a solid fill with the colors
// assigned to 'clrs' in the previous code box
textures = 1;
plotSetFill(&amp;myPlot, textures, 1, clrs);

// Create data
x = seqa(1, 1, 5);
y1 = { 1.5, 2, 3, 0.5, 1 };
y2 = { 3, 6.7, 8, 2, 0.49 };
y3 = { 2, 3.4, 2.4, 1, 3 };

// Draw bar graph
plotBar(myPlot, x, y1~y2~y3);</code></pre>
<div id="attachment_19791" style="width: 810px" class="wp-caption aligncenter"><a href="https://www.aptech.com/wp-content/uploads/2019/03/five-graph-hacks-bar-dark2.png"><img aria-describedby="caption-attachment-19791" decoding="async" fetchpriority="high" src="https://www.aptech.com/wp-content/uploads/2019/03/five-graph-hacks-bar-dark2.png" alt="Bar graph with Colorbrewer color palette." width="400" height="250" class="aligncenter size-full wp-image-19791" /></a><p id="caption-attachment-19791" class="wp-caption-text"><center> Bar graph with Colorbrewer 'Dark2' color palette.</center></p></div>

<h2 id="controlling-graph-exports">Controlling graph exports</h2>
<p>Our second hack, the GAUSS <code>plotSave</code> procedure, is a handy tool which allows us to control the file type, size, and dots per inch (DPI) of exported graphs in a single command.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">plotSave(filename, size); 
plotSave(filename, size, units);
plotSave(filename, size, units dpi);</code></pre>
<p>The procedure is easy to use and has two required inputs and two optional inputs:</p>
<hr>
<dl>
<dt>filename</dt>
<dd>String, name of the file to create with a file type extension. Available file extensions include: <i>.jpg, .plot, .png, .pdf, .svg, .tiff</i>.</dd>
<dt>size</dt>
<dd>2x1 vector, dimensions of the saved graph in specified units. The default unit is centimeters.</dd>
<dt>units</dt>
<dd>Optional input, String, type of units dimension is specified in. Valid options include:<br/>
    &quot;cm&quot; Centimeters (Default)<br />
    &quot;mm&quot; Millimeters<br />
    &quot;in&quot; Inches<br />
    &quot;px&quot; Pixels  </dd>
<dt>dpi</dt>
<dd>Optional input, scalar, requested dots per inch when saving file. Defaults to current system DPI. <i>dpi</i> determines the number of pixels rendered when saving a file in terms of physical dimensions (cm, mm, in).
<hr></dd>
</dl>
<p>For example, if a publisher requests a 640 x 480 pixel <i>.png</i> plot, we specify:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Save the graph as a 640 wide by 480 tall PNG file
plotSave("mygraph.png", 640 | 480, "px");</code></pre>
<p>However, if we need an 11 x 8.5 inch PDF at 300 DPI for a flyer, we specify:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Save the graph as a 11 x 8.5 inch PDF at 300 DPI
plotSave("mygraph.pdf", 11 | 8.5, "in", 300);</code></pre>
<p>There are some helpful things to note about the <code>plotSave</code> procedure:</p>
<ul>
<li>The <i>size</i> input is a <b>required</b> input for all file types except <i>.plot</i> files.  </li>
<li>The <i>unit</i> input is ignored if the file is a <i>.plot</i> file. </li>
<li>The <i>dpi</i> input determines the number of pixels rendered when saving a file in terms of physical dimensions (cm, mm, in). Specifying the <i>dpi</i> parameter has no effect if the specified units are pixels (px). </li>
</ul>
<h2 id="changing-the-plot-canvas-size">Changing the plot canvas size</h2>
<p>There may be times when we want to see how a graph looks at a different size before we export it. This can be easily done with our next tool, <code>plotCanvasSize</code>. </p>
<p>The GAUSS procedure <code>plotCanvasSize</code> adjusts plot canvas sizes programmatically based on specifications in <a href="https://github.com/aptech/gauss-plot-library/blob/master/images/grid-plot-adjusted-canvas.jpeg">centimeters, millimeters, inches or pixels</a>. </p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/03/gblog-plot-polarrose-fullui.png"><img src="https://www.aptech.com/wp-content/uploads/2019/03/gblog-plot-polarrose-fullui.png" alt="Programmatically controlled size of GAUSS graph." width="2294" height="1400" class="aligncenter size-full wp-image-19757" /></a></p>
<p>To produce our graph on a 750 px by 350 px canvas, as shown above, we place the call to <code>plotCanvasSize</code> prior to calling our graphic procedure:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">/*
** Make this call before your plot to set the graph canvas
** to 750 px by 530 px as shown in the image above
*/
plotCanvasSize("px", 750|530);</code></pre>
<p>When we are ready to go back to the default canvas size when simply tell GAUSS to &quot;fill&quot; the plot canvas:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Go back to factory canvas size
plotCanvasSize("fill");</code></pre>
<div class="alert alert-info" role="alert"><strong>Tip:</strong> Sometimes when making grid plot, the individual plot size becomes so small that the x-axis labels are cut off. <a href="https://github.com/aptech/gauss-plot-library/blob/master/docs/grid-plot-adjusted-canvas.md">Increasing the plot canvas size</a> will fix this problem.  </div>
<h2 id="annotating-graphs-with-shapes-text-boxes-and-lines">Annotating graphs with shapes, text boxes, and lines</h2>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/03/gblog-hist-bootmean.png"><img src="https://www.aptech.com/wp-content/uploads/2019/03/gblog-hist-bootmean.png" alt="GAUSS annotated graph." width="640" height="360" class="aligncenter size-full wp-image-19755" /></a></p>
<p>Annotations make graphs more professional, more readable and easier to interpret. There are three easy-to-use functions for adding annotations to any existing GAUSS plot:</p>
<table style="width: 100%">
    <colgroup>
       <col span="1" style="width: 15%;">
       <col span="1" style="width: 30%;">
       <col span="1" style="width: 55%;">
    </colgroup>
<tr>
<td><b>Procedure</b></td><td><b>Description</b></td><td><b>Format</b></td>
</tr>
<tr style="background-color: #F5F5F5;">
<td><b>plotAddArrow</b></td><td>Adds an arrow to an existing graph.</td><td><b>plotAddArrow</b>( <i>[myAnnotation,] x_start, y_start, x_end, y_end, head_size</i>); </td>
</tr>
<tr>
<td><b>plotAddShape</b></td><td>Adds an arrow, line, ellipse or rectangle to an existing graph.</td><td><b>plotAddShape</b>(<i>[myAnnotation,] which_shape, x_start, y_start, x_end, y_end</i>); </td>
</tr>
<tr style="background-color: #F5F5F5;">
<td><b>plotAddTextbox</b></td><td>Adds a textbox to an existing graph.</td><td><b>plotAddTextbox</b>(<i>[myAnnotation,] text, x_start, y_start</i>);</td>
</tr>
</table>
<p>To create annotations there are a few key things to remember:</p>
<ul>
<li>The location of an annotation is specified using starting, and when applicable ending, <i>x</i> and <i>y</i> coordinates.  </li>
<li>We can use default settings for annotations or we can customize the appearance using the optional <code>plotAnnotation</code> structure.  </li>
<li>If we plan on using our annotations often and want to use the same styling, instead of going through multiple steps to set up the style each time, we can create a simple procedure to do the set up:</li>
</ul>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">/*
** Add the procedure below to your user library
** and you will only need one line for all the settings
*/
plotAddTextbox(grayTextSettings(), "My customized text box", 0.15, 0.2);

proc (1) = grayTextSettings();
    struct plotAnnotation mytextbox;

    mytextbox = annotationGetDefaults();
    annotationSetBkd(&amp;mytextbox, "#DDDDDD", 0.3);
    annotationSetFont(&amp;mytextbox, "times", 18, "#555555");
    annotationSetLineThickness(&amp;mytextbox, 2);
    annotationSetLineColor(&amp;mytextbox, "#555555");
    retp(mytextbox);
endp;</code></pre>
<h2 id="using-latex-for-gauss-legends-label-and-text-boxes">Using LaTeX for GAUSS legends, label and text boxes</h2>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/03/gblog-trigonometric-plot-latex.png"><img src="https://www.aptech.com/wp-content/uploads/2019/03/gblog-trigonometric-plot-latex.png" alt="GAUSS graph with LaTeX equations." width="900" height="500" class="aligncenter size-full wp-image-19758" /></a></p>
<p><a href="https://www.latex-project.org/">LaTeX</a> is a powerful tool for generating scientific and technical documents because of its flexibility and ability to transcribe mathematical functions. GAUSS allows users to use the MathJax library for the interpretation of a <a href="http://docs.mathjax.org/en/v2.7-latest/tex.html#supported-latex-commands"">wide variety of LaTeX commands</a>. </p>
<p>To use LaTeX, we must first set the GAUSS text interpreter to ‘latex’ using the <code>plotSetTextInterpreter</code> procedure. This procedure requires three inputs:</p>
<hr>
<dl>
<dt>&amp;myPlot</dt>
<dd>A plotControl structure pointer.</dd>
<dt>interpreter</dt>
<dd>String, &quot;html&quot;, &quot;plain&quot;, &quot;latex&quot;.</dd>
<dt>location</dt>
<dd>String, &quot;all&quot;, &quot;legend&quot;, &quot;title&quot; or &quot;axes&quot;. Default is &quot;all&quot;.
</hr></dd>
</dl>
<p>For example, let's use <a href="https://github.com/aptech/gauss-plot-library/blob/master/docs/xy_latex.md">LaTeX for our legend, axes, and title</a>:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">new;

// Declare plotControl structure
struct plotControl myPlot;

// Initialize plotControl structure
myPlot = plotGetDefaults("xy");

// Set up text interpreter
plotSetTextInterpreter(&amp;myPlot, "latex", "all");</code></pre>
<p>We can now use LaTeX syntax for labeling our graph:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Set up legend in LateX format
string legend_string = {
"y_1 = \\cos{(x)}",
"y_2 = \\sin{(\\frac{x}{2})} = \\pm \\sqrt{\\frac{1-\\cos{(x)}}{2}}",
"y_3 = \\cos{(\\frac{x}{2})} = \\pm \\sqrt{\\frac{1+\\cos{(x)}}{2}}" };

plotSetLegend(&amp;myPlot, legend_string, "bottom right inside",1);</code></pre>
<p>There are a few things to remember when using LaTeX in GAUSS:</p>
<ol>
<li>Since backslashes are used for escape sequences in strings, you must use double backslashes.  </li>
<li>Strings interpreted as LaTeX are automatically in ‘inline equation mode’. Therefore to add regular text, you must enclose the text inside of  \text{ }. For example:
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">/*
** Since LaTeX does not respect spaces inside of equations
** add a space after 'equation is' inside of the text section
*/
"\\text{The equation is } \\alpha + \\beta X"</code></pre></li>
<li>Text inside of a '\text{}' section will use the font set by the user as it would if the text interpreter were set to plain or HTML.
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">/*
** 'Posterior distribution' will be in Times 24 point font
** The greek lambda will be proportional in size to Times 24, but will be in TeX font
*/
plotSetTitle(&amp;myPlot, "\\text{Posterior distribution of  } \\lambda_1", "Times", 24);</code></pre></li>
</ol>
<h3 id="conclusion">Conclusion</h3>
<p>GAUSS graphics tools have been created with the end goal of generating publication quality graphs. In this blog we highlight five advanced hacks for raising the bar on your custom GAUSS graphics:</p>
<ol>
<li>Using <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.413.9004&amp;rep=rep1&amp;type=pdf">HSL</a>, <a href="http://www.hsluv.org/">HSLuv</a>, and <a href="http://colorbrewer2.org/#type=sequential&amp;scheme=BuGn&amp;n=3">Colorbrewer</a> color palettes.</li>
<li>Controlling graph exports.</li>
<li>Changing the plot canvas size.</li>
<li>Annotating graphs with shapes, text boxes, and lines.</li>
<li>Using LaTeX for GAUSS legends, labels and text boxes.</li>
</ol>
<p>For more tips and graph examples, please see our <a href="https://github.com/aptech/gauss-plot-library">GAUSS plot library</a>.</p>
<p></p>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/five-hacks-for-creating-custom-gauss-graphics/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Running publicly available GAUSS code: Part 1</title>
		<link>https://www.aptech.com/blog/running-publicly-available-gauss-code-part-1/</link>
					<comments>https://www.aptech.com/blog/running-publicly-available-gauss-code-part-1/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Mon, 28 Jan 2019 21:58:45 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=19375</guid>

					<description><![CDATA[This blog explores how to use publicly available GAUSS code in your own GAUSS projects. This video will guide you through:
<ul>
<li> Opening your code in the <b>Project Folders Window</b>.</li> 
<li> Running the code.</li> 
<li> The <b>Applications Installer</b>.</li> 
<li>  Setting your working directory.</li> 
<li> Error <i>G0290 Library not found</i>.</li> 
<li>  Error <i>G0014 File not found</i>.</li> 
<li> Viewing workspace variables.</li> 
</ul> ]]></description>
										<content:encoded><![CDATA[<div style="border-style: solid; border-color: #36434c; border-width: 5px;">
<iframe width="800" height="454" src="https://www.youtube.com/embed/r66CFpj2A4Y" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>

<br/>
<p>This video will guide you through:</p>
<ul>
<li>Creating folders for a GAUSS project.</li>
<li>Opening your code in the <strong>Project Folders Window</strong>.</li>
<li>Running the code.</li>
<li>The <strong>Applications Installer</strong>.</li>
<li>Setting your working directory.</li>
<li>Error <em>G0290 Library not found</em>.</li>
<li>Error <em>G0014 File not found</em>.</li>
<li>Viewing workspace variables.</li>
</ul>
<p><strong>Next</strong>: <a href="https://www.aptech.com/blog/running-publicly-available-gauss-code-part-2/">Running Public GAUSS Code: Part 2</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/running-publicly-available-gauss-code-part-1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
