Platform Setup

Quarto Software Installation

  • Enter wget -c https://assets.qiufei.site/install_quarto_linux.sh in the terminal to download the installation script.

  • Once the download is complete, enter the command bash install_quarto_linux.sh in the terminal to install the Quarto software.

  • Upon successful installation, a prompt message will be displayed in the terminal.

Note: When running this script in a new application environment, if Quarto is already installed in the application, running this script will result in an error.

Quarto Extension Installation

  • Click the Extensions icon in the Cloud Studio application, which is the icon resembling a window with four squares.

  • Enter quarto in the search area, and you will see an extension with an icon like this: https://quarto.org/quarto.png. Click to install it.

.ipynb File Setup

  • Create a new .ipynb file in the file explorer area of the Cloud Studio application, and name it using the format StudentID-Name-Chapter.ipynb, for example, “2016900020-peter-chapter1-test.ipynb”.

  • Click to open the created file, select add a code cell, and set the type of this cell to raw.

  • Enter the following content into the cell:

---
title: 'chapter 1 introduction'
subtitle: 'applied statistics 2026'
author: '2016900020-peter'
date: last-modified
date-format: 'YYYY-MM-DD HH:mm:mm'
format: docx
---
  • Modify the content following the colons for title and author according to your actual information; do not modify any other content. Note: There must be a space after the colon.

  • Add another code cell, set the type of this cell to python, and enter print('hello world!') in the cell.

  • Enter the following command in the terminal: quarto render 2016900020-peter-chapter1-test.ipynb. If a .docx document is generated in the file explorer area, then the platform setup is successful.

Course Data Sources

  • You can obtain these local data files from the textbook’s data website. By prepending the string https://assets.qiufei.site/data/ to the filename of the data referenced in the textbook, you can obtain the download link for the data.

  • For example, if you want to obtain the data stock/stock_basic_data.h5, its URL would be: https://assets.qiufei.site/data/stock/stock_basic_data.h5

  • Enter the command wget -c https://assets.qiufei.site/data/stock/stock_basic_data.h5 in the terminal to download the data to the workspace.

  • The download command for all data in the textbook requires simply entering wget -c before the URL.

Course Data Usage

  • Modify the data path for the Linux platform in the tutorial, changing the original data_path = '/home/ubuntu/r2_data_mount/qiufei/data/stock'

  • Modify it to data_path = '/workspace'

  • For example:

# 根据操作系统自动设置本地数据路径
# Automatically set local data paths based on the operating system
if platform.system() == 'Windows':  # 判断当前操作系统类型
# Check the current operating system type
    data_path = 'C:/qiufei/data/stock'  # Windows 数据路径
    # Data path for Windows
else:  # Linux 系统下使用服务器数据路径
# Use server data path on Linux
    data_path = '/workspace'  # Linux 数据路径,教材的原始路径是 '/home/ubuntu/r2_data_mount/qiufei/data/stock'
    # Data path for Linux