윤혜원

final ele,middle,high schools dataset configured

No preview for this file type
{
"cells": [
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"' 84 124 234 129 6 144 71 159 201 98 238 146 286 38 23 144 112 177 176 59 175 135 108 7 107 144 179 125 96 186 185 201 316 162 204 218 110 250 185 126 175 173 168 58 100 118 235 318 117 308 89 393 165 401 185 207 142 100 140 38 137 143 316 25 102 31 115 42 173 118 13 21 148 169 242 192 229 209 266 135 129 103 96 174 127 305 57 92 76 127 234 250 177 105 187 101 177 216 204 178 197 245 189 144 11 12 79 397 150 103 142 95 126 238 339 225 334 207 215 165 153 179 327 109 143 230 202 123 240 243 106 177 74 121 155 97 144 9 128 191 185 145 132 207 136 107 187 124 268 116 235 4 189 123 188 247 148 144 177 125 246 142 106 11 6 172 107 131 262 161 102 119 234 143 211 181 355 337 259 224 221 157 172 175 133 134 139 118 277 106 312 79 8 186 306 226 163 110 14 251 143 138 147 122 252 181 171 141 141 7 148 122 25 102 252 97 87 339 44 160 94 58 330 60 123 6 77 71 61 93 128 64 107 187 176 99 289 21 125 239 89 96 79 45 98 163 5 54 177 147 182 163 420 89 3 422 409 122 333 126 139 171 16 171 136 147 113 119 158 215 136 31 186 177 115 132 104 318 177 174 114 264 307 110 68 31 321 188 27 85 11 2 178 7 202 11 207 142 167 62 42 293 91 34 180 226 433 242 12 448 376 378 210 37 208 196 67 90 151 129 321 217 258 431 260 485 107 178 157 234 138 114 184 214 - 51 102 161 146 155 205 143 185 112 112 280 192 186 104 13 111 158 187 192 142 142 247 78 249 119 226 12 139 353 114 355 206 173 368 57 325 223 20 214 116 267 4 272 134 214 101 130 295 350 172 4 338 177 290 72 113 148 260 120 324 105 167 103 144 399 119 109 164 268 204 190 304 327 149 136 23 185 229 108 108 162 171 82 76 164 102 232 167 226 119 6 148 278 243 124 213 211 68 158 236 81 73 194 411 224 142 174 106 196 98 98 6 5 88 98 14 42 17 68 176 167 123 117 85 95 188 280 265 69 11 108 212 150 130 61 76 38 73 75 195 310 100 179 268 193 342 184 363 306 111 51 14 170 143 137 211 150 172 164 207 290 175 158 194 117 221 177 209 265 225 143 194 128 56 187 131 - 8 121 132 100 149 205 113 249 115 136 377 343 172 180 153 151 135 121 117 105 311 137 160 164 247 78 249 132 157 71 164 136 77 80 53 129 79 78 72 71 142 102 93 142 156 234 129 6 98 5 153 121 183 164 128 131 144 176 128 96 144 115 187 124 268 88 98 14 42 17 68 153 101 106 138 - 60 10 39 97 112 161 100 130 347 281 140 136 103 98 144 105 124 213 60 220 152 149 73 15 119 87 114 94 136 109 102 89 163 88 256 200 225 222 230 56 187 131 - 8 187 194 195 221 167 62 42 275 161 208 223 229 48 250 195 153 146 104 4 104 79 147 117 101 102 187 171 197 196 5 200 63 118 137 178 90 71 142 35 234 115 100 140 38 173 121 129 176 70 50 214 36 140 174 189 158 74 150 99 34 99 91 117 8 156 184 166 103 257 257 171 16 38 3 365 6 29 13 102 46 80 152 89 178 58 107 157 108 185 102 360 280 139 100 232 154 194 109 403 192 61 - 233 4 205 83 393 165 215 303 198 185 394 153 201 327 211 203 110 168 179 71 179 143 186 350 172 4 338 175 173 168 279 216 50 82 42 133 131 108 98 233 109 175 86 100 199 99 264 307 110 201 202 194 92 62 404 165 278 262 35 7 141 107 144 179 221 64 207 94 238 339 157 198 348 68 210 246 87 339 308 294 47 98 196 259 249 247 78 249 374 109 76 38 73 157 257 163 79 55 59 398 127 50 260 201 173 225 8 125 136 377 130 347 281 411 224 142 78 98 80 47 4 127 308 181 206 209 112 88 64 276 203 250 191 81 290 72 113 104 133 100 183 152 272 194 10 188 143 211 77 174 86 2 110 408 136 251 10 151 5 142 64 189 144 11 12 79 123 22 215 154 217 107 187 177 216 204 223 216 127 187 124 268 78 223 203 99 34 143 43 113 3 1 343 197 140 80 219 186 104 13 52 102 211 51 102 56 70 17 41 117 103 174 114 168 12 330 77 80 53 103 142 85 109 168 3 106 85 269 129 216 97 112 225 232 262 244 113 305 33 244 14 350 172 4 338 42 201 4 25 113 266 101 115 274 108 97 235 317 196 78 267 149 105 3 143 23 367 194 109 210 235 318 117 308 107 166 108 353 12 119 130 157 100 68 146 286 38 23 372 189 288 223 91 202 210 223 434 172 194 64 356 195 180 106 197 209 235 268 270 147 299 305 252 308 337 121 60 152 140 149 192 112 172 100 381 325 223 20 186 80 146 165 68 118 155 181 382 373 218 110 250 185 163 162 168 107 79 126 126 205 143 185 416 113 302 98 233 351 360 79 370 493 303 210 313 136 23 8 25 97 7 149 165 12 6 47 4 2 25 77 106 102 127 65 69 239 69 171 70 143 106 84 190 157 157 198 348 231 85 8 78 157 264 284 117 100 14 55 127 201 173 225 8 38 143 162 142 214 169 127 123 168 216 174 181 293 177 209 122 117 171 36 189 252 88 155 184 170 310 117 175 181 94 44 104 118 172 8 130 184 135 156 106 177 74 149 187 182 163 111 200 177 223 248 202 110 12 335 311 166 174 106 312 79 8 249 172 29 31 146 155 60 167 118 277 69 202 70 131 144 176 194 117 372 106 126 3 215 184 251 297 60 100 190 167 62 42 253 100 223 85 70 83 163 111 101 143 353 81 351 176 41 173 118 13 21 141 40 127 16 36 78 98 37 99 162 132 59 60 285 281 160 87 39 163 79 157 151 148 302 11 7 62 63 66 90 54 36 252 178 237 242 201 139 177 280 291 409 125 107 183 89 459 249 61 171 137 112 68 106 297 44 316 88 303 33 329 178 183 14 153 106 107 218 203 171 159 117 197 372 106 195 78 164 181 227 244 221 275 54 227 130 188 3 192 142 129 174 195 195 118 136 224 193 194 117 184 349 225 187 69 202 161 80 224 149 282 121 247 122 260 203 201 90 148 82 147 130 347 281 170 166 169 101 117 105 311 258 279 216 186 10 136 242 250 281 145 301 146 60 52 16 146 286 38 23 28 103 30 - 179 188 68 210 101 175 275 32 362 6 77 18 90 181 59 398 264 12 256 82 115 192 182 326 225 6 327 - 98 118 77 237 265 233 310 102 252 97 50 152 364 57 111 269 215 297 262 197 296 83 113 109 264 330 181 301 55 195 140 72 232 232 82 167 185 202 194 92 136 100 134 222 88 58 166 126 111 99 150 118 142 236 142 200 232 211 68 156 233 101 52 158 164 173 18 254 147 191 27 151 140 170 257 211 405 221 450 227 342 175 173 168 127 131 219 158 344 109 98 238 25 97 7 80 62 93 135 172 118 190 163 110 14 162 171 82 389 67 38 1 170 310 209 260 120 268 264 145 221 5 249 4 130 205 198 118 109 128 143 316 25 102 31 154 217 233 83 198 447 166 108 181 128 87 187 187 138 66 176 410 406 109 175 178 301 97 288 186 64 371 3 215 205 224 149 282 279 157 83 218 341 200 253 189 230 231 153 91 210 58 330 245 145 101 181 255 303 258 319 75 267 243 122 299 192 108 212 180 31 181 94 233 227 244 221 69 185 29 166 339 147 11 223 216 107 194 389 170 199 90 196 227 400 5 169 311 185 394 165 326 210 359 139 185 229 347 4 245 298 204 120 224 334 4 347 366 199 22 215 177 216 204 267 171 287 284 302 95 182 163 290 215 61 116 158 38 43 180 20 22 125 187 194 318 156 313 285 228 243 122 134 118 137 164 259 113 237 124 74 191 142 106 11 6 203 222 288 223 145 332 292 240 243 219 360 98 212 214 121 60 135 40 149 100 139 229 397 188 - 420 89 3 65 268 264 322 290 260 143 125 79 256 299 351 156 244 152 241 260 120 70 287 250 86 119 109 15 62 294 47 253 38 364 102 360 280 362 157 177 253 291 354 197 371 389 190 44 283 13 176 287 324 353 424 169 95 170 7 20 10 56 94 46 63 91 54 27 378 201 173 225 8 122 323 406 152 165 388 125 239 496 331 429 363 306 156 92 231 192 284 188 323 181 293 307 150 385 384 311 315 193 127 56 279 88 27 50 131 144 176 214 223 110 120 55 61 238 16 395 9 322 117 372 280 375 102 215 303 41 193 111 51 14 43 127 60 36 17 175 282 180 341 164 78 233 145 130 61 58 42 21 11 4 158 21 161 138 152 156 284 285 342 184 325 223 20 38 19 18 11 137 176 240 41 14 12 24 23 29 122 25 19 20 38 119 214 229 22 58 141 7 148 52 19 83 56 187 131 - 8 43 242 12 41 368 248 171 10 250 309 218 205 143 185 371 186 187 205 250 236 280 130 188 3 177 56 180 34 292 118 136 117 105 311 314 251 126 12 42 201 178 143 171 278 229 156 184 217 274 105 187 360 79 370 156 74 150 343 327 90 250 359 91 117 8 155 112 272 236 232 12 164 130 281 7 297 314 12 106 288 207 207 215 165 275 299 247 180 265 209 163 217 68 15 23 107 120 264 242 170 127 305 207 111 113 97 235 215 303 284 160 294 144 156 164 303 66 323 253 171 198 90 91 222 157 264 284 299 136 107 24 295 257 311 250 435 157 198 348 261 352 93 42 194 254 162 62 70 58 89 6 4 46 55 20 150 154 117 103 174 139 129 136 116 390 170 228 175 312 214 123 53 93 128 204 80 119 177 165 24 10 - 143 106 42 11 19 28 88 98 14 42 17 68 14 162 80 56 12 71 172 108 171 15 19 10 100 140 38 11 108 7 11 213 170 28 274 224 222 271 146 143 31 301 140 30 12 6 168 3 4 15 172 6 265 247 122 273 151 25 270 142 219 277 247 195 140 192 108 148 29 121 155 7 14 6 98 6 5 5 80 10 3 186 251 228 223 42 194 254 163 194 313 40 127 16 36 130 13 202 8 191 2 147 134 11 104 191 146 104 4 100 28 12 78 14 49 80 75 8 75 177 71 172 176 173 116 6 8 119 6 98 144 136 100 3 12 5 8 - 22 130 34 3 2 267 171 158 4 6 4 10 - 29 232 124 232 12 18 5 24 91 73 11 11 40 1 2 31 347 4 245 8 89 15 6 74 2 11 420 89 3 18 7 5 186 10 6 38 1 59 5 180 34 51 60 6 14 22 75 24 5 5 1 10 11 45 15 105 98 43 73 50 92 113 3 1 10 52 68 389 67 5 12 163 5 11 71 210 37 72 16 36 6 66 21 64 30 25 97 7 251 10 172 131 105 114 158 141 7 148 186 6 129 162 226 180 323 9 264 174 5 297 262 102 232 167 250 191 347 4 245 290 405 221 296 202 157 151 151 313 186 166 228 148 177 81 132 104 163 111 109 173 118 13 21 165 192 166 166 192 124 163 20 163 110 14 7 8 7 12 2 188 27 169 166 174 132 168 168 21 4 4 3 7 10 142 106 11 6 5 418 209 178 129 19 18 10 20 101 77 5 190 75 60 41 14 6 168 142 4 19 15 19 10 296 83 113 109 202 194 92 86 2 110 4 15 18 169 151 29 108 143 316 25 102 31 39 45 105 3 8 14 25 6 3 90 124 76 37 89 176 35 21 3 128 88 98 14 42 17 68 33 11 92 39 10 60 9 218 206 215 166 385 312 319 305 348 89 282 377 127 46 256 285 291 377 163 192 107 50 101 123 39 15 50 53 60 115 117 196 54 74 52 14 4 15 33 14 226 12 8 200 225 176 121 18 290 72 113 27 7 21 7 2 6 7 40 238 319 227 314 303 286 8 250 268 21 305 33 321 150 106 312 79 8 15 5 44 68 259 289 156 181 153 46 45 10 8 78 50 75 192 61 23 12 48 368 57 51 59 14 91 92 21 12 8 353 12 53 195 162 262 115 42 40 12 128 111 17 18 5 235 4 9 27 85 289 21 16 199 90 52 63 27 85 11 2 3 73 15 173 18 13 16 87 15 30 3 170 7 234 129 6 8 5 121 53 193 82 30 38 17 143 23 9 178 164 22 6 202 11 68 31 143 316 25 102 31 111 51 14 135 40 149 8 5 139 135 55 3 44 15 13 14 3 23 20 273 360 79 370 184 219 42 91 54 28 17 14 214 223 40 7 42 34 301 203 52 200 77 230 68 121 71 176 154 235 139 233 37 288 278 166 299 144 57 258 139 56 144 71 232 117 91 175 208 147 185 267 233 180 198 254 129 268 202 231 229 139 166 141 166 145 25 71 9 26 14 13 1 40 122 169 196 99 223 225 137 131 145 102 232 167 173 161 139 35 5 3 11 151 5 8 11 2 24 14 33 130 111 105 137 130 86 2 110 23 17 4 5 7 2 30 3 21 3 22 225 6 3 24 25 138 136 133 134 75 13 14 350 4 9 14 4 334 4 2 9 13 48 77 78 105 79 107 8 8 8 35 172 29 5 9 41 34 61 53 211 153 28 33 42 23 170 28 262 35 7 4 33 63 101 7 4 190 44 40 18 7 144 9 8 10 142 106 11 6 3 20 18 - 108 27 7 2 3 158 21 5 67 8 9 249 4 36 362 6 4 58 22 201 173 225 8 1 2 69 11 12 6 77 223 54 8 40 74 45 9 7 12 12 16 322 117 111 178 7 400 5 98 6 5 173 118 13 21 5 5 147 11 221 5 286 8 6 75 84 186 64 60 52 113 13 9 113 3 1 2 1 3 7 2 24 53 - 156 99 33 168 56 231 233 168 180 149 167 166 170 42 201 162 178 80 148 98 124 124 189 69 185 129 162 162 115 80 102 166 6 3 31 22 11 5 3 8 6 70 71 91 90 218 193 218 130 191 212 188 280 216 41 21 141 - 60 10 39 46 65 7 8 12 7 1 12 4 44 5 - 101 219 132 107 118 170 143 131 7 5 2 8 68 57 10 17 15 13 35 70 16 73 62 59 12 12 12 83 76 70 4 9 4 14 19 6 7 15 6 13 16 6 59 14 4 136 31 22 79 45 34 55 20 10 13 44 6 283 13 5 55 161 199 3 11 12 5 97 207 46 24 183 14 17 10 10 10 14 75 78 9 4 3 4 11 11 171 169 14 18 18 101 7 4 126 12 30 134 11 11 186 104 13 43 77 82 147 45 14 3 7 12 - 20 3 3 6 107 51 23 11 6 301 30 20 12 12 87 33 14 - 13 9 62 125 132 106 44 5 65 15 7 12 21 38 177 56 14 49 20 30 6 77 223 13 38 98 65 9 15 19 10 11 50 19 16 26 6 19 172 8 4 110 66 21 64 14 15 10 13 8 20 22 5 16 4 3 7 30 6 233 4 205 6 8 2 175 131 242 240 228 263 162 171 82 77 80 53 118 135 40 149 118 174 97 207 88 94 144 115 64 450 17 159 117 103 174 232 232 200 149 2 130 188 3 10 281 7 85 8 77 16 395 9 8 35 6 2 7 1 108 185 157 160 46 157 137 55 127 126 129 127 97 79 15 101 34 23 7 350 4 9 13 197 76 98 50 75 106 177 74 75 94 95 34 10 10 6 187 154 154 190 307 150 157 151 150 171 10 253 7 5 19 6 156 164 151 140 161 106 274 84 65 228 176 217 226 226 13 202 230 284 95 214 273 185 82 42 98 164 4 7 2 8 54 24 126 133 62 125 189 123 132 106 103 43 36 6 23 12 4 202 110 12 120 296 83 113 109 150 118 123 6 117 171 36 6 101 7 4 14 9 7 2 112 30 116 147 117 101 205 113 51 148 29 17 19 73 15 1 10 8 8 4 38 3 10 7 5 103 149 100 8 22 8 34 8 10 20 226 34 233 4 205 205 202 76 255 143 138 139 143 10 186 6 13 64 11 8 3 4 68 57 - 60 10 77 5 21 4 19 26 4 88 98 14 42 17 68 6 26 31 12 9 62 3 3 20 8 4 28 34 7 4 301 55 57 53 30 2 3 1 5 64 65 16 4 323 9 39 103 189 144 11 12 79 8 60 2 2 233 83 60 13 5 174 5 7 264 12 15 122 123 145 332 117 143 73 73 42 267 4 40 127 16 36 45 61 42 2 56 187 131 - 8 4 314 12 98 5 12 125 96 6 14 146 286 38 23 7 9 7 7 174 30 57 2 11 7 3 39 24 100 14 1 6 29 232 124 145 163 126 101 102 360 280 116 411 224 142 50 214 59 38 31 100 232 207 146 101 22 130 113 284 95 81 73 196 67 145 164 172 212 66 113 127 60 147 117 101 278 243 240 67 83 246 353 114 283 240 229 204 205 57 206 218 146 202 97 124 222 33 87 194 6 77 223 224 149 282 19 73 101 68 5 5 161 102 91 30 169 159 197 222 168 200 254 66 146 221 227 283 253 91 117 8 21 8 194 10 8 6 285 182 100 203 123 191 107 144 179 8 22 12 150 5 85 11 2 4 100 70 75 77 253 38 8 191 170 2 7 20 12 236 225 56 52 77 235 318 117 308 334 278 213 114 184 97 114 157 257 118 109 188 100 174 186 166 60 115 119 349 3 194 313 350 172 4 338 253 291 179 292 380 19 176 29 92 27 169 172 240 41 60 89 40 127 16 36 31 23 11 11 16 253 184 335 135 215 225 218 110 250 185 333 225 211 16 38 21 88 27 58 180 31 45 8 8 8 45 14 46 2 14 6 112 82 2 203 13 34 45 10 106 14 25 87 53 39 45 45 39 46 196 5 7 173 118 13 21 189 144 11 12 79 190 157 168 177 360 88 98 14 42 17 68 246 272 209 265 315 356 216 6 70 37 66 21 64 111 25 26 146 104 4 202 110 12 68 68 14 27 7 42 11 112 30 12 211 16 41 44 17 18 24 23 61 26 86 143 316 25 102 31 10 60 14 118 100 68 15 10 18 13 103 101 76 76 101 52 6 18 1 - 61 48 17 17 12 4 17 24 9 230 358 307 235 165 268 264 371 368 215 205 186 206 200 29 92 62 44 87 104 73 15 56 157 262 35 7 106 312 79 8 15 6 5 200 133 164 53 190 133 109 189 144 11 12 79 15 10 108 134 75 37 88 9 62 267 298 90 151 195 - 218 110 250 185 257 258 197 231 239 296 83 113 109 45 115 24 184 335 236 225 231 5 64 44 109 15 29 90 108 123 43 64 364 57 142 35 170 287 48 102 252 97 166 183 225 286 309 115 176 290 42 194 254 242 350 4 9 213 51 102 167 299 362 191 334 188 100 232 185 218 253 414 61 106 165 112 44 23 36 188 459 60 29 232 124 279 153 54 8 358 102 237 304 232 16 395 9 323 278 333 325 234 100 226 192 263 117 171 36 128 25 270 380 319 218 227 282 65 282 157 264 284 275 10 5 51 174 264 307 110 263 221 203 281 7 3 6 9 10 235 262 425 351 94 256 131 451 103 141 239 35 234 250 76 38 73 278 235 318 117 308 121 39 259 247 302 292 334 253 143 328 256 34 159 227 42 406 162 72 305 351 292 34 13 23 184 236 74 121 255 303 175 250 195 310 194 257 66 35 135 279 20 124 322 276 126 223 54 26 186 20 84 31 157 13 32 288 22 261 332 180 '"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"import tensorflow as tf\n",
"import numpy as np\n",
"import pandas as pd\n",
"import os\n",
"\n",
"from tensorflow.keras.models import Sequential\n",
"from tensorflow.keras.layers import Input, Dense, GRU, Embedding\n",
"from tensorflow.keras.optimizers import RMSprop\n",
"from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint, TensorBoard, ReduceLROnPlateau\n",
"from tensorflow.keras.backend import square, mean\n",
"\n",
"basic_folder = '/Users/hyewon/Documents/capstone/2016104140/code/dataset/'\n",
"file_name = basic_folder + 'final_middle_school.csv'\n",
"file_name2=basic_folder + 'middle_timetable.csv'\n",
"df =pd.read_csv(file_name)\n",
"df2 =pd.read_csv(file_name2)\n",
"\n",
"target_location=['latitude','longitude']\n",
"target_names=['1_stu_num','2_stu_num','3_stu_num']\n",
"\n",
"\n",
"shift_days = 1\n",
"shift_steps = shift_days * 24\n",
"\n",
"df_targets = df[target_location][target_names].shift(-shift_steps)\n",
"df[target_location][target_names].shift(-shift_steps)\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 37.585736\n",
"1 37.571817\n",
"2 37.569003\n",
"3 37.573001\n",
"4 37.575743\n",
" ... \n",
"11868 37.024922\n",
"11869 37.246497\n",
"11870 37.494695\n",
"11871 37.498222\n",
"11872 37.497612\n",
"Name: 위도, Length: 11873, dtype: float64"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'elementary_middle_schools_location.csv'\n",
"df =pd.read_csv(file_name)\n",
"\n",
"latitude=df['위도']\n",
"longitude=df['경도']\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 21398/21398 [00:16<00:00, 1308.22it/s]\n"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name2 = basic_folder + '2019_students_num.csv'\n",
"df2 =pd.read_csv(file_name2)\n",
"\n",
"count_row=df2.shape[0] #number of rows\n",
"elementary=[]\n",
"middle=[]\n",
"high=[]\n",
"\n",
"def type_of_school():\n",
" for x in tqdm(range(count_row)):\n",
" type=df2.loc[x]['학교급']\n",
" if(type=='고등학교'):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['1학년_학생수_계'],df2.loc[x]['2학년_학생수_계'],df2.loc[x]['3학년_학생수_계']]\n",
" high.append(row)\n",
" elif(type=='중학교'):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['1학년_학생수_계'],df2.loc[x]['2학년_학생수_계'],df2.loc[x]['3학년_학생수_계']]\n",
" middle.append(row)\n",
" elif(type=='초등학교'):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['1학년_학생수_계'],df2.loc[x]['2학년_학생수_계'],df2.loc[x]['3학년_학생수_계'],df2.loc[x]['4학년_학생수_계'],df2.loc[x]['5학년_학생수_계'],df2.loc[x]['6학년_학생수_계']]\n",
" elementary.append(row)\n",
"\n",
"type_of_school()\n",
" \n",
"columns=['school_name','1_stu_num','2_stu_num','3_stu_num']\n",
"high_df=pd.DataFrame(high,columns=columns)\n",
"high_df.to_csv(r'high_school_stu_num.csv')\n",
"\n",
"middle_df=pd.DataFrame(middle,columns=columns)\n",
"middle_df.to_csv(r'middle_school_stu_num.csv')\n",
"\n",
"columns1=['school_name','1_stu_num','2_stu_num','3_stu_num','4_stu_num','5_stu_num','6_stu_num']\n",
"ele_df=pd.DataFrame(elementary,columns=columns1)\n",
"ele_df.to_csv(r'elementary_school_stu_num.csv')"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
" 0%| | 0/11873 [00:00<?, ?it/s]\n"
]
},
{
"ename": "KeyError",
"evalue": "'도로명주소'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/indexes/base.py\u001b[0m in \u001b[0;36mget_value\u001b[0;34m(self, series, key)\u001b[0m\n\u001b[1;32m 4409\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4410\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mlibindex\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_value_at\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4411\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.get_value_at\u001b[0;34m()\u001b[0m\n",
"\u001b[0;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.get_value_at\u001b[0;34m()\u001b[0m\n",
"\u001b[0;32mpandas/_libs/util.pxd\u001b[0m in \u001b[0;36mpandas._libs.util.get_value_at\u001b[0;34m()\u001b[0m\n",
"\u001b[0;32mpandas/_libs/util.pxd\u001b[0m in \u001b[0;36mpandas._libs.util.validate_indexer\u001b[0;34m()\u001b[0m\n",
"\u001b[0;31mTypeError\u001b[0m: 'str' object cannot be interpreted as an integer",
"\nDuring handling of the above exception, another exception occurred:\n",
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-9-924f5168e0e8>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 23\u001b[0m \u001b[0melementary\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrow\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 25\u001b[0;31m \u001b[0mtype_of_school\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 26\u001b[0m \u001b[0mcolumns\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'school_name'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'school_addr'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'latitude'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'longitude'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 27\u001b[0m \u001b[0mmiddle_df\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmiddle\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m<ipython-input-9-924f5168e0e8>\u001b[0m in \u001b[0;36mtype_of_school\u001b[0;34m()\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[0mmiddle\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrow\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[0;32melif\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtype\u001b[0m\u001b[0;34m==\u001b[0m\u001b[0;34m'초등학교'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 22\u001b[0;31m \u001b[0mrow\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mdf2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'학교명'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mdf2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'도로명주소'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mdf2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'위도'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mdf2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'경도'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 23\u001b[0m \u001b[0melementary\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrow\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/series.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 869\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply_if_callable\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 870\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 871\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mindex\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_value\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 872\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 873\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mis_scalar\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/indexes/base.py\u001b[0m in \u001b[0;36mget_value\u001b[0;34m(self, series, key)\u001b[0m\n\u001b[1;32m 4416\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mInvalidIndexError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4417\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4418\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0me1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4419\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4420\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0me1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/indexes/base.py\u001b[0m in \u001b[0;36mget_value\u001b[0;34m(self, series, key)\u001b[0m\n\u001b[1;32m 4402\u001b[0m \u001b[0mk\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_convert_scalar_indexer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkind\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"getitem\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4403\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4404\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_value\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtz\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mseries\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"tz\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4405\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4406\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m0\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mholds_integer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_boolean\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_value\u001b[0;34m()\u001b[0m\n",
"\u001b[0;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_value\u001b[0;34m()\u001b[0m\n",
"\u001b[0;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[0;34m()\u001b[0m\n",
"\u001b[0;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[0;34m()\u001b[0m\n",
"\u001b[0;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[0;34m()\u001b[0m\n",
"\u001b[0;31mKeyError\u001b[0m: '도로명주소'"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'elementary_middle_schools_location.csv'\n",
"\n",
"df2 =pd.read_csv(file_name)\n",
"count_row=df2.shape[0]\n",
"\n",
"elementary=[]\n",
"middle=[]\n",
"\n",
"def type_of_school():\n",
" for x in tqdm(range(count_row)):\n",
" type=df2.loc[x]['학교급구분']\n",
" if(type=='중학교'):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['소재지도로명주소'],df2.loc[x]['위도'],df2.loc[x]['경도']]\n",
" middle.append(row)\n",
" elif(type=='초등학교'):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['소재지도로명주소'],df2.loc[x]['위도'],df2.loc[x]['경도']]\n",
" elementary.append(row)\n",
"\n",
"type_of_school()\n",
"columns=['school_name','school_addr','latitude','longitude']\n",
"middle_df=pd.DataFrame(middle,columns=columns)\n",
"middle_df.to_csv(r'middle_school.csv')\n",
"\n",
"elem_df=pd.DataFrame(elementary,columns=columns)\n",
"elem_df.to_csv(r'elementary_school.csv')"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 2360/2360 [18:07<00:00, 2.17it/s]\n"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'middle_school.csv'\n",
"file_name2 = basic_folder + 'middle_school_stu_num.csv'\n",
"\n",
"middle_df =pd.read_csv(file_name)\n",
"middle_stu_num_df=pd.read_csv(file_name2)\n",
"\n",
"count_row=middle_df.shape[0]\n",
"count_row2=middle_stu_num_df.shape[0]\n",
"\n",
"middle_arr=[]\n",
"\n",
"def find_middle_student_num():\n",
" for x in tqdm(range(count_row)):\n",
" name=middle_df.loc[x]['school_name']\n",
" for y in range(count_row2):\n",
" if name == middle_stu_num_df.loc[y]['school_name']:\n",
" row=[middle_df.loc[x]['school_name'],middle_df.loc[x]['school_addr'],middle_df.loc[x]['latitude'],middle_df.loc[x]['longitude'],\n",
" middle_stu_num_df.loc[y]['1_stu_num'],middle_stu_num_df.loc[y]['2_stu_num'],middle_stu_num_df.loc[y]['3_stu_num']]\n",
" middle_arr.append(row)\n",
" \n",
"\n",
"find_middle_student_num()\n",
"columns=['school_name','school_addr','latitude','longitude','1_stu_num','2_stu_num','3_stu_num']\n",
"final_middle_df=pd.DataFrame(middle_arr,columns=columns)\n",
"final_middle_df.to_csv(r'final_middle_school.csv')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"0it [00:00, ?it/s]\n"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'elementary_school.csv'\n",
"file_name2 = basic_folder + 'elementary_school_stu_num.csv'\n",
"\n",
"ele_df =pd.read_csv(file_name)\n",
"ele_stu_num_df=pd.read_csv(file_name2)\n",
"\n",
"count_row=ele_df.shape[0]\n",
"count_row2=ele_stu_num_df.shape[0]\n",
"\n",
"ele_arr=[]\n",
"\n",
"def find_ele_student_num():\n",
" for x in tqdm(range(count_row)):\n",
" name=ele_df.loc[x]['school_name']\n",
" for y in range(count_row2):\n",
" if name == ele_stu_num_df.loc[y]['school_name']:\n",
" row=[ele_df.loc[x]['school_name'],ele_df.loc[x]['school_addr'],ele_df.loc[x]['latitude'],ele_df.loc[x]['longitude'],\n",
" ele_stu_num_df.loc[y]['1_stu_num'],ele_stu_num_df.loc[y]['2_stu_num'],ele_stu_num_df.loc[y]['3_stu_num'],\n",
" ele_stu_num_df.loc[y]['4_stu_num'],ele_stu_num_df.loc[y]['5_stu_num'],ele_stu_num_df.loc[y]['6_stu_num']]\n",
" ele_arr.append(row)\n",
" \n",
"find_ele_student_num()\n",
"columns=['school_name','school_addr','latitude','longitude','1_stu_num','2_stu_num','3_stu_num','4_stu_num','5_stu_num','6_stu_num']\n",
"final_ele_df=pd.DataFrame(ele_arr,columns=columns)\n",
"final_ele_df.to_csv(r'final_ele_school.csv')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'high_school.csv'\n",
"file_name2 = basic_folder + 'high_school_stu_num.csv'\n",
"\n",
"middle_df =pd.read_csv(file_name)\n",
"middle_stu_num_df=pd.read_csv(file_name2)\n",
"\n",
"count_row=middle_df.shape[0]\n",
"count_row2=middle_stu_num_df.shape[0]\n",
"\n",
"high_arr=[]\n",
"\n",
"def find_high_student_num():\n",
" for x in tqdm(range(count_row)):\n",
" name=middle_df.loc[x]['school_name']\n",
" for y in range(count_row2):\n",
" if name == middle_stu_num_df.loc[y]['school_name']:\n",
" row=[middle_df.loc[x]['school_name'],middle_df.loc[x]['school_addr'],middle_df.loc[x]['latitude'],middle_df.loc[x]['longitude'],\n",
" middle_stu_num_df.loc[y]['1_stu_num'],middle_stu_num_df.loc[y]['2_stu_num'],middle_stu_num_df.loc[y]['3_stu_num']]\n",
" high_arr.append(row)\n",
" \n",
"find_high_student_num()\n",
"columns=['school_name','school_addr','latitude','longitude','1_stu_num','2_stu_num','3_stu_num']\n",
"final_high_df=pd.DataFrame(middle_arr,columns=columns)\n",
"final_high_df.to_csv(r'final_high_school.csv')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
,시작,끝,총 시간
1교시,9:00,9:40,40
2교시,9:50,10:30,40
3교시,10:40,11:20,40
4교시,11:30,12:10,40
5교시,13:00,13:40,40
6교시,13:50,14:30,40
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
{
"cells": [
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 2374/2374 [1:28:59<00:00, 2.25s/it]\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>school_name</th>\n",
" <th>address</th>\n",
" <th>latitude</th>\n",
" <th>longitude</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>가락고등학교</td>\n",
" <td>서울특별시 송파구 송이로 42</td>\n",
" <td>37.493</td>\n",
" <td>127.125</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>가재울고등학교</td>\n",
" <td>서울특별시 서대문구 수색로 100-35</td>\n",
" <td>37.5773</td>\n",
" <td>126.903</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>강동고등학교</td>\n",
" <td>서울특별시 강동구 구천면로 572</td>\n",
" <td>37.5501</td>\n",
" <td>127.147</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>강서고등학교</td>\n",
" <td>서울특별시 양천구 목동중앙남로 27</td>\n",
" <td>37.5368</td>\n",
" <td>126.867</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>강서공업고등학교</td>\n",
" <td>서울특별시 강서구 방화대로47길 9</td>\n",
" <td>37.5762</td>\n",
" <td>126.815</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2369</th>\n",
" <td>표선고등학교</td>\n",
" <td>제주특별자치도 서귀포시 표선면 표선중앙로 22-15</td>\n",
" <td></td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>2370</th>\n",
" <td>한국뷰티고등학교</td>\n",
" <td>제주특별자치도 제주시 한경면 용고로 70</td>\n",
" <td></td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>2371</th>\n",
" <td>한림고등학교</td>\n",
" <td>제주특별자치도 제주시 한림읍 월계로 74</td>\n",
" <td></td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>2372</th>\n",
" <td>한림공업고등학교</td>\n",
" <td>제주특별자치도 제주시 한림읍 한림중앙로 87</td>\n",
" <td></td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>2373</th>\n",
" <td>함덕고등학교</td>\n",
" <td>제주특별자치도 제주시 조천읍 신흥로 9</td>\n",
" <td></td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>2374 rows × 4 columns</p>\n",
"</div>"
],
"text/plain": [
" school_name address latitude longitude\n",
"0 가락고등학교 서울특별시 송파구 송이로 42 37.493 127.125\n",
"1 가재울고등학교 서울특별시 서대문구 수색로 100-35 37.5773 126.903\n",
"2 강동고등학교 서울특별시 강동구 구천면로 572 37.5501 127.147\n",
"3 강서고등학교 서울특별시 양천구 목동중앙남로 27 37.5368 126.867\n",
"4 강서공업고등학교 서울특별시 강서구 방화대로47길 9 37.5762 126.815\n",
"... ... ... ... ...\n",
"2369 표선고등학교 제주특별자치도 서귀포시 표선면 표선중앙로 22-15 \n",
"2370 한국뷰티고등학교 제주특별자치도 제주시 한경면 용고로 70 \n",
"2371 한림고등학교 제주특별자치도 제주시 한림읍 월계로 74 \n",
"2372 한림공업고등학교 제주특별자치도 제주시 한림읍 한림중앙로 87 \n",
"2373 함덕고등학교 제주특별자치도 제주시 조천읍 신흥로 9 \n",
"\n",
"[2374 rows x 4 columns]"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from geopy.geocoders import Nominatim\n",
"from geopy.extra.rate_limiter import RateLimiter\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'elementary_middle_schools_location.csv'\n",
"file_name2 = basic_folder + 'school_info.csv'\n",
"df =pd.read_csv(file_name)\n",
"df2 =pd.read_csv(file_name2)\n",
"\n",
"latitude=df['위도']\n",
"longitude=df['경도']\n",
"\n",
"elementary=[]\n",
"middle=[]\n",
"high=[]\n",
"\n",
"count_row=df2.shape[0] #number of rows\n",
"geolocator = Nominatim(user_agent=\"lms\", timeout=10)\n",
"geocode = RateLimiter(geolocator.geocode, min_delay_seconds=1)\n",
"\n",
"def type_of_school():\n",
" for x in range(count_row):\n",
" type=df2.loc[x]['학교종류명']\n",
" if(type=='고등학교'):\n",
" if(df2.loc[x]['도로명주소']):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['도로명주소'],\"\",\"\"]\n",
" high.append(row)\n",
"\n",
"\n",
"type_of_school()\n",
"columns=['school_name','address','latitude','longitude']\n",
"high_df=pd.DataFrame(high,columns=columns)\n",
"\n",
"def find_lat_lon():\n",
" count_rw=high_df.shape[0]\n",
" for x in tqdm(range(count_rw)):\n",
" addr=high_df.loc[x]['address']\n",
" if geolocator.geocode(addr) is not None:\n",
" location=geolocator.geocode(addr)\n",
" high_df.loc[x]['latitude']=location.latitude\n",
" high_df.loc[x]['longitude']=location.longitude\n",
"\n",
"find_lat_lon()\n",
"high_df.to_csv(r'high_school.csv')\n",
"high_df"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from geopy.geocoders import Nominatim\n",
"from geopy.extra.rate_limiter import RateLimiter\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'high_school.csv'\n",
"\n",
"df =pd.read_csv(file_name)\n",
"count_row=df.shape[0]\n",
"print(count_row)\n",
"df"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
,시작,끝,총 시간
1교시,9:00,9:50,50
2교시,10:00,10:50,50
3교시,11:00,11:50,50
4교시,12:00,12:50,50
5교시,14:00,14:50,50
6교시,15:00,15:50,50
7교시,16:00,16:50,50
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
,시작,끝,총 시간
1교시,9:00,9:45,45
2교시,9:55,10:40,45
3교시,10:50,11:35,45
4교시,11:45,12:30,45
5교시,13:15,14:00,45
6교시,14:10,14:55,45
7교시,15:05,15:50,45
\ No newline at end of file
This diff could not be displayed because it is too large.
{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 21398/21398 [00:16<00:00, 1308.22it/s]\n"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name2 = basic_folder + '2019_students_num.csv'\n",
"df2 =pd.read_csv(file_name2)\n",
"\n",
"count_row=df2.shape[0] #number of rows\n",
"elementary=[]\n",
"middle=[]\n",
"high=[]\n",
"\n",
"def type_of_school():\n",
" for x in tqdm(range(count_row)):\n",
" type=df2.loc[x]['학교급']\n",
" if(type=='고등학교'):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['1학년_학생수_계'],df2.loc[x]['2학년_학생수_계'],df2.loc[x]['3학년_학생수_계']]\n",
" high.append(row)\n",
" elif(type=='중학교'):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['1학년_학생수_계'],df2.loc[x]['2학년_학생수_계'],df2.loc[x]['3학년_학생수_계']]\n",
" middle.append(row)\n",
" elif(type=='초등학교'):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['1학년_학생수_계'],df2.loc[x]['2학년_학생수_계'],df2.loc[x]['3학년_학생수_계'],df2.loc[x]['4학년_학생수_계'],df2.loc[x]['5학년_학생수_계'],df2.loc[x]['6학년_학생수_계']]\n",
" elementary.append(row)\n",
"\n",
"type_of_school()\n",
" \n",
"columns=['school_name','1_stu_num','2_stu_num','3_stu_num']\n",
"high_df=pd.DataFrame(high,columns=columns)\n",
"high_df.to_csv(r'high_school_stu_num.csv')\n",
"\n",
"middle_df=pd.DataFrame(middle,columns=columns)\n",
"middle_df.to_csv(r'middle_school_stu_num.csv')\n",
"\n",
"columns1=['school_name','1_stu_num','2_stu_num','3_stu_num','4_stu_num','5_stu_num','6_stu_num']\n",
"ele_df=pd.DataFrame(elementary,columns=columns1)\n",
"ele_df.to_csv(r'elementary_school_stu_num.csv')"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 11873/11873 [00:08<00:00, 1379.25it/s]\n"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'elementary_middle_schools_location.csv'\n",
"\n",
"df2 =pd.read_csv(file_name)\n",
"count_row=df2.shape[0]\n",
"\n",
"elementary=[]\n",
"middle=[]\n",
"\n",
"def type_of_school():\n",
" for x in tqdm(range(count_row)):\n",
" type=df2.loc[x]['학교급구분']\n",
" if(type=='중학교'):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['소재지도로명주소'],df2.loc[x]['위도'],df2.loc[x]['경도']]\n",
" middle.append(row)\n",
" elif(type=='초등학교'):\n",
" row=[df2.loc[x]['학교명'],df2.loc[x]['소재지도로명주소'],df2.loc[x]['위도'],df2.loc[x]['경도']]\n",
" elementary.append(row)\n",
"\n",
"type_of_school()\n",
"columns=['school_name','school_addr','latitude','longitude']\n",
"middle_df=pd.DataFrame(middle,columns=columns)\n",
"middle_df.to_csv(r'middle_school.csv')\n",
"\n",
"elem_df=pd.DataFrame(elementary,columns=columns)\n",
"elem_df.to_csv(r'elementary_school.csv')"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 3240/3240 [26:47<00:00, 2.02it/s]\n"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'middle_school.csv'\n",
"file_name2 = basic_folder + 'middle_school_stu_num.csv'\n",
"\n",
"middle_df =pd.read_csv(file_name)\n",
"middle_stu_num_df=pd.read_csv(file_name2)\n",
"\n",
"count_row=middle_df.shape[0]\n",
"count_row2=middle_stu_num_df.shape[0]\n",
"\n",
"middle_arr=[]\n",
"\n",
"def find_middle_student_num():\n",
" for x in tqdm(range(count_row)):\n",
" name=middle_df.loc[x]['school_name']\n",
" for y in range(count_row2):\n",
" if name == middle_stu_num_df.loc[y]['school_name']:\n",
" row=[middle_df.loc[x]['school_name'],middle_df.loc[x]['school_addr'],middle_df.loc[x]['latitude'],middle_df.loc[x]['longitude'],\n",
" middle_stu_num_df.loc[y]['1_stu_num'],middle_stu_num_df.loc[y]['2_stu_num'],middle_stu_num_df.loc[y]['3_stu_num']]\n",
" middle_arr.append(row)\n",
" \n",
"\n",
"find_middle_student_num()\n",
"columns=['school_name','school_addr','latitude','longitude','1_stu_num','2_stu_num','3_stu_num']\n",
"final_middle_df=pd.DataFrame(middle_arr,columns=columns)\n",
"final_middle_df.to_csv(r'final_middle_school.csv')"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 6278/6278 [1:38:36<00:00, 1.06it/s]\n"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'elementary_school.csv'\n",
"file_name2 = basic_folder + 'elementary_school_stu_num.csv'\n",
"\n",
"ele_df =pd.read_csv(file_name)\n",
"ele_stu_num_df=pd.read_csv(file_name2)\n",
"\n",
"count_row=ele_df.shape[0]\n",
"count_row2=ele_stu_num_df.shape[0]\n",
"\n",
"ele_arr=[]\n",
"\n",
"def find_ele_student_num():\n",
" for x in tqdm(range(count_row)):\n",
" name=ele_df.loc[x]['school_name']\n",
" for y in range(count_row2):\n",
" if name == ele_stu_num_df.loc[y]['school_name']:\n",
" row=[ele_df.loc[x]['school_name'],ele_df.loc[x]['school_addr'],ele_df.loc[x]['latitude'],ele_df.loc[x]['longitude'],\n",
" ele_stu_num_df.loc[y]['1_stu_num'],ele_stu_num_df.loc[y]['2_stu_num'],ele_stu_num_df.loc[y]['3_stu_num'],\n",
" ele_stu_num_df.loc[y]['4_stu_num'],ele_stu_num_df.loc[y]['5_stu_num'],ele_stu_num_df.loc[y]['6_stu_num']]\n",
" ele_arr.append(row)\n",
" \n",
"find_ele_student_num()\n",
"columns=['school_name','school_addr','latitude','longitude','1_stu_num','2_stu_num','3_stu_num','4_stu_num','5_stu_num','6_stu_num']\n",
"final_ele_df=pd.DataFrame(ele_arr,columns=columns)\n",
"final_ele_df.to_csv(r'final_ele_school.csv')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import pyspark\n",
"from tqdm import tqdm\n",
"\n",
"basic_folder = ''\n",
"file_name = basic_folder + 'high_school.csv'\n",
"file_name2 = basic_folder + 'high_school_stu_num.csv'\n",
"\n",
"middle_df =pd.read_csv(file_name)\n",
"middle_stu_num_df=pd.read_csv(file_name2)\n",
"\n",
"count_row=middle_df.shape[0]\n",
"count_row2=middle_stu_num_df.shape[0]\n",
"\n",
"high_arr=[]\n",
"\n",
"def find_high_student_num():\n",
" for x in tqdm(range(count_row)):\n",
" name=middle_df.loc[x]['school_name']\n",
" for y in range(count_row2):\n",
" if name == middle_stu_num_df.loc[y]['school_name']:\n",
" row=[middle_df.loc[x]['school_name'],middle_df.loc[x]['school_addr'],middle_df.loc[x]['latitude'],middle_df.loc[x]['longitude'],\n",
" middle_stu_num_df.loc[y]['1_stu_num'],middle_stu_num_df.loc[y]['2_stu_num'],middle_stu_num_df.loc[y]['3_stu_num']]\n",
" high_arr.append(row)\n",
" \n",
"find_high_student_num()\n",
"columns=['school_name','school_addr','latitude','longitude','1_stu_num','2_stu_num','3_stu_num']\n",
"final_high_df=pd.DataFrame(middle_arr,columns=columns)\n",
"final_high_df.to_csv(r'final_high_school.csv')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
학구ID,학구명,학구분류,시도코드,시도교육청코드,시도교육청명,교육지원청코드,교육지원청명,생성일자,변경일자,공간객체ID,데이터기준일자,제공기관코드,제공기관명,
Z000300001,동부학교군,0,11,7010000,서울특별시교육청,7021000,서울특별시동부교육지원청,2016-08-12,2016-08-12,28,2019-09-16,7001220,한국교원대학교,
Z000300002,서부학교군,0,11,7010000,서울특별시교육청,7031000,서울특별시서부교육지원청,2016-08-12,2016-08-12,9,2019-09-16,7001220,한국교원대학교,
Z000300003,남부학교군,0,11,7010000,서울특별시교육청,7041000,서울특별시남부교육지원청,2016-08-12,2016-08-12,8,2019-09-16,7001220,한국교원대학교,
Z000300004,북부학교군,0,11,7010000,서울특별시교육청,7051000,서울특별시북부교육지원청,2016-08-12,2016-08-12,14,2019-09-16,7001220,한국교원대학교,
Z000300005,중부학교군,0,11,7010000,서울특별시교육청,7061000,서울특별시중부교육지원청,2016-08-12,2016-08-12,10,2019-09-16,7001220,한국교원대학교,
Z000300006,강동송파학교군,0,11,7010000,서울특별시교육청,7130000,서울특별시강동송파교육지원청,2016-08-12,2016-08-12,15,2019-09-16,7001220,한국교원대학교,
Z000300007,강서학교군,0,11,7010000,서울특별시교육청,7081300,서울특별시강서양천교육지원청,2016-08-12,2016-08-12,26,2019-09-16,7001220,한국교원대학교,
Z000300008,강남학교군,0,11,7010000,서울특별시교육청,7091300,서울특별시강남서초교육지원청,2016-08-12,2016-08-12,16,2019-09-16,7001220,한국교원대학교,
Z000300009,동작관악학교군,0,11,7010000,서울특별시교육청,7132000,서울특별시동작관악교육지원청,2016-08-12,2016-08-12,17,2019-09-16,7001220,한국교원대학교,
Z000300010,성동광진학교군,0,11,7010000,서울특별시교육청,7134000,서울특별시성동광진교육지원청,2016-08-12,2016-08-12,29,2019-09-16,7001220,한국교원대학교,
Z000300011,성북학교군,0,11,7010000,서울특별시교육청,7121200,서울특별시성북강북교육지원청,2016-08-12,2016-08-12,13,2019-09-16,7001220,한국교원대학교,
Z000300012,서부고등학군,0,26,7150000,부산광역시교육청,7171000,부산광역시서부교육지원청,2016-08-12,2016-08-12,53,2019-09-16,7001220,한국교원대학교,
Z000300013,남부고등학군,0,26,7150000,부산광역시교육청,7181000,부산광역시남부교육지원청,2016-08-12,2016-08-12,23,2019-09-16,7001220,한국교원대학교,
Z000300014,동래고등학군,0,26,7150000,부산광역시교육청,7191000,부산광역시동래교육지원청,2016-08-12,2016-08-12,54,2019-09-16,7001220,한국교원대학교,
Z000300015,북부고등학군,0,26,7150000,부산광역시교육청,7201000,부산광역시북부교육지원청,2016-08-12,2016-08-12,21,2019-09-16,7001220,한국교원대학교,
Z000300016,해운대고등학군,0,26,7150000,부산광역시교육청,7211000,부산광역시해운대교육지원청,2016-08-12,2016-08-12,22,2019-09-16,7001220,한국교원대학교,
Z000300017,고등학교1학군,0,27,7240000,대구광역시교육청,7251000,대구광역시동부교육지원청,2016-08-12,2016-08-12,25,2019-09-16,7001220,한국교원대학교,
Z000300018,고등학교2학군,0,27,7240000,대구광역시교육청,7271000,대구광역시남부교육지원청,2016-08-12,2016-08-12,24,2019-09-16,7001220,한국교원대학교,
Z000300019,1학교군,0,28,7310000,인천광역시교육청,7321000,인천광역시남부교육지원청,2016-08-12,2016-08-12,55,2019-09-16,7001220,한국교원대학교,
Z000300020,2학교군,0,28,7310000,인천광역시교육청,7331000,인천광역시북부교육지원청,2016-08-12,2016-08-12,30,2019-09-16,7001220,한국교원대학교,
Z000300021,특수지고등학군,0,28,7310000,인천광역시교육청,7321000,인천광역시남부교육지원청,2016-08-12,2017-02-14,52,2019-09-16,7001220,한국교원대학교,
Z000300022,3학교군,0,28,7310000,인천광역시교육청,7361000,인천광역시서부교육지원청,2016-08-12,2016-08-12,31,2019-09-16,7001220,한국교원대학교,
Z000300023,광주광역시단일학교군,0,29,7380000,광주광역시교육청,7391000,광주광역시동부교육지원청,2016-08-12,2017-02-14,18,2019-09-16,7001220,한국교원대학교,
Z000300024,대전광역시단일학교군,0,30,7430000,대전광역시교육청,7441000,대전광역시동부교육지원청,2016-08-12,2016-08-12,48,2019-09-16,7001220,한국교원대학교,
Z000300025,동부학교군,0,31,7480000,울산광역시교육청,7491000,울산광역시강북교육지원청,2016-08-12,2016-08-12,20,2019-09-16,7001220,한국교원대학교,
Z000300026,북부학교군,0,31,7480000,울산광역시교육청,7491000,울산광역시강북교육지원청,2016-08-12,2016-08-12,19,2019-09-16,7001220,한국교원대학교,
Z000300027,중부학교군,0,31,7480000,울산광역시교육청,7491000,울산광역시강북교육지원청,2018-07-12,2018-07-12,58,2019-09-16,7001220,한국교원대학교,
Z000300028,남부학교군,0,31,7480000,울산광역시교육청,7501000,울산광역시강남교육지원청,2018-07-12,2018-07-12,59,2019-09-16,7001220,한국교원대학교,
Z000300029,언양특수학교군,0,31,7480000,울산광역시교육청,7501000,울산광역시강남교육지원청,2016-08-12,2016-08-12,27,2019-09-16,7001220,한국교원대학교,
Z000300030,수원1구역,0,41,7530000,경기도교육청,7541000,경기도수원교육지원청,2016-08-12,2016-08-12,51,2019-09-16,7001220,한국교원대학교,
Z000300031,수원2구역,0,41,7530000,경기도교육청,7541000,경기도수원교육지원청,2016-08-12,2016-08-12,50,2019-09-16,7001220,한국교원대학교,
Z000300032,성남1구역,0,41,7530000,경기도교육청,7551000,경기도성남교육지원청,2016-08-12,2016-08-12,47,2019-09-16,7001220,한국교원대학교,
Z000300033,성남2구역,0,41,7530000,경기도교육청,7551000,경기도성남교육지원청,2016-08-12,2016-08-12,39,2019-09-16,7001220,한국교원대학교,
Z000300034,의정부학군,0,41,7530000,경기도교육청,7561000,경기도의정부교육지원청,2016-08-12,2016-08-12,32,2019-09-16,7001220,한국교원대학교,
Z000300035,안양권1구역,0,41,7530000,경기도교육청,7569000,경기도안양과천교육지원청,2016-08-12,2016-08-12,45,2019-09-16,7001220,한국교원대학교,
Z000300036,안양권2구역,0,41,7530000,경기도교육청,7569000,경기도안양과천교육지원청,2016-08-12,2016-08-12,49,2019-09-16,7001220,한국교원대학교,
Z000300037,부천학군,0,41,7530000,경기도교육청,7581000,경기도부천교육지원청,2016-08-12,2016-08-12,34,2019-09-16,7001220,한국교원대학교,
Z000300038,광명학군,0,41,7530000,경기도교육청,7591000,경기도광명교육지원청,2016-08-12,2016-08-12,33,2019-09-16,7001220,한국교원대학교,
Z000300039,안산1구역,0,41,7530000,경기도교육청,7611000,경기도안산교육지원청,2016-08-12,2016-08-12,42,2019-09-16,7001220,한국교원대학교,
Z000300040,안산2구역,0,41,7530000,경기도교육청,7611000,경기도안산교육지원청,2016-08-12,2016-08-12,44,2019-09-16,7001220,한국교원대학교,
Z000300041,고양1구역,0,41,7530000,경기도교육청,7621000,경기도고양교육지원청,2016-08-12,2016-08-12,41,2019-09-16,7001220,한국교원대학교,
Z000300042,고양2구역,0,41,7530000,경기도교육청,7621000,경기도고양교육지원청,2016-08-12,2016-08-12,40,2019-09-16,7001220,한국교원대학교,
Z000300043,안양권3구역,0,41,7530000,경기도교육청,7642000,경기도군포의왕교육지원청,2016-08-12,2016-08-12,35,2019-09-16,7001220,한국교원대학교,
Z000300044,안양권4구역,0,41,7530000,경기도교육청,7642000,경기도군포의왕교육지원청,2016-08-12,2016-08-12,46,2019-09-16,7001220,한국교원대학교,
Z000300045,용인1구역,0,41,7530000,경기도교육청,7751000,경기도용인교육지원청,2016-08-12,2016-08-12,43,2019-09-16,7001220,한국교원대학교,
Z000300046,용인2구역,0,41,7530000,경기도교육청,7751000,경기도용인교육지원청,2016-08-12,2016-08-12,36,2019-09-16,7001220,한국교원대학교,
Z000300047,용인3구역,0,41,7530000,경기도교육청,7751000,경기도용인교육지원청,2016-08-12,2016-08-12,37,2019-09-16,7001220,한국교원대학교,
Z000300048,청주시고등학군,0,43,8000000,충청북도교육청,8011000,충청북도청주교육지원청,2016-08-12,2016-08-12,38,2019-09-16,7001220,한국교원대학교,
Z000300049,천안시학교군,0,44,8140000,충청남도교육청,8151000,충청남도천안교육지원청,2016-08-12,2016-08-12,4,2019-09-16,7001220,한국교원대학교,
Z000300050,전주시학교군,0,45,8320000,전라북도교육청,8331000,전라북도전주교육지원청,2016-08-12,2017-02-14,1,2019-09-16,7001220,한국교원대학교,
Z000300051,군산시학교군,0,45,8320000,전라북도교육청,8341000,전라북도군산교육지원청,2016-08-12,2016-08-12,5,2019-09-16,7001220,한국교원대학교,
Z000300052,익산시학교군,0,45,8320000,전라북도교육청,8351000,전라북도익산교육지원청,2016-08-12,2016-08-12,12,2019-09-16,7001220,한국교원대학교,
Z000300053,목포시제1학교군,0,46,8490000,전라남도교육청,8501000,전라남도목포교육지원청,2016-08-12,2016-08-12,6,2019-09-16,7001220,한국교원대학교,
Z000300054,여수시제2학교군,0,46,8490000,전라남도교육청,8511000,전라남도여수교육지원청,2016-08-12,2016-08-12,7,2019-09-16,7001220,한국교원대학교,
Z000300055,순천시제3학교군,0,46,8490000,전라남도교육청,8521000,전라남도순천교육지원청,2016-08-12,2016-08-12,2,2019-09-16,7001220,한국교원대학교,
Z000300056,포항시제1학교군,0,47,8750000,경상북도교육청,8761000,경상북도포항교육지원청,2016-08-12,2016-08-12,11,2019-09-16,7001220,한국교원대학교,
Z000300057,창원시제1학교군,0,48,9010000,경상남도교육청,9022000,경상남도창원교육지원청,2016-08-12,2019-07-16,62,2019-09-16,7001220,한국교원대학교,
Z000300058,창원시제2학교군,0,48,9010000,경상남도교육청,9022000,경상남도창원교육지원청,2016-08-12,2019-07-16,61,2019-09-16,7001220,한국교원대학교,
Z000300059,진주시제3학교군,0,48,9010000,경상남도교육청,9051000,경상남도진주교육지원청,2016-08-12,2016-08-12,57,2019-09-16,7001220,한국교원대학교,
Z000300060,김해시제4학교군,0,48,9010000,경상남도교육청,9091000,경상남도김해교육지원청,2016-08-12,2016-08-12,56,2019-09-16,7001220,한국교원대학교,
Z000300061,제주시학교군,0,50,9290000,제주특별자치도교육청,9296000,제주특별자치도제주시교육지원청,2016-08-12,2017-02-14,3,2019-09-16,7001220,한국교원대학교,
Z000300062,세종시고등학군,0,36,9300000,세종특별자치시교육청,9300000,세종특별자치시교육청,2018-11-05,2018-11-06,60,2019-09-16,7001220,한국교원대학교,
Z000300063,거제시제5학교군,0,48,9010000,경상남도교육청,9111000,경상남도거제교육지원청,2019-07-22,2019-07-22,63,2019-09-16,7001220,한국교원대학교,
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
{
"cells": [
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"' 84 124 234 129 6 144 71 159 201 98 238 146 286 38 23 144 112 177 176 59 175 135 108 7 107 144 179 125 96 186 185 201 316 162 204 218 110 250 185 126 175 173 168 58 100 118 235 318 117 308 89 393 165 401 185 207 142 100 140 38 137 143 316 25 102 31 115 42 173 118 13 21 148 169 242 192 229 209 266 135 129 103 96 174 127 305 57 92 76 127 234 250 177 105 187 101 177 216 204 178 197 245 189 144 11 12 79 397 150 103 142 95 126 238 339 225 334 207 215 165 153 179 327 109 143 230 202 123 240 243 106 177 74 121 155 97 144 9 128 191 185 145 132 207 136 107 187 124 268 116 235 4 189 123 188 247 148 144 177 125 246 142 106 11 6 172 107 131 262 161 102 119 234 143 211 181 355 337 259 224 221 157 172 175 133 134 139 118 277 106 312 79 8 186 306 226 163 110 14 251 143 138 147 122 252 181 171 141 141 7 148 122 25 102 252 97 87 339 44 160 94 58 330 60 123 6 77 71 61 93 128 64 107 187 176 99 289 21 125 239 89 96 79 45 98 163 5 54 177 147 182 163 420 89 3 422 409 122 333 126 139 171 16 171 136 147 113 119 158 215 136 31 186 177 115 132 104 318 177 174 114 264 307 110 68 31 321 188 27 85 11 2 178 7 202 11 207 142 167 62 42 293 91 34 180 226 433 242 12 448 376 378 210 37 208 196 67 90 151 129 321 217 258 431 260 485 107 178 157 234 138 114 184 214 - 51 102 161 146 155 205 143 185 112 112 280 192 186 104 13 111 158 187 192 142 142 247 78 249 119 226 12 139 353 114 355 206 173 368 57 325 223 20 214 116 267 4 272 134 214 101 130 295 350 172 4 338 177 290 72 113 148 260 120 324 105 167 103 144 399 119 109 164 268 204 190 304 327 149 136 23 185 229 108 108 162 171 82 76 164 102 232 167 226 119 6 148 278 243 124 213 211 68 158 236 81 73 194 411 224 142 174 106 196 98 98 6 5 88 98 14 42 17 68 176 167 123 117 85 95 188 280 265 69 11 108 212 150 130 61 76 38 73 75 195 310 100 179 268 193 342 184 363 306 111 51 14 170 143 137 211 150 172 164 207 290 175 158 194 117 221 177 209 265 225 143 194 128 56 187 131 - 8 121 132 100 149 205 113 249 115 136 377 343 172 180 153 151 135 121 117 105 311 137 160 164 247 78 249 132 157 71 164 136 77 80 53 129 79 78 72 71 142 102 93 142 156 234 129 6 98 5 153 121 183 164 128 131 144 176 128 96 144 115 187 124 268 88 98 14 42 17 68 153 101 106 138 - 60 10 39 97 112 161 100 130 347 281 140 136 103 98 144 105 124 213 60 220 152 149 73 15 119 87 114 94 136 109 102 89 163 88 256 200 225 222 230 56 187 131 - 8 187 194 195 221 167 62 42 275 161 208 223 229 48 250 195 153 146 104 4 104 79 147 117 101 102 187 171 197 196 5 200 63 118 137 178 90 71 142 35 234 115 100 140 38 173 121 129 176 70 50 214 36 140 174 189 158 74 150 99 34 99 91 117 8 156 184 166 103 257 257 171 16 38 3 365 6 29 13 102 46 80 152 89 178 58 107 157 108 185 102 360 280 139 100 232 154 194 109 403 192 61 - 233 4 205 83 393 165 215 303 198 185 394 153 201 327 211 203 110 168 179 71 179 143 186 350 172 4 338 175 173 168 279 216 50 82 42 133 131 108 98 233 109 175 86 100 199 99 264 307 110 201 202 194 92 62 404 165 278 262 35 7 141 107 144 179 221 64 207 94 238 339 157 198 348 68 210 246 87 339 308 294 47 98 196 259 249 247 78 249 374 109 76 38 73 157 257 163 79 55 59 398 127 50 260 201 173 225 8 125 136 377 130 347 281 411 224 142 78 98 80 47 4 127 308 181 206 209 112 88 64 276 203 250 191 81 290 72 113 104 133 100 183 152 272 194 10 188 143 211 77 174 86 2 110 408 136 251 10 151 5 142 64 189 144 11 12 79 123 22 215 154 217 107 187 177 216 204 223 216 127 187 124 268 78 223 203 99 34 143 43 113 3 1 343 197 140 80 219 186 104 13 52 102 211 51 102 56 70 17 41 117 103 174 114 168 12 330 77 80 53 103 142 85 109 168 3 106 85 269 129 216 97 112 225 232 262 244 113 305 33 244 14 350 172 4 338 42 201 4 25 113 266 101 115 274 108 97 235 317 196 78 267 149 105 3 143 23 367 194 109 210 235 318 117 308 107 166 108 353 12 119 130 157 100 68 146 286 38 23 372 189 288 223 91 202 210 223 434 172 194 64 356 195 180 106 197 209 235 268 270 147 299 305 252 308 337 121 60 152 140 149 192 112 172 100 381 325 223 20 186 80 146 165 68 118 155 181 382 373 218 110 250 185 163 162 168 107 79 126 126 205 143 185 416 113 302 98 233 351 360 79 370 493 303 210 313 136 23 8 25 97 7 149 165 12 6 47 4 2 25 77 106 102 127 65 69 239 69 171 70 143 106 84 190 157 157 198 348 231 85 8 78 157 264 284 117 100 14 55 127 201 173 225 8 38 143 162 142 214 169 127 123 168 216 174 181 293 177 209 122 117 171 36 189 252 88 155 184 170 310 117 175 181 94 44 104 118 172 8 130 184 135 156 106 177 74 149 187 182 163 111 200 177 223 248 202 110 12 335 311 166 174 106 312 79 8 249 172 29 31 146 155 60 167 118 277 69 202 70 131 144 176 194 117 372 106 126 3 215 184 251 297 60 100 190 167 62 42 253 100 223 85 70 83 163 111 101 143 353 81 351 176 41 173 118 13 21 141 40 127 16 36 78 98 37 99 162 132 59 60 285 281 160 87 39 163 79 157 151 148 302 11 7 62 63 66 90 54 36 252 178 237 242 201 139 177 280 291 409 125 107 183 89 459 249 61 171 137 112 68 106 297 44 316 88 303 33 329 178 183 14 153 106 107 218 203 171 159 117 197 372 106 195 78 164 181 227 244 221 275 54 227 130 188 3 192 142 129 174 195 195 118 136 224 193 194 117 184 349 225 187 69 202 161 80 224 149 282 121 247 122 260 203 201 90 148 82 147 130 347 281 170 166 169 101 117 105 311 258 279 216 186 10 136 242 250 281 145 301 146 60 52 16 146 286 38 23 28 103 30 - 179 188 68 210 101 175 275 32 362 6 77 18 90 181 59 398 264 12 256 82 115 192 182 326 225 6 327 - 98 118 77 237 265 233 310 102 252 97 50 152 364 57 111 269 215 297 262 197 296 83 113 109 264 330 181 301 55 195 140 72 232 232 82 167 185 202 194 92 136 100 134 222 88 58 166 126 111 99 150 118 142 236 142 200 232 211 68 156 233 101 52 158 164 173 18 254 147 191 27 151 140 170 257 211 405 221 450 227 342 175 173 168 127 131 219 158 344 109 98 238 25 97 7 80 62 93 135 172 118 190 163 110 14 162 171 82 389 67 38 1 170 310 209 260 120 268 264 145 221 5 249 4 130 205 198 118 109 128 143 316 25 102 31 154 217 233 83 198 447 166 108 181 128 87 187 187 138 66 176 410 406 109 175 178 301 97 288 186 64 371 3 215 205 224 149 282 279 157 83 218 341 200 253 189 230 231 153 91 210 58 330 245 145 101 181 255 303 258 319 75 267 243 122 299 192 108 212 180 31 181 94 233 227 244 221 69 185 29 166 339 147 11 223 216 107 194 389 170 199 90 196 227 400 5 169 311 185 394 165 326 210 359 139 185 229 347 4 245 298 204 120 224 334 4 347 366 199 22 215 177 216 204 267 171 287 284 302 95 182 163 290 215 61 116 158 38 43 180 20 22 125 187 194 318 156 313 285 228 243 122 134 118 137 164 259 113 237 124 74 191 142 106 11 6 203 222 288 223 145 332 292 240 243 219 360 98 212 214 121 60 135 40 149 100 139 229 397 188 - 420 89 3 65 268 264 322 290 260 143 125 79 256 299 351 156 244 152 241 260 120 70 287 250 86 119 109 15 62 294 47 253 38 364 102 360 280 362 157 177 253 291 354 197 371 389 190 44 283 13 176 287 324 353 424 169 95 170 7 20 10 56 94 46 63 91 54 27 378 201 173 225 8 122 323 406 152 165 388 125 239 496 331 429 363 306 156 92 231 192 284 188 323 181 293 307 150 385 384 311 315 193 127 56 279 88 27 50 131 144 176 214 223 110 120 55 61 238 16 395 9 322 117 372 280 375 102 215 303 41 193 111 51 14 43 127 60 36 17 175 282 180 341 164 78 233 145 130 61 58 42 21 11 4 158 21 161 138 152 156 284 285 342 184 325 223 20 38 19 18 11 137 176 240 41 14 12 24 23 29 122 25 19 20 38 119 214 229 22 58 141 7 148 52 19 83 56 187 131 - 8 43 242 12 41 368 248 171 10 250 309 218 205 143 185 371 186 187 205 250 236 280 130 188 3 177 56 180 34 292 118 136 117 105 311 314 251 126 12 42 201 178 143 171 278 229 156 184 217 274 105 187 360 79 370 156 74 150 343 327 90 250 359 91 117 8 155 112 272 236 232 12 164 130 281 7 297 314 12 106 288 207 207 215 165 275 299 247 180 265 209 163 217 68 15 23 107 120 264 242 170 127 305 207 111 113 97 235 215 303 284 160 294 144 156 164 303 66 323 253 171 198 90 91 222 157 264 284 299 136 107 24 295 257 311 250 435 157 198 348 261 352 93 42 194 254 162 62 70 58 89 6 4 46 55 20 150 154 117 103 174 139 129 136 116 390 170 228 175 312 214 123 53 93 128 204 80 119 177 165 24 10 - 143 106 42 11 19 28 88 98 14 42 17 68 14 162 80 56 12 71 172 108 171 15 19 10 100 140 38 11 108 7 11 213 170 28 274 224 222 271 146 143 31 301 140 30 12 6 168 3 4 15 172 6 265 247 122 273 151 25 270 142 219 277 247 195 140 192 108 148 29 121 155 7 14 6 98 6 5 5 80 10 3 186 251 228 223 42 194 254 163 194 313 40 127 16 36 130 13 202 8 191 2 147 134 11 104 191 146 104 4 100 28 12 78 14 49 80 75 8 75 177 71 172 176 173 116 6 8 119 6 98 144 136 100 3 12 5 8 - 22 130 34 3 2 267 171 158 4 6 4 10 - 29 232 124 232 12 18 5 24 91 73 11 11 40 1 2 31 347 4 245 8 89 15 6 74 2 11 420 89 3 18 7 5 186 10 6 38 1 59 5 180 34 51 60 6 14 22 75 24 5 5 1 10 11 45 15 105 98 43 73 50 92 113 3 1 10 52 68 389 67 5 12 163 5 11 71 210 37 72 16 36 6 66 21 64 30 25 97 7 251 10 172 131 105 114 158 141 7 148 186 6 129 162 226 180 323 9 264 174 5 297 262 102 232 167 250 191 347 4 245 290 405 221 296 202 157 151 151 313 186 166 228 148 177 81 132 104 163 111 109 173 118 13 21 165 192 166 166 192 124 163 20 163 110 14 7 8 7 12 2 188 27 169 166 174 132 168 168 21 4 4 3 7 10 142 106 11 6 5 418 209 178 129 19 18 10 20 101 77 5 190 75 60 41 14 6 168 142 4 19 15 19 10 296 83 113 109 202 194 92 86 2 110 4 15 18 169 151 29 108 143 316 25 102 31 39 45 105 3 8 14 25 6 3 90 124 76 37 89 176 35 21 3 128 88 98 14 42 17 68 33 11 92 39 10 60 9 218 206 215 166 385 312 319 305 348 89 282 377 127 46 256 285 291 377 163 192 107 50 101 123 39 15 50 53 60 115 117 196 54 74 52 14 4 15 33 14 226 12 8 200 225 176 121 18 290 72 113 27 7 21 7 2 6 7 40 238 319 227 314 303 286 8 250 268 21 305 33 321 150 106 312 79 8 15 5 44 68 259 289 156 181 153 46 45 10 8 78 50 75 192 61 23 12 48 368 57 51 59 14 91 92 21 12 8 353 12 53 195 162 262 115 42 40 12 128 111 17 18 5 235 4 9 27 85 289 21 16 199 90 52 63 27 85 11 2 3 73 15 173 18 13 16 87 15 30 3 170 7 234 129 6 8 5 121 53 193 82 30 38 17 143 23 9 178 164 22 6 202 11 68 31 143 316 25 102 31 111 51 14 135 40 149 8 5 139 135 55 3 44 15 13 14 3 23 20 273 360 79 370 184 219 42 91 54 28 17 14 214 223 40 7 42 34 301 203 52 200 77 230 68 121 71 176 154 235 139 233 37 288 278 166 299 144 57 258 139 56 144 71 232 117 91 175 208 147 185 267 233 180 198 254 129 268 202 231 229 139 166 141 166 145 25 71 9 26 14 13 1 40 122 169 196 99 223 225 137 131 145 102 232 167 173 161 139 35 5 3 11 151 5 8 11 2 24 14 33 130 111 105 137 130 86 2 110 23 17 4 5 7 2 30 3 21 3 22 225 6 3 24 25 138 136 133 134 75 13 14 350 4 9 14 4 334 4 2 9 13 48 77 78 105 79 107 8 8 8 35 172 29 5 9 41 34 61 53 211 153 28 33 42 23 170 28 262 35 7 4 33 63 101 7 4 190 44 40 18 7 144 9 8 10 142 106 11 6 3 20 18 - 108 27 7 2 3 158 21 5 67 8 9 249 4 36 362 6 4 58 22 201 173 225 8 1 2 69 11 12 6 77 223 54 8 40 74 45 9 7 12 12 16 322 117 111 178 7 400 5 98 6 5 173 118 13 21 5 5 147 11 221 5 286 8 6 75 84 186 64 60 52 113 13 9 113 3 1 2 1 3 7 2 24 53 - 156 99 33 168 56 231 233 168 180 149 167 166 170 42 201 162 178 80 148 98 124 124 189 69 185 129 162 162 115 80 102 166 6 3 31 22 11 5 3 8 6 70 71 91 90 218 193 218 130 191 212 188 280 216 41 21 141 - 60 10 39 46 65 7 8 12 7 1 12 4 44 5 - 101 219 132 107 118 170 143 131 7 5 2 8 68 57 10 17 15 13 35 70 16 73 62 59 12 12 12 83 76 70 4 9 4 14 19 6 7 15 6 13 16 6 59 14 4 136 31 22 79 45 34 55 20 10 13 44 6 283 13 5 55 161 199 3 11 12 5 97 207 46 24 183 14 17 10 10 10 14 75 78 9 4 3 4 11 11 171 169 14 18 18 101 7 4 126 12 30 134 11 11 186 104 13 43 77 82 147 45 14 3 7 12 - 20 3 3 6 107 51 23 11 6 301 30 20 12 12 87 33 14 - 13 9 62 125 132 106 44 5 65 15 7 12 21 38 177 56 14 49 20 30 6 77 223 13 38 98 65 9 15 19 10 11 50 19 16 26 6 19 172 8 4 110 66 21 64 14 15 10 13 8 20 22 5 16 4 3 7 30 6 233 4 205 6 8 2 175 131 242 240 228 263 162 171 82 77 80 53 118 135 40 149 118 174 97 207 88 94 144 115 64 450 17 159 117 103 174 232 232 200 149 2 130 188 3 10 281 7 85 8 77 16 395 9 8 35 6 2 7 1 108 185 157 160 46 157 137 55 127 126 129 127 97 79 15 101 34 23 7 350 4 9 13 197 76 98 50 75 106 177 74 75 94 95 34 10 10 6 187 154 154 190 307 150 157 151 150 171 10 253 7 5 19 6 156 164 151 140 161 106 274 84 65 228 176 217 226 226 13 202 230 284 95 214 273 185 82 42 98 164 4 7 2 8 54 24 126 133 62 125 189 123 132 106 103 43 36 6 23 12 4 202 110 12 120 296 83 113 109 150 118 123 6 117 171 36 6 101 7 4 14 9 7 2 112 30 116 147 117 101 205 113 51 148 29 17 19 73 15 1 10 8 8 4 38 3 10 7 5 103 149 100 8 22 8 34 8 10 20 226 34 233 4 205 205 202 76 255 143 138 139 143 10 186 6 13 64 11 8 3 4 68 57 - 60 10 77 5 21 4 19 26 4 88 98 14 42 17 68 6 26 31 12 9 62 3 3 20 8 4 28 34 7 4 301 55 57 53 30 2 3 1 5 64 65 16 4 323 9 39 103 189 144 11 12 79 8 60 2 2 233 83 60 13 5 174 5 7 264 12 15 122 123 145 332 117 143 73 73 42 267 4 40 127 16 36 45 61 42 2 56 187 131 - 8 4 314 12 98 5 12 125 96 6 14 146 286 38 23 7 9 7 7 174 30 57 2 11 7 3 39 24 100 14 1 6 29 232 124 145 163 126 101 102 360 280 116 411 224 142 50 214 59 38 31 100 232 207 146 101 22 130 113 284 95 81 73 196 67 145 164 172 212 66 113 127 60 147 117 101 278 243 240 67 83 246 353 114 283 240 229 204 205 57 206 218 146 202 97 124 222 33 87 194 6 77 223 224 149 282 19 73 101 68 5 5 161 102 91 30 169 159 197 222 168 200 254 66 146 221 227 283 253 91 117 8 21 8 194 10 8 6 285 182 100 203 123 191 107 144 179 8 22 12 150 5 85 11 2 4 100 70 75 77 253 38 8 191 170 2 7 20 12 236 225 56 52 77 235 318 117 308 334 278 213 114 184 97 114 157 257 118 109 188 100 174 186 166 60 115 119 349 3 194 313 350 172 4 338 253 291 179 292 380 19 176 29 92 27 169 172 240 41 60 89 40 127 16 36 31 23 11 11 16 253 184 335 135 215 225 218 110 250 185 333 225 211 16 38 21 88 27 58 180 31 45 8 8 8 45 14 46 2 14 6 112 82 2 203 13 34 45 10 106 14 25 87 53 39 45 45 39 46 196 5 7 173 118 13 21 189 144 11 12 79 190 157 168 177 360 88 98 14 42 17 68 246 272 209 265 315 356 216 6 70 37 66 21 64 111 25 26 146 104 4 202 110 12 68 68 14 27 7 42 11 112 30 12 211 16 41 44 17 18 24 23 61 26 86 143 316 25 102 31 10 60 14 118 100 68 15 10 18 13 103 101 76 76 101 52 6 18 1 - 61 48 17 17 12 4 17 24 9 230 358 307 235 165 268 264 371 368 215 205 186 206 200 29 92 62 44 87 104 73 15 56 157 262 35 7 106 312 79 8 15 6 5 200 133 164 53 190 133 109 189 144 11 12 79 15 10 108 134 75 37 88 9 62 267 298 90 151 195 - 218 110 250 185 257 258 197 231 239 296 83 113 109 45 115 24 184 335 236 225 231 5 64 44 109 15 29 90 108 123 43 64 364 57 142 35 170 287 48 102 252 97 166 183 225 286 309 115 176 290 42 194 254 242 350 4 9 213 51 102 167 299 362 191 334 188 100 232 185 218 253 414 61 106 165 112 44 23 36 188 459 60 29 232 124 279 153 54 8 358 102 237 304 232 16 395 9 323 278 333 325 234 100 226 192 263 117 171 36 128 25 270 380 319 218 227 282 65 282 157 264 284 275 10 5 51 174 264 307 110 263 221 203 281 7 3 6 9 10 235 262 425 351 94 256 131 451 103 141 239 35 234 250 76 38 73 278 235 318 117 308 121 39 259 247 302 292 334 253 143 328 256 34 159 227 42 406 162 72 305 351 292 34 13 23 184 236 74 121 255 303 175 250 195 310 194 257 66 35 135 279 20 124 322 276 126 223 54 26 186 20 84 31 157 13 32 288 22 261 332 180 '"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"import tensorflow as tf\n",
"import numpy as np\n",
"import pandas as pd\n",
"import os\n",
"\n",
"from tensorflow.keras.models import Sequential\n",
"from tensorflow.keras.layers import Input, Dense, GRU, Embedding\n",
"from tensorflow.keras.optimizers import RMSprop\n",
"from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint, TensorBoard, ReduceLROnPlateau\n",
"from tensorflow.keras.backend import square, mean\n",
"\n",
"basic_folder = '/Users/hyewon/Documents/capstone/2016104140/code/dataset/'\n",
"file_name = basic_folder + 'final_middle_school.csv'\n",
"file_name2=basic_folder + 'middle_timetable.csv'\n",
"df =pd.read_csv(file_name)\n",
"df2 =pd.read_csv(file_name2)\n",
"\n",
"target_location=['latitude','longitude']\n",
"target_names=['1_stu_num','2_stu_num','3_stu_num']\n",
"\n",
"\n",
"shift_days = 1\n",
"shift_steps = shift_days * 24\n",
"\n",
"df_targets = df[target_location][target_names].shift(-shift_steps)\n",
"df[target_location][target_names].shift(-shift_steps)\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
}
},
"nbformat": 4,
"nbformat_minor": 4
}