Adding same BSIC and BCCH checking to ADCE
Browse files- queries/process_neighbors.py +20 -0
queries/process_neighbors.py
CHANGED
@@ -21,6 +21,8 @@ BTS_SOURCE = [
|
|
21 |
"ID_BTS",
|
22 |
"ID_BCF",
|
23 |
"name",
|
|
|
|
|
24 |
"Longitude",
|
25 |
"Latitude",
|
26 |
]
|
@@ -28,6 +30,8 @@ BTS_TARGET = [
|
|
28 |
"lac_id",
|
29 |
"ID_BCF",
|
30 |
"name",
|
|
|
|
|
31 |
"Longitude",
|
32 |
"Latitude",
|
33 |
]
|
@@ -125,6 +129,8 @@ def process_neighbors_data(file_path: str):
|
|
125 |
"Longitude": "SOURCE_Longitude",
|
126 |
"Latitude": "SOURCE_Latitude",
|
127 |
"ID_BCF": "SOURCE_ID_BCF",
|
|
|
|
|
128 |
},
|
129 |
inplace=True,
|
130 |
)
|
@@ -139,6 +145,8 @@ def process_neighbors_data(file_path: str):
|
|
139 |
"Longitude": "TARGET_Longitude",
|
140 |
"Latitude": "TARGET_Latitude",
|
141 |
"ID_BCF": "TARGET_ID_BCF",
|
|
|
|
|
142 |
},
|
143 |
inplace=True,
|
144 |
)
|
@@ -153,6 +161,16 @@ def process_neighbors_data(file_path: str):
|
|
153 |
),
|
154 |
axis=1,
|
155 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
# create distance column
|
158 |
df_adce_final["distance_km"] = df_adce_final.apply(
|
@@ -177,6 +195,8 @@ def process_neighbors_data(file_path: str):
|
|
177 |
"SYMETRIQUE",
|
178 |
"synchronized",
|
179 |
"Sync Comment",
|
|
|
|
|
180 |
"distance_km",
|
181 |
]
|
182 |
]
|
|
|
21 |
"ID_BTS",
|
22 |
"ID_BCF",
|
23 |
"name",
|
24 |
+
"BCCH",
|
25 |
+
"BSIC",
|
26 |
"Longitude",
|
27 |
"Latitude",
|
28 |
]
|
|
|
30 |
"lac_id",
|
31 |
"ID_BCF",
|
32 |
"name",
|
33 |
+
"BCCH",
|
34 |
+
"BSIC",
|
35 |
"Longitude",
|
36 |
"Latitude",
|
37 |
]
|
|
|
129 |
"Longitude": "SOURCE_Longitude",
|
130 |
"Latitude": "SOURCE_Latitude",
|
131 |
"ID_BCF": "SOURCE_ID_BCF",
|
132 |
+
"BCCH": "SOURCE_BCCH",
|
133 |
+
"BSIC": "SOURCE_BSIC",
|
134 |
},
|
135 |
inplace=True,
|
136 |
)
|
|
|
145 |
"Longitude": "TARGET_Longitude",
|
146 |
"Latitude": "TARGET_Latitude",
|
147 |
"ID_BCF": "TARGET_ID_BCF",
|
148 |
+
"BCCH": "TARGET_BCCH",
|
149 |
+
"BSIC": "TARGET_BSIC",
|
150 |
},
|
151 |
inplace=True,
|
152 |
)
|
|
|
161 |
),
|
162 |
axis=1,
|
163 |
)
|
164 |
+
# Add column "Same BSIC" if SOURCE_BSIC = TARGET_BSIC THEN "Yes" else "No"
|
165 |
+
df_adce_final["Same BSIC"] = df_adce_final.apply(
|
166 |
+
lambda row: "Yes" if row["SOURCE_BSIC"] == row["TARGET_BSIC"] else "No",
|
167 |
+
axis=1,
|
168 |
+
)
|
169 |
+
# Add column "Same BCCH" if SOURCE_BCCH = TARGET_BCCH THEN "Yes" else "No"
|
170 |
+
df_adce_final["Same BCCH"] = df_adce_final.apply(
|
171 |
+
lambda row: "Yes" if row["SOURCE_BCCH"] == row["TARGET_BCCH"] else "No",
|
172 |
+
axis=1,
|
173 |
+
)
|
174 |
|
175 |
# create distance column
|
176 |
df_adce_final["distance_km"] = df_adce_final.apply(
|
|
|
195 |
"SYMETRIQUE",
|
196 |
"synchronized",
|
197 |
"Sync Comment",
|
198 |
+
"Same BSIC",
|
199 |
+
"Same BCCH",
|
200 |
"distance_km",
|
201 |
]
|
202 |
]
|