Intro to Programming and Computation for Architectural Engineers

The goal of this course is to provide students with fundamental knowledge of programming and data science so that it can be applied to a broad set of problems in architectural engineering.

Lessons in this course

1. Introduction to data science

Introduce essential data science concepts and vocabulary. Describe where data come from and how to interact with data in different contexts. Provide examples of data types, units, and sources in your engineering domain.

2. Introduction to excel

This lesson covers various aspects of using Microsoft Excel for organizing, analyzing, and visualizing data, including performing calculations, creating charts and graphs, fitting linear and nonlinear regressions, cleaning and importing data, and more.

3. Introduction to python part 1

The objective of this Python lesson is to introduce students to basic programming concepts such as variables, lists, for loops, and the range command, in the context of working with building energy data. By the end of the lesson and the accompanying homework assignment, students should be able to use Python to calculate total energy collected and average energy collected per building during a specified time period, and to manipulate and analyze energy data using variables, lists, for loops, and the range command.

4. Introduction to python part 2

The objective of this lesson is to introduce students interested in building energy conservation to basic Python programming concepts and how they can be applied to analyze and visualize energy data using Matplotlib.

5. Data types

The objective of this lesson is to teach students about the different data types available in Python, including integers, floats, and strings, and to help them understand why data type matters in programming.

6. Linear regression part 1

The objective of this lesson was to teach students how to perform linear regression analysis on energy-related datasets using Python libraries such as NumPy and SciPy.

7. Linear regression part 2

The objective of this lesson was to teach beginners in Python how to evaluate the accuracy of a linear regression model using metrics like mean squared error (MSE), R-squared, and adjusted R-squared.

8. Debugging Linear models

The objective of the lesson was to teach how to handle common errors that can occur while using the linregress function in Python for linear regression analysis, and how to debug them effectively.

9. Bar charts

The objective of the lesson was to teach students why data visualization is important and to introduce them to the different types of data visualizations, with a focus on bar charts.

10. Histograms

The objective of the lesson on histograms was to teach students about the basics of histograms, how they are used in the building energy sector, common errors that can occur while creating histograms, how to decide on the number of bins to use for a histogram, and how to implement the Freedman-Diaconis rule in Python.

11. Box plots

The objective of this lesson was to introduce the concept of box plots in data analysis and demonstrate how to create and interpret them using Python.

12. Error bars

This lesson will introduce the concept of error bars in data visualization and demonstrate how to create and interpret them using Python.

13. Reading data into pandas

The objective of this lesson is to introduce the pandas package in Python and cover topics such as dataframes, reading in data, and common bugs that can occur when reading CSV files.

14. Indexing and filtering in pandas

The objective of this lesson is to teach students how to manipulate data in pandas dataframes.

15. Descriptive statistics

The objective of this lesson was to teach students how to use basic statistics with Pandas dataframes in Python, using a context of green jobs and smart grid systems.

16. Data cleaning

The objective of this lesson was to introduce you to data cleaning in Pandas.

17. Data visualization part 1

The objective of this lesson was to provide an introduction to visualizing dataframes in Pandas using various types of plots and charts.

18. Data visualization part 2

The objective of such a lesson is to introduce students to the fundamental principles and techniques of data visualization using the Seaborn library in Python, and to provide them with the skills and knowledge needed to effectively communicate insights and patterns in their data through more complex visual representations.

19. Outlier analysis

The objective of this lesson was to introduce the concept of outliers in the context of analyzing building energy data, and to provide techniques for identifying and removing outliers in a dataset.

20. Dataframes and conditional statements

The objective of this lesson was to introduce students to the concepts of conditional statements, categorical variables, and dictionaries in the context of working with dataframes.

Contributors

Rebecca Napolitano

Penn State

Dr. Rebecca Napolitano is an Assistant Professor of Architectural Engineering at the Pennsylvania State University. She teaches computational and data sciences courses for architectural engineering students at the undergraduate and graduate level.

License for materials in this course

Copyright Rebecca Napolitano 2023

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Questions or feedback: nap@psu.edu

The Pennsylvania State University © 2022