diff --git a/.gitignore b/.gitignore
index 56d8131..957c762 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,2 @@
-commands.txt
-stata.tar.gz
-.ipynb_checkpoints/
+util/
+.ipynb_checkpoints/
\ No newline at end of file
diff --git a/README.md b/README.md
index 4900645..7e8010b 100644
--- a/README.md
+++ b/README.md
@@ -1,39 +1,16 @@
-# Usage
+# ⚠️ Disclaimer
+This is an unofficial repository to run Stata using Docker. You must have the license code. Otherwise, you can't execute Stata both on batch mode or via Jupyter because the `stata.lic` file is not attached in the Docker images.
+
+# Images
+There are two images, one only consists of Stata, the other one has Jupyter and LaTeX installed. To see my Docker repositories, visit [here](https://hub.docker.com/u/ledwindra). Use the following Docker commands to pull the images:
```bash
-# replace all values
-# only executed once
-docker build -t stata "https://github.com/ledwindra/docker-stata.git#main" \
- --build-arg URL="URL TO YOUR STATA INSTALLER" \
- --build-arg SERIAL="STATA SERIAL NUMBER" \
- --build-arg CODE="STATA CODE" \
- --build-arg AUTHORIZATION="STATA AUTHORIZATION" \
- --build-arg FIRST="FIRST NAME" \
- --build-arg LAST="LAST NAME"
-
-# run jupyter and copy tokens if needed
-# unless you delete the container (stata), you only need to execute the following command
-docker run -p 8888:8888 --name=stata stata:latest
+# only Stata—1.29 GB
+docker pull ledwindra/base-stata:latest
-# check whether stata container is active
-docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-2d70f687536f stata:latest "tini -g -- jupyter …" 4 minutes ago Up 4 minutes 0.0.0.0:8888->8888/tcp, :::8888->8888/tcp stata
+# with Jupyter and LaTeX— GB
+docker pull ledwindra/jupyter-stata:latest
```
-# Token
-
-
-# Change configuration file
-By default, `stata_kernel` assumes your Stata is MP edition. You need to change its configuration file if you have another edition (IC or SE) by using terminal inside Jupyter. Then type `vim ~/.stata_kernel.conf`.
-
-
-
-Change `stata_path = /usr/local/stata/stata-mp` to be `/usr/local/stata/` (IC) or `/usr/local/stata/stata-se` (SE).
-
-
-
-
-
-
-
+# Too lazy to install Docker?
+No worries, you can execute this via [GitHub Codespaces](https://docs.github.com/en/codespaces/overview) for both public and private repositories. Its default setup has Docker installed. Understanding Docker commands may be helpful, though you can just copy and paste my snippets above.
\ No newline at end of file
diff --git a/base-stata/Dockerfile b/base-stata/Dockerfile
new file mode 100644
index 0000000..7ea3cec
--- /dev/null
+++ b/base-stata/Dockerfile
@@ -0,0 +1,30 @@
+# initial setup
+FROM ubuntu:latest AS stata
+ARG DEBIAN_FRONTEND=noninteractive
+RUN apt-get update && apt-get install -y wget
+
+# install stata
+COPY stata.tar.gz /home/stata.tar.gz
+RUN cd /tmp/ && \
+ mkdir -p statafiles && \
+ cd statafiles && \
+ tar -zxf /home/stata.tar.gz && \
+ cd /usr/local && \
+ mkdir -p stata && \
+ cd stata && \
+ yes | /tmp/statafiles/install
+
+RUN apt-get update && \
+ apt-get install -y autoconf automake build-essential git libncurses5 libtool make pkg-config tcsh vim zlib1g-dev && \
+ wget http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng_1.2.54.orig.tar.xz && \
+ tar xvf libpng_1.2.54.orig.tar.xz && \
+ cd libpng-1.2.54 && \
+ ./autogen.sh && \
+ ./configure && \
+ make -j8 && \
+ make install && \
+ ldconfig
+
+ENV PATH="/usr/local/stata:$PATH"
+RUN mkdir -p /home/stata
+WORKDIR /home/stata
diff --git a/base-stata/README.md b/base-stata/README.md
new file mode 100644
index 0000000..4639393
--- /dev/null
+++ b/base-stata/README.md
@@ -0,0 +1,28 @@
+# Usage
+
+You can build the image locally on your own. First, you must have Stata installer in `.tar.gz` format and save it in this directory `(./base-stata/)`
+
+```bash
+# build image locally
+docker build -t base-stata .
+
+# run image
+docker run -d -it --name=base-stata base-stata:latest
+docker exec -it base-stata bash
+
+# remove container if no longer needed
+docker rm -f base-stata
+```
+
+To run Stata, you need to create `stata.lic` file inside `/usr/local/stata/` directory. Otherwise, you will get the following error message when you prompt Stata batch mode:
+
+```
+Cannot find license file
+stata.lic
+```
+
+By default, I only install `vim` text editor. So type the following command `vim /usr/local/stata/stata.lic` and paste the following values:
+
+```
+SERIAL!AUTHORIZATION!CODE!FIRST NAME!LAST NAME!FOUR DIGITS FROM LICENSE!
+```
\ No newline at end of file
diff --git a/example.ipynb b/example.ipynb
deleted file mode 100644
index 05d7030..0000000
--- a/example.ipynb
+++ /dev/null
@@ -1,501 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "id": "c581b428",
- "metadata": {},
- "outputs": [],
- "source": [
- "set more off"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "id": "c5d1aa5e",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "(1978 Automobile Data)\n"
- ]
- }
- ],
- "source": [
- "sysuse auto"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "id": "346f04e6",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "--------------------------------------------------------------------------------\n",
- "make Make and Model\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: string (str18), but longest is str17\n",
- "\n",
- " unique values: 74 missing \"\": 0/74\n",
- "\n",
- " examples: \"Cad. Deville\"\n",
- " \"Dodge Magnum\"\n",
- " \"Merc. XR-7\"\n",
- " \"Pont. Catalina\"\n",
- "\n",
- " warning: variable has embedded blanks\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "price Price\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (int)\n",
- "\n",
- " range: [3291,15906] units: 1\n",
- " unique values: 74 missing .: 0/74\n",
- "\n",
- " mean: 6165.26\n",
- " std. dev: 2949.5\n",
- "\n",
- " percentiles: 10% 25% 50% 75% 90%\n",
- " 3895 4195 5006.5 6342 11385\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "mpg Mileage (mpg)\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (int)\n",
- "\n",
- " range: [12,41] units: 1\n",
- " unique values: 21 missing .: 0/74\n",
- "\n",
- " mean: 21.2973\n",
- " std. dev: 5.7855\n",
- "\n",
- " percentiles: 10% 25% 50% 75% 90%\n",
- " 14 18 20 25 29\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "rep78 Repair Record 1978\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (int)\n",
- "\n",
- " range: [1,5] units: 1\n",
- " unique values: 5 missing .: 5/74\n",
- "\n",
- " tabulation: Freq. Value\n",
- " 2 1\n",
- " 8 2\n",
- " 30 3\n",
- " 18 4\n",
- " 11 5\n",
- " 5 .\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "headroom Headroom (in.)\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (float)\n",
- "\n",
- " range: [1.5,5] units: .1\n",
- " unique values: 8 missing .: 0/74\n",
- "\n",
- " tabulation: Freq. Value\n",
- " 4 1.5\n",
- " 13 2\n",
- " 14 2.5\n",
- " 13 3\n",
- " 15 3.5\n",
- " 10 4\n",
- " 4 4.5\n",
- " 1 5\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "trunk Trunk space (cu. ft.)\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (int)\n",
- "\n",
- " range: [5,23] units: 1\n",
- " unique values: 18 missing .: 0/74\n",
- "\n",
- " mean: 13.7568\n",
- " std. dev: 4.2774\n",
- "\n",
- " percentiles: 10% 25% 50% 75% 90%\n",
- " 8 10 14 17 20\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "weight Weight (lbs.)\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (int)\n",
- "\n",
- " range: [1760,4840] units: 10\n",
- " unique values: 64 missing .: 0/74\n",
- "\n",
- " mean: 3019.46\n",
- " std. dev: 777.194\n",
- "\n",
- " percentiles: 10% 25% 50% 75% 90%\n",
- " 2020 2240 3190 3600 4060\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "length Length (in.)\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (int)\n",
- "\n",
- " range: [142,233] units: 1\n",
- " unique values: 47 missing .: 0/74\n",
- "\n",
- " mean: 187.932\n",
- " std. dev: 22.2663\n",
- "\n",
- " percentiles: 10% 25% 50% 75% 90%\n",
- " 157 170 192.5 204 218\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "turn Turn Circle (ft.) \n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (int)\n",
- "\n",
- " range: [31,51] units: 1\n",
- " unique values: 18 missing .: 0/74\n",
- "\n",
- " mean: 39.6486\n",
- " std. dev: 4.39935\n",
- "\n",
- " percentiles: 10% 25% 50% 75% 90%\n",
- " 34 36 40 43 45\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "displacement Displacement (cu. in.)\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (int)\n",
- "\n",
- " range: [79,425] units: 1\n",
- " unique values: 31 missing .: 0/74\n",
- "\n",
- " mean: 197.297\n",
- " std. dev: 91.8372\n",
- "\n",
- " percentiles: 10% 25% 50% 75% 90%\n",
- " 97 119 196 250 350\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "gear_ratio Gear Ratio\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (float)\n",
- "\n",
- " range: [2.19,3.89] units: .01\n",
- " unique values: 36 missing .: 0/74\n",
- "\n",
- " mean: 3.01486\n",
- " std. dev: .456287\n",
- "\n",
- " percentiles: 10% 25% 50% 75% 90%\n",
- " 2.43 2.73 2.955 3.37 3.72\n",
- "\n",
- "--------------------------------------------------------------------------------\n",
- "foreign Car type\n",
- "--------------------------------------------------------------------------------\n",
- "\n",
- " type: numeric (byte)\n",
- " label: origin\n",
- "\n",
- " range: [0,1] units: 1\n",
- " unique values: 2 missing .: 0/74\n",
- "\n",
- " tabulation: Freq. Numeric Label\n",
- " 52 0 Domestic\n",
- " 22 1 Foreign\n"
- ]
- }
- ],
- "source": [
- "codebook"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "id": "2b1989db",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- " Variable | Obs Mean Std. Dev. Min Max\n",
- "-------------+---------------------------------------------------------\n",
- " make | 0\n",
- " price | 74 6165.257 2949.496 3291 15906\n",
- " mpg | 74 21.2973 5.785503 12 41\n",
- " rep78 | 69 3.405797 .9899323 1 5\n",
- " headroom | 74 2.993243 .8459948 1.5 5\n",
- "-------------+---------------------------------------------------------\n",
- " trunk | 74 13.75676 4.277404 5 23\n",
- " weight | 74 3019.459 777.1936 1760 4840\n",
- " length | 74 187.9324 22.26634 142 233\n",
- " turn | 74 39.64865 4.399354 31 51\n",
- "displacement | 74 197.2973 91.83722 79 425\n",
- "-------------+---------------------------------------------------------\n",
- " gear_ratio | 74 3.014865 .4562871 2.19 3.89\n",
- " foreign | 74 .2972973 .4601885 0 1\n"
- ]
- }
- ],
- "source": [
- "summarize"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "id": "f018d125",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "(bin=30, start=3291, width=420.5)\n"
- ]
- },
- {
- "data": {
- "application/pdf": "JVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFsgNCAwIFIgXQovQ291bnQgMQo+PgplbmRvYmoKMyAwIG9iago8PAovUHJvZHVjZXIgKEhhcnUgRnJlZSBQREYgTGlicmFyeSAyLjQuMGRldikKPj4KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL01lZGlhQm94IFsgMCAwIDM5NiAyODggXQovQ29udGVudHMgNSAwIFIKL1Jlc291cmNlcyA8PAovUHJvY1NldCBbI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