ITC OEL - Watermark
ITC OEL - Watermark
In this report, we will be presenting a project to demonstrate the potential of computing in engineering fields
unrelated to computer science. We will explore how computing can enhance our tasks and save time. The
project includes generating 100 temperatures ranging from 15 to 45 degrees Celsius. This temperature readings
are systematically tabulated in an Excel file and crop yield calculations for each temperature reading performed.
Afterwards, this Excel file is imported into Python for further data analysis. With python libraries like pandas,
numpy, and matplotlib; we find out the highest, lowest, and average crop yields. Besides, we show graphically
the relationship between temperature and crop yield. By doing this, it integrates Excel which is strong at
tabulating data with Python that takes care of advanced data analysis and visualization showing practical
computational skills useful in engineering practice.
𝑘
Crop yield = +𝑐
1+𝑒 −𝑎(𝑇−𝑏)
Here;
Step #1
Calculating 'RN'
Step #2
Part i
Generating temperature
Excel
observations
step #3
calculating crop yield
START
Step #4
Importing libraries
Step #5
Importing Excel file in python
Part ii Step #6
Python Statical analysis
Step #7
Printing output
Step #8
Plotting Graph
Par t i: Excel
• Step #1: Calculating ‘RN’
The value of RN is the average of the roll numbers of the group members. Open a new Excel
sheet and provide the roll numbers of all the members in separate cells. Then calculate the
average of the roll numbers to get the value of RN. Now, in a separate cell, add the value of
RN to 2000 to get the value of C.
• Step #2: Generating 100 Observations of temperature
The 100 observations of temperature between 15 and 45 degrees Celsius can be generated
by many methods, but we will be generating these values by the following steps:
Note: We have generated 101 observations because the 100th observation is 0.3 less
than 45. To complete the given temperature range, we generated 101 readings, which
also include 45 degrees Celsius.
With Matplotlib, we can add a title, labels, legends, data points, and also manipulate the size
of the graph. We can also plot straight lines we will be using this function to plot the average
yield. Additionally, we can change the color of lines and data points.
RESULTS:
The usage of computational tools including Excel and Python showcased an incredible power to solve
multifaceted issues and process large data within seconds and minutes. The software makes it easy
for civil engineers and other engineering fields non-related to computer science to handle a number
of complex computations using several algorithms and computation approaches.
Excel was perfect for more straightforward counting, data entry and plotting. We were able to
process large amounts of information and also programmatically perform repetitive tasks, freeing us
time.
Python was stronger yet. We can also do similar jobs with libraries like NumPy, Matplotlib, Pandas
and more on complex math, stats and even generate a visual. We also had the ability to tailor-make
algorithms for various engineering jobs, which allowed us to work much faster and more accurately.
By combining Excel and Python, we made our workflow smoother. We could easily move data
between them and automate tasks, making fewer mistakes. Excel was good for data entry and
visualizations, while Python handled the heavy lifting of analysis and modelling.
CONCLUSION:
Excel and Python were tools that completely changed how non-CS background engineers work.
These tools will help to solve complex problems, and we can play with data. They provide the means
to less biased outcomes and enable us to make more informed and evidence-based decisions.
Excel and Python actually make a powerful duo. Excel is easy to use and great for making charts,
while Python is super powerful for doing complex calculations and analysis. By combining them, we
can handle huge amounts of data quickly and find important insights.
In future these tools will continue to lead to innovation as they are used in the engineering fields.
They'll help us build our world faster, smarter, and more sustainably — and as an civil engineering
students ourselves we think non-CS students need to keep up with these tools to stay ahead and
keep making a difference.
APPENDICIES
2. Python:
Step 1:
Open a browser window and navigate to the Python.org Downloads page for Windows.
Under the “Python Releases for Windows” heading, click the link for the Latest Python
Release - Python 3.x.x. As of this writing, the latest version was Python 3.8.4.
Scroll to the bottom and select either Windows x86-64 executable installer for 64-bit or Windows
x86 executable installer for 32-bit.
If you aren’t sure whether to select the 32-bit or the 64-bit installer, then you can expand the box
below to help you decide.
3. Python Libraries:
Open terminal and run the following command:
Pip install [package_name]
4. IDEs:
For installing IDEs i.e: pycharm or vs code you can directely head to their official
website and follow the steps.
Appendix A-2: Test files , Rough work & final files
temp yield
1 100
2 110
3 120
4 130
5 140
6 150
7 90
8 80
9 75
10 70
Chart Title
160
140
120
100
80
60
40
20
0
0 2 4 6 8 10 12
book.py
1 import pandas as pd
2 import numpy as np
3 import matplotlib.pyplot as plt
4
5 wb = pd.read_excel('book.xlsx')
6
7 maxi = np.max(wb['yield'])
8 mini = np.min(wb['yield'])
9 avg = np.average(wb['yield'])
10
11 print("Max yield: ", maxi)
12 print("Min yield: ", mini)
13 print("Average yield: ", avg)
14
15 te = wb['temp']
16 yi = wb['yield']
17
18 plt.figure(figsize=(7,4))
19 plt.title('Temperature vs yield')
20 plt.xlabel('Temperature')
21 plt.ylabel('yield')
22 plt.plot(te, yi, color='#ed7d31' ) # 'bo-' means blue circle markers with solid line
23 plt.scatter(te, yi, color='#ed7d31',label='Data Points') # add markers at each data point
24 plt.axhline(y=avg, color='blue', linestyle='--', label='Average yield') # add horizontal
line for average yield
25 plt.legend()
26 plt.show()
OPEN ENDED LAB
Introduction to Computing for Civil Engineers ( CE-111 )
o Results
S.No# Temperature( C) Crop Yield(tons)
1 15 2142.8623 Maximum Crop Yield: 2833.1110
2 15.3 2148.0183 Minimum Crop Yield: 2142.8623
3 15.6 2153.4111 Average Crop Yield: 2565.5505
4 15.9 2159.0471
5 16.2 2164.9323
6 16.5 2171.0722
7 16.8 2177.4721
8 17.1 2184.1364 Temperature vs Crop yield
9 17.4 2191.0692 2900.0000
10 17.7 2198.2739
11 18 2205.7529
12 18.3 2213.5080 2800.0000
13 18.6 2221.5402
14 18.9 2229.8492
15 19.2 2238.4338 2700.0000
16 19.5 2247.2919
17 19.8 2256.4200
2600.0000
18 20.1 2265.8134
19 20.4 2275.4663
Crop Yield
18
27
30
33
42
45
15.6
16.2
18.6
19.2
19.8
21
21.6
22.2
22.8
23.4
24
25.8
26.4
29.4
30.6
33.6
34.2
36
36.6
37.2
37.8
39
40.2
40.8
41.4
43.8
44.4
16.8
17.4
20.4
24.6
25.2
27.6
28.2
28.8
31.2
31.8
32.4
34.8
35.4
38.4
39.6
42.6
43.2
32 24.3 2419.5456
33 24.6 2431.5085 Temperature
34 24.9 2443.5001
35 25.2 2455.4989
36 25.5 2467.4833
37 25.8 2479.4319
38 26.1 2491.3234
39 26.4 2503.1370
40 26.7 2514.8524
41 27 2526.4501
42 27.3 2537.9113
43 27.6 2549.2182
44 27.9 2560.3539
45 28.2 2571.3028
46 28.5 2582.0502
47 28.8 2592.5830
48 29.1 2602.8891
49 29.4 2612.9578
50 29.7 2622.7797
51 30 2632.3469
52 30.3 2641.6524
53 30.6 2650.6910
54 30.9 2659.4582
55 31.2 2667.9512
56 31.5 2676.1680
57 31.8 2684.1078
58 32.1 2691.7707
59 32.4 2699.1581
60 32.7 2706.2718
61 33 2713.1147
62 33.3 2719.6904
63 33.6 2726.0031
64 33.9 2732.0575
65 34.2 2737.8590
66 34.5 2743.4132
67 34.8 2748.7264
68 35.1 2753.8048
69 35.4 2758.6552
70 35.7 2763.2845
71 36 2767.6996
72 36.3 2771.9077
73 36.6 2775.9160
74 36.9 2779.7315
75 37.2 2783.3617
76 37.5 2786.8135
77 37.8 2790.0940
78 38.1 2793.2102
79 38.4 2796.1689
80 38.7 2798.9769
81 39 2801.6407
82 39.3 2804.1666
83 39.6 2806.5610
84 39.9 2808.8299
85 40.2 2810.9791
86 40.5 2813.0142
87 40.8 2814.9408
88 41.1 2816.7640
89 41.4 2818.4890
90 41.7 2820.1207
91 42 2821.6636
92 42.3 2823.1224
93 42.6 2824.5012
94 42.9 2825.8042
95 43.2 2827.0354
96 43.5 2828.1984
97 43.8 2829.2968
98 44.1 2830.3342
99 44.4 2831.3136
100 44.7 2832.2382
101 45 2833.1110
K:\VScode\ITC_OEL\CE-111 OEL.py