LakshmiHarika commited on
Commit
21dafe0
·
verified ·
1 Parent(s): 163bf83

Update pages/Data Collection.py

Browse files
Files changed (1) hide show
  1. pages/Data Collection.py +43 -9
pages/Data Collection.py CHANGED
@@ -62,7 +62,9 @@ if data_type == "Structured Data":
62
  <div style="text-align: left; margin-top: 20px;">
63
  <h3 style="color: #e25822;">What is Structured Data?</h3></div>""", unsafe_allow_html=True)
64
 
65
- st.subheader("Definition")
 
 
66
  st.write("""
67
  Structured data refers to information that is organized and formatted in a predefined manner, making it easy to store, retrieve, and analyze.
68
 
@@ -71,24 +73,56 @@ if data_type == "Structured Data":
71
  This type of data is often used in relational databases and spreadsheets, where relationships between data points are explicitly defined.
72
  """)
73
 
74
- st.subheader("Characteristics")
 
 
75
  st.write("""
76
  - Follows a fixed schema.
77
  - Can be easily searched using query languages like SQL.
78
  - Suitable for quantitative analysis.
79
  """)
80
 
81
- # Examples
82
- st.subheader("Examples")
 
83
  st.write("""
84
- A database of employees with fields like name, age, and salary:
85
  """)
86
 
87
- # Add a table for the employee database example
88
  st.table({
89
- "Name": ["John Doe", "Jane Smith"],
90
- "Age": [30, 25],
91
- "Salary": ["$5000", "$4500"]
 
92
  })
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
 
62
  <div style="text-align: left; margin-top: 20px;">
63
  <h3 style="color: #e25822;">What is Structured Data?</h3></div>""", unsafe_allow_html=True)
64
 
65
+ st.markdown("""
66
+ <div style="text-align: left; margin-top: 20px;">
67
+ <h4 style="color: #5b2c6f;">Definition:</h4></div>""", unsafe_allow_html=True)
68
  st.write("""
69
  Structured data refers to information that is organized and formatted in a predefined manner, making it easy to store, retrieve, and analyze.
70
 
 
73
  This type of data is often used in relational databases and spreadsheets, where relationships between data points are explicitly defined.
74
  """)
75
 
76
+ st.markdown("""
77
+ <div style="text-align: left; margin-top: 20px;">
78
+ <h4 style="color: #5b2c6f;">Characteristics:</h4></div>""", unsafe_allow_html=True)
79
  st.write("""
80
  - Follows a fixed schema.
81
  - Can be easily searched using query languages like SQL.
82
  - Suitable for quantitative analysis.
83
  """)
84
 
85
+ st.markdown("""
86
+ <div style="text-align: left; margin-top: 20px;">
87
+ <h4 style="color: #5b2c6f;">Example:</h4></div>""", unsafe_allow_html=True)
88
  st.write("""
89
+ A database of students with fields like id, name, age, and gender:
90
  """)
91
 
92
+ # Add a table for the Student database example
93
  st.table({
94
+ "Id" : [100,101,102,103]
95
+ "Name": ["Lakshmi Harika", "Varshitha","Hari Chandan","Shamitha"],
96
+ "Age": [22, 23,22,23],
97
+ "Gender": ["Female", "Female", "Male","Female"]
98
  })
99
 
100
+ table_style = """
101
+ <style>
102
+ table {
103
+ width: 100%;
104
+ border-collapse: collapse;
105
+ text-align: left;
106
+ }
107
+ th {
108
+ padding: 10px;
109
+ border: 1px solid #dddddd;
110
+ background-color: ffc87c;
111
+ color: #000000;
112
+ text-align: center;
113
+ }
114
+ td:nth-child(1) {
115
+ font-weight: bold;
116
+ }
117
+ td {
118
+ padding: 10px;
119
+ border: 1px solid #dddddd;
120
+ vertical-align: top;
121
+ }
122
+ td:nth-child(2), td:nth-child(3) {
123
+ width: 40%;
124
+ }
125
+ </style>
126
+ """
127
+
128