Module 2: Introduction to low-code Python programming

AI-aided content analysis of sustainability communication

Lesson 2.1: AI-aided and low-code programming

lecture slides

lecture video

lecture text

Open Science Methods

Open science promotes research practices that are transparent, reproducible, and openly accessible. It encourages international collaboration through the open sharing of data, code, and methodologies, making research more verifiable and impactful. By relying on open-source tools and platforms, it breaks down barriers between disciplines and enhances the credibility and integrity of scientific output. Ultimately, open science fosters innovation by enabling broader participation in the research process.


Python Environments: Local, Cloud, Notebooks

Python can be run in different environments depending on the user’s needs. Local environments require installing Python and managing dependencies on your own machine, which offers control but can be complex. Cloud environments like Google Colab remove the need for setup, providing instant access to computational resources. Jupyter notebooks, used both locally and in the cloud, allow for interactive coding with integrated documentation. This flexibility makes notebooks especially useful for iterative analysis and educational purposes.


The Concept of Jupyter Notebooks

Jupyter Notebooks offer a powerful way to write and run code in small, interactive steps. Each notebook combines live code, explanations, and visualizations in a single document, making it ideal for experimentation, learning, and communication of results. They support a workflow where code can be modified and tested incrementally, which is especially helpful in debugging and teaching. Compared to traditional script-based environments, notebooks provide a more transparent and readable approach to programming.


Google Colab Notebook Interface

Google Colab is a free, cloud-based platform that hosts Jupyter notebooks and provides access to GPUs and other computing resources. It features an interface where users can write and execute code in cells while documenting their process in markdown. The notebook automatically saves to Google Drive, supporting easy sharing and collaboration. This makes it a perfect choice for beginners or teams who want to start coding without the hassle of installing anything locally.


What Is Programming and Python Programming

Programming is the process of writing instructions that computers can follow to perform tasks, from calculations to automation. Python, known for its readable syntax and versatility, is one of the most popular languages for both beginners and professionals. It’s widely used in fields such as web development, data science, machine learning, and more. With its vast ecosystem of libraries, Python simplifies many tasks, making it accessible for quick prototyping and robust application development alike.


Python Use Cases: Low vs. High-Code

Python supports both low-code and high-code workflows depending on user expertise and project complexity. Low-code approaches are useful for quick data analysis and visualization, especially in fields like social science where rapid insight is key. In contrast, high-code solutions enable more advanced customization, often used in computer science and AI development. The strength of Python lies in its ability to serve both ends of the spectrum efficiently.


Basic Python Syntax: Variables, Data Objects, Loops

Understanding Python’s basic syntax is the first step in learning to program effectively. Variables are used to store information, and Python’s built-in data types like lists, dictionaries, and tuples help organize it. Loops enable automation by allowing code to repeat across items or conditions. Python’s syntax is intentionally clean and intuitive, which reduces errors and makes code easier to read. These fundamentals are the building blocks for writing useful and scalable programs.