2501 lines
99 KiB
Plaintext
2501 lines
99 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"id": "ffcab11d",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import pandas as pd"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"id": "a4cda272",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"df: pd.DataFrame = pd.read_json(\"../temp/file_info.json\", orient='records')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 3,
|
|
"id": "09ee7182",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"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>Date</th>\n",
|
|
" <th>Media Type</th>\n",
|
|
" <th>Location</th>\n",
|
|
" <th>Download Link</th>\n",
|
|
" <th>Media Download Url</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2025-11-29 04:50:47+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.110836, -94.217804</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>2025-11-29 04:49:56+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.110767, -94.217705</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>2025-11-26 14:23:27+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354908, -93.96698</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>2025-11-26 14:18:45+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.355003, -93.96696</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>2025-11-16 17:58:59+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>Latitude, Longitude: 46.184643, -94.363495</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>2025-11-12 02:10:34+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354897, -93.96707</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>2025-11-07 04:43:52+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354797, -93.96702</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>2025-10-27 21:50:11+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354794, -93.967026</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>2025-10-16 06:39:29+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 40.4103, -104.70806</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>2025-10-14 20:46:28+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 40.432137, -104.76975</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" Date Media Type \\\n",
|
|
"0 2025-11-29 04:50:47+00:00 Video \n",
|
|
"1 2025-11-29 04:49:56+00:00 Video \n",
|
|
"2 2025-11-26 14:23:27+00:00 Video \n",
|
|
"3 2025-11-26 14:18:45+00:00 Video \n",
|
|
"4 2025-11-16 17:58:59+00:00 Image \n",
|
|
"5 2025-11-12 02:10:34+00:00 Video \n",
|
|
"6 2025-11-07 04:43:52+00:00 Video \n",
|
|
"7 2025-10-27 21:50:11+00:00 Video \n",
|
|
"8 2025-10-16 06:39:29+00:00 Video \n",
|
|
"9 2025-10-14 20:46:28+00:00 Video \n",
|
|
"\n",
|
|
" Location \\\n",
|
|
"0 Latitude, Longitude: 44.110836, -94.217804 \n",
|
|
"1 Latitude, Longitude: 44.110767, -94.217705 \n",
|
|
"2 Latitude, Longitude: 44.354908, -93.96698 \n",
|
|
"3 Latitude, Longitude: 44.355003, -93.96696 \n",
|
|
"4 Latitude, Longitude: 46.184643, -94.363495 \n",
|
|
"5 Latitude, Longitude: 44.354897, -93.96707 \n",
|
|
"6 Latitude, Longitude: 44.354797, -93.96702 \n",
|
|
"7 Latitude, Longitude: 44.354794, -93.967026 \n",
|
|
"8 Latitude, Longitude: 40.4103, -104.70806 \n",
|
|
"9 Latitude, Longitude: 40.432137, -104.76975 \n",
|
|
"\n",
|
|
" Download Link \\\n",
|
|
"0 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"1 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"2 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"3 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"4 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"5 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"6 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"7 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"8 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"9 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"\n",
|
|
" Media Download Url \n",
|
|
"0 https://us-east1-aws.api.snapchat.com/dmd/mm?u... \n",
|
|
"1 https://us-east1-aws.api.snapchat.com/dmd/mm?u... \n",
|
|
"2 https://us-east1-aws.api.snapchat.com/dmd/mm?u... \n",
|
|
"3 https://us-east1-aws.api.snapchat.com/dmd/mm?u... \n",
|
|
"4 https://us-east1-aws.api.snapchat.com/dmd/mm?u... \n",
|
|
"5 https://us-east1-aws.api.snapchat.com/dmd/mm?u... \n",
|
|
"6 https://us-east1-aws.api.snapchat.com/dmd/mm?u... \n",
|
|
"7 https://us-east1-aws.api.snapchat.com/dmd/mm?u... \n",
|
|
"8 https://us-east1-aws.api.snapchat.com/dmd/mm?u... \n",
|
|
"9 https://us-east1-aws.api.snapchat.com/dmd/mm?u... "
|
|
]
|
|
},
|
|
"execution_count": 3,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"df.head(10)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 4,
|
|
"id": "d8fb8fd5",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def get_join_col(row: pd.Series) -> pd.Series:\n",
|
|
" row['file_dt'] = f\"{row['Date'].strftime('%Y-%m-%d_%H-%M-%S')}\"\n",
|
|
" return row"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"id": "71007845",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def extract_lat_long(row: pd.Series) -> pd.Series:\n",
|
|
" coordinates = row[\"Location\"].split(\": \")[1]\n",
|
|
" lat_str, long_str = coordinates.split(\", \")\n",
|
|
" row[\"location_latitude\"] = round(float(lat_str), 5)\n",
|
|
" row[\"location_longitude\"] = round(float(long_str), 5)\n",
|
|
" return row"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"id": "68ed283f",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"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>Date</th>\n",
|
|
" <th>Media Type</th>\n",
|
|
" <th>Location</th>\n",
|
|
" <th>Download Link</th>\n",
|
|
" <th>Media Download Url</th>\n",
|
|
" <th>file_dt</th>\n",
|
|
" <th>location_latitude</th>\n",
|
|
" <th>location_longitude</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2025-11-29 04:50:47+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.110836, -94.217804</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-29_04-50-47</td>\n",
|
|
" <td>44.11084</td>\n",
|
|
" <td>-94.21780</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>2025-11-29 04:49:56+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.110767, -94.217705</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-29_04-49-56</td>\n",
|
|
" <td>44.11077</td>\n",
|
|
" <td>-94.21770</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>2025-11-26 14:23:27+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354908, -93.96698</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-26_14-23-27</td>\n",
|
|
" <td>44.35491</td>\n",
|
|
" <td>-93.96698</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>2025-11-26 14:18:45+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.355003, -93.96696</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-26_14-18-45</td>\n",
|
|
" <td>44.35500</td>\n",
|
|
" <td>-93.96696</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>2025-11-16 17:58:59+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>Latitude, Longitude: 46.184643, -94.363495</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-16_17-58-59</td>\n",
|
|
" <td>46.18464</td>\n",
|
|
" <td>-94.36350</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>2025-11-12 02:10:34+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354897, -93.96707</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-12_02-10-34</td>\n",
|
|
" <td>44.35490</td>\n",
|
|
" <td>-93.96707</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>2025-11-07 04:43:52+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354797, -93.96702</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-07_04-43-52</td>\n",
|
|
" <td>44.35480</td>\n",
|
|
" <td>-93.96702</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>2025-10-27 21:50:11+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354794, -93.967026</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-10-27_21-50-11</td>\n",
|
|
" <td>44.35479</td>\n",
|
|
" <td>-93.96703</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>2025-10-16 06:39:29+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 40.4103, -104.70806</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-10-16_06-39-29</td>\n",
|
|
" <td>40.41030</td>\n",
|
|
" <td>-104.70806</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>2025-10-14 20:46:28+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 40.432137, -104.76975</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-10-14_20-46-28</td>\n",
|
|
" <td>40.43214</td>\n",
|
|
" <td>-104.76975</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" Date Media Type \\\n",
|
|
"0 2025-11-29 04:50:47+00:00 Video \n",
|
|
"1 2025-11-29 04:49:56+00:00 Video \n",
|
|
"2 2025-11-26 14:23:27+00:00 Video \n",
|
|
"3 2025-11-26 14:18:45+00:00 Video \n",
|
|
"4 2025-11-16 17:58:59+00:00 Image \n",
|
|
"5 2025-11-12 02:10:34+00:00 Video \n",
|
|
"6 2025-11-07 04:43:52+00:00 Video \n",
|
|
"7 2025-10-27 21:50:11+00:00 Video \n",
|
|
"8 2025-10-16 06:39:29+00:00 Video \n",
|
|
"9 2025-10-14 20:46:28+00:00 Video \n",
|
|
"\n",
|
|
" Location \\\n",
|
|
"0 Latitude, Longitude: 44.110836, -94.217804 \n",
|
|
"1 Latitude, Longitude: 44.110767, -94.217705 \n",
|
|
"2 Latitude, Longitude: 44.354908, -93.96698 \n",
|
|
"3 Latitude, Longitude: 44.355003, -93.96696 \n",
|
|
"4 Latitude, Longitude: 46.184643, -94.363495 \n",
|
|
"5 Latitude, Longitude: 44.354897, -93.96707 \n",
|
|
"6 Latitude, Longitude: 44.354797, -93.96702 \n",
|
|
"7 Latitude, Longitude: 44.354794, -93.967026 \n",
|
|
"8 Latitude, Longitude: 40.4103, -104.70806 \n",
|
|
"9 Latitude, Longitude: 40.432137, -104.76975 \n",
|
|
"\n",
|
|
" Download Link \\\n",
|
|
"0 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"1 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"2 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"3 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"4 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"5 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"6 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"7 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"8 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"9 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"\n",
|
|
" Media Download Url file_dt \\\n",
|
|
"0 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-29_04-50-47 \n",
|
|
"1 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-29_04-49-56 \n",
|
|
"2 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-26_14-23-27 \n",
|
|
"3 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-26_14-18-45 \n",
|
|
"4 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-16_17-58-59 \n",
|
|
"5 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-12_02-10-34 \n",
|
|
"6 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-07_04-43-52 \n",
|
|
"7 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-10-27_21-50-11 \n",
|
|
"8 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-10-16_06-39-29 \n",
|
|
"9 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-10-14_20-46-28 \n",
|
|
"\n",
|
|
" location_latitude location_longitude \n",
|
|
"0 44.11084 -94.21780 \n",
|
|
"1 44.11077 -94.21770 \n",
|
|
"2 44.35491 -93.96698 \n",
|
|
"3 44.35500 -93.96696 \n",
|
|
"4 46.18464 -94.36350 \n",
|
|
"5 44.35490 -93.96707 \n",
|
|
"6 44.35480 -93.96702 \n",
|
|
"7 44.35479 -93.96703 \n",
|
|
"8 40.41030 -104.70806 \n",
|
|
"9 40.43214 -104.76975 "
|
|
]
|
|
},
|
|
"execution_count": 6,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"df = df.apply(get_join_col, axis=1)\n",
|
|
"df = df.apply(extract_lat_long, axis=1)\n",
|
|
"df.head(10)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"id": "9ed47e87",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Date datetime64[ns, UTC]\n",
|
|
"Media Type object\n",
|
|
"Location object\n",
|
|
"Download Link object\n",
|
|
"Media Download Url object\n",
|
|
"file_dt object\n",
|
|
"location_latitude float64\n",
|
|
"location_longitude float64\n",
|
|
"dtype: object\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(df.dtypes)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"id": "713d3202",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"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>file</th>\n",
|
|
" <th>createdate</th>\n",
|
|
" <th>gpslatitude</th>\n",
|
|
" <th>gpslongitude</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>../downloads/2019-04-05_23-27-17.jpg</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>../downloads/2024-10-23_00-29-09.jpg</td>\n",
|
|
" <td>2024:10:22 19:29:09</td>\n",
|
|
" <td>44 deg 6' 15.76\" N</td>\n",
|
|
" <td>94 deg 13' 10.52\" W</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>../downloads/2025-02-16_00-09-41.mp4</td>\n",
|
|
" <td>2025:02:16 00:09:41</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>../downloads/2023-03-10_22-11-18.jpg</td>\n",
|
|
" <td>2023:03:10 16:11:18</td>\n",
|
|
" <td>40 deg 24' 39.14\" N</td>\n",
|
|
" <td>104 deg 41' 33.90\" W</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>../downloads/2024-02-24_22-18-07.jpg</td>\n",
|
|
" <td>2024:02:24 16:18:07</td>\n",
|
|
" <td>40 deg 25' 17.09\" N</td>\n",
|
|
" <td>104 deg 45' 22.75\" W</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>../downloads/2020-10-24_03-27-27.mp4</td>\n",
|
|
" <td>2020:10:24 03:27:27</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>../downloads/2020-11-04_04-40-23.mp4</td>\n",
|
|
" <td>2020:11:04 04:40:23</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>../downloads/2018-12-26_06-49-23.mp4</td>\n",
|
|
" <td>2018:12:26 06:49:23</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>../downloads/2024-07-25_04-57-56.mp4</td>\n",
|
|
" <td>2024:07:25 04:57:56</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>../downloads/2022-09-15_23-53-02.jpg</td>\n",
|
|
" <td>2022:09:15 18:53:02</td>\n",
|
|
" <td>40 deg 25' 44.94\" N</td>\n",
|
|
" <td>104 deg 42' 57.92\" W</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" file createdate \\\n",
|
|
"0 ../downloads/2019-04-05_23-27-17.jpg - \n",
|
|
"1 ../downloads/2024-10-23_00-29-09.jpg 2024:10:22 19:29:09 \n",
|
|
"2 ../downloads/2025-02-16_00-09-41.mp4 2025:02:16 00:09:41 \n",
|
|
"3 ../downloads/2023-03-10_22-11-18.jpg 2023:03:10 16:11:18 \n",
|
|
"4 ../downloads/2024-02-24_22-18-07.jpg 2024:02:24 16:18:07 \n",
|
|
"5 ../downloads/2020-10-24_03-27-27.mp4 2020:10:24 03:27:27 \n",
|
|
"6 ../downloads/2020-11-04_04-40-23.mp4 2020:11:04 04:40:23 \n",
|
|
"7 ../downloads/2018-12-26_06-49-23.mp4 2018:12:26 06:49:23 \n",
|
|
"8 ../downloads/2024-07-25_04-57-56.mp4 2024:07:25 04:57:56 \n",
|
|
"9 ../downloads/2022-09-15_23-53-02.jpg 2022:09:15 18:53:02 \n",
|
|
"\n",
|
|
" gpslatitude gpslongitude \n",
|
|
"0 - - \n",
|
|
"1 44 deg 6' 15.76\" N 94 deg 13' 10.52\" W \n",
|
|
"2 - - \n",
|
|
"3 40 deg 24' 39.14\" N 104 deg 41' 33.90\" W \n",
|
|
"4 40 deg 25' 17.09\" N 104 deg 45' 22.75\" W \n",
|
|
"5 - - \n",
|
|
"6 - - \n",
|
|
"7 - - \n",
|
|
"8 - - \n",
|
|
"9 40 deg 25' 44.94\" N 104 deg 42' 57.92\" W "
|
|
]
|
|
},
|
|
"execution_count": 8,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"metadata = pd.read_csv(\"../temp/filemetadata.csv\", sep=\"#\")\n",
|
|
"metadata.head(10)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"id": "cb28dcd6",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import re\n",
|
|
"\n",
|
|
"def dms_to_decimal(dms_string):\n",
|
|
" \"\"\"\n",
|
|
" Converts a geographical coordinate string in Degrees, Minutes, Seconds (DMS)\n",
|
|
" format (e.g., \"44 deg 6' 15.76\" N\") to a decimal degree coordinate.\n",
|
|
"\n",
|
|
" Args:\n",
|
|
" dms_string (str): The DMS coordinate string.\n",
|
|
"\n",
|
|
" Returns:\n",
|
|
" float: The decimal degree equivalent.\n",
|
|
" \n",
|
|
" Raises:\n",
|
|
" ValueError: If the string format is not recognized.\n",
|
|
" \"\"\"\n",
|
|
" # Regex to capture Degrees, Minutes, Seconds, and Direction\n",
|
|
" # Pattern: (\\d+) deg (\\d+)' ([\\d.]+)\" ([NSEW])\n",
|
|
" # The pattern is flexible with leading zeros, extra spaces, and decimal seconds.\n",
|
|
" match = re.search(r\"(\\d+)\\s*deg\\s*(\\d+)'\\s*([\\d.]+)\\\"\\s*([NSEW])\", dms_string, re.IGNORECASE)\n",
|
|
"\n",
|
|
" if not match:\n",
|
|
" raise ValueError(f\"Coordinate format not recognized: {dms_string}\")\n",
|
|
"\n",
|
|
" # Extract the parts, ensuring they are converted to appropriate numerical types\n",
|
|
" degrees = float(match.group(1))\n",
|
|
" minutes = float(match.group(2))\n",
|
|
" seconds = float(match.group(3))\n",
|
|
" direction = match.group(4).upper()\n",
|
|
"\n",
|
|
" # Calculate the decimal degree value\n",
|
|
" decimal_degrees = degrees + (minutes / 60) + (seconds / 3600)\n",
|
|
"\n",
|
|
" # Apply the sign based on the direction (S and W are negative)\n",
|
|
" if direction in ['S', 'W']:\n",
|
|
" decimal_degrees *= -1\n",
|
|
" \n",
|
|
" decimal_degrees = round(decimal_degrees, 5)\n",
|
|
"\n",
|
|
" return decimal_degrees"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 10,
|
|
"id": "97ee9100",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def convert_lat_long_to_decimal_degrees(row: pd.Series) -> pd.Series:\n",
|
|
" # def convert(value: str) -> float:\n",
|
|
" # if pd.isna(value):\n",
|
|
" # return None\n",
|
|
" # if value == '-':\n",
|
|
" # return 0.0\n",
|
|
" # parts = value.strip().split(' ')\n",
|
|
" # degrees = float(parts[0])\n",
|
|
" # minutes = float(parts[1]) / 60\n",
|
|
" # seconds = float(parts[2]) / 3600\n",
|
|
" # direction = parts[3]\n",
|
|
" # decimal_degrees = degrees + minutes + seconds\n",
|
|
" # if direction in ['S', 'W']:\n",
|
|
" # decimal_degrees = -decimal_degrees\n",
|
|
" # return decimal_degrees\n",
|
|
" def convert(value: str) -> float:\n",
|
|
" if pd.isna(value):\n",
|
|
" return 0.0\n",
|
|
" if value == '-':\n",
|
|
" return 0.0\n",
|
|
" try:\n",
|
|
" return dms_to_decimal(value)\n",
|
|
" except ValueError:\n",
|
|
" return None\n",
|
|
" \n",
|
|
" row[\"Latitude\"] = convert(row[\"gpslatitude\"])\n",
|
|
" row[\"Longitude\"] = convert(row[\"gpslongitude\"])\n",
|
|
" return row"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 11,
|
|
"id": "8684b468",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def get_file_name(row: pd.Series) -> pd.Series:\n",
|
|
" path_parts = row['file'].split('/')\n",
|
|
" file = path_parts[-1]\n",
|
|
" row['filename'] = file\n",
|
|
" \n",
|
|
" row['extension'] = file.split('.')[-1].lower()\n",
|
|
" row['file_dt'] = file.split('.')[0]\n",
|
|
" return row"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 12,
|
|
"id": "6a1e641e",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"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>file</th>\n",
|
|
" <th>createdate</th>\n",
|
|
" <th>gpslatitude</th>\n",
|
|
" <th>gpslongitude</th>\n",
|
|
" <th>Latitude</th>\n",
|
|
" <th>Longitude</th>\n",
|
|
" <th>filename</th>\n",
|
|
" <th>extension</th>\n",
|
|
" <th>file_dt</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>../downloads/2019-04-05_23-27-17.jpg</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2019-04-05_23-27-17.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2019-04-05_23-27-17</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>../downloads/2024-10-23_00-29-09.jpg</td>\n",
|
|
" <td>2024:10:22 19:29:09</td>\n",
|
|
" <td>44 deg 6' 15.76\" N</td>\n",
|
|
" <td>94 deg 13' 10.52\" W</td>\n",
|
|
" <td>44.10438</td>\n",
|
|
" <td>-94.21959</td>\n",
|
|
" <td>2024-10-23_00-29-09.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2024-10-23_00-29-09</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>../downloads/2025-02-16_00-09-41.mp4</td>\n",
|
|
" <td>2025:02:16 00:09:41</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-02-16_00-09-41.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-02-16_00-09-41</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>../downloads/2023-03-10_22-11-18.jpg</td>\n",
|
|
" <td>2023:03:10 16:11:18</td>\n",
|
|
" <td>40 deg 24' 39.14\" N</td>\n",
|
|
" <td>104 deg 41' 33.90\" W</td>\n",
|
|
" <td>40.41087</td>\n",
|
|
" <td>-104.69275</td>\n",
|
|
" <td>2023-03-10_22-11-18.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2023-03-10_22-11-18</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>../downloads/2024-02-24_22-18-07.jpg</td>\n",
|
|
" <td>2024:02:24 16:18:07</td>\n",
|
|
" <td>40 deg 25' 17.09\" N</td>\n",
|
|
" <td>104 deg 45' 22.75\" W</td>\n",
|
|
" <td>40.42141</td>\n",
|
|
" <td>-104.75632</td>\n",
|
|
" <td>2024-02-24_22-18-07.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2024-02-24_22-18-07</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>../downloads/2020-10-24_03-27-27.mp4</td>\n",
|
|
" <td>2020:10:24 03:27:27</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2020-10-24_03-27-27.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2020-10-24_03-27-27</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>../downloads/2020-11-04_04-40-23.mp4</td>\n",
|
|
" <td>2020:11:04 04:40:23</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2020-11-04_04-40-23.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2020-11-04_04-40-23</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>../downloads/2018-12-26_06-49-23.mp4</td>\n",
|
|
" <td>2018:12:26 06:49:23</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2018-12-26_06-49-23.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2018-12-26_06-49-23</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>../downloads/2024-07-25_04-57-56.mp4</td>\n",
|
|
" <td>2024:07:25 04:57:56</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2024-07-25_04-57-56.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2024-07-25_04-57-56</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>../downloads/2022-09-15_23-53-02.jpg</td>\n",
|
|
" <td>2022:09:15 18:53:02</td>\n",
|
|
" <td>40 deg 25' 44.94\" N</td>\n",
|
|
" <td>104 deg 42' 57.92\" W</td>\n",
|
|
" <td>40.42915</td>\n",
|
|
" <td>-104.71609</td>\n",
|
|
" <td>2022-09-15_23-53-02.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2022-09-15_23-53-02</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" file createdate \\\n",
|
|
"0 ../downloads/2019-04-05_23-27-17.jpg - \n",
|
|
"1 ../downloads/2024-10-23_00-29-09.jpg 2024:10:22 19:29:09 \n",
|
|
"2 ../downloads/2025-02-16_00-09-41.mp4 2025:02:16 00:09:41 \n",
|
|
"3 ../downloads/2023-03-10_22-11-18.jpg 2023:03:10 16:11:18 \n",
|
|
"4 ../downloads/2024-02-24_22-18-07.jpg 2024:02:24 16:18:07 \n",
|
|
"5 ../downloads/2020-10-24_03-27-27.mp4 2020:10:24 03:27:27 \n",
|
|
"6 ../downloads/2020-11-04_04-40-23.mp4 2020:11:04 04:40:23 \n",
|
|
"7 ../downloads/2018-12-26_06-49-23.mp4 2018:12:26 06:49:23 \n",
|
|
"8 ../downloads/2024-07-25_04-57-56.mp4 2024:07:25 04:57:56 \n",
|
|
"9 ../downloads/2022-09-15_23-53-02.jpg 2022:09:15 18:53:02 \n",
|
|
"\n",
|
|
" gpslatitude gpslongitude Latitude Longitude \\\n",
|
|
"0 - - 0.00000 0.00000 \n",
|
|
"1 44 deg 6' 15.76\" N 94 deg 13' 10.52\" W 44.10438 -94.21959 \n",
|
|
"2 - - 0.00000 0.00000 \n",
|
|
"3 40 deg 24' 39.14\" N 104 deg 41' 33.90\" W 40.41087 -104.69275 \n",
|
|
"4 40 deg 25' 17.09\" N 104 deg 45' 22.75\" W 40.42141 -104.75632 \n",
|
|
"5 - - 0.00000 0.00000 \n",
|
|
"6 - - 0.00000 0.00000 \n",
|
|
"7 - - 0.00000 0.00000 \n",
|
|
"8 - - 0.00000 0.00000 \n",
|
|
"9 40 deg 25' 44.94\" N 104 deg 42' 57.92\" W 40.42915 -104.71609 \n",
|
|
"\n",
|
|
" filename extension file_dt \n",
|
|
"0 2019-04-05_23-27-17.jpg jpg 2019-04-05_23-27-17 \n",
|
|
"1 2024-10-23_00-29-09.jpg jpg 2024-10-23_00-29-09 \n",
|
|
"2 2025-02-16_00-09-41.mp4 mp4 2025-02-16_00-09-41 \n",
|
|
"3 2023-03-10_22-11-18.jpg jpg 2023-03-10_22-11-18 \n",
|
|
"4 2024-02-24_22-18-07.jpg jpg 2024-02-24_22-18-07 \n",
|
|
"5 2020-10-24_03-27-27.mp4 mp4 2020-10-24_03-27-27 \n",
|
|
"6 2020-11-04_04-40-23.mp4 mp4 2020-11-04_04-40-23 \n",
|
|
"7 2018-12-26_06-49-23.mp4 mp4 2018-12-26_06-49-23 \n",
|
|
"8 2024-07-25_04-57-56.mp4 mp4 2024-07-25_04-57-56 \n",
|
|
"9 2022-09-15_23-53-02.jpg jpg 2022-09-15_23-53-02 "
|
|
]
|
|
},
|
|
"execution_count": 12,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"meta = metadata.apply(convert_lat_long_to_decimal_degrees, axis=1)\n",
|
|
"meta = meta.apply(get_file_name, axis=1)\n",
|
|
"meta.head(10)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "45f49d31",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"# def get_datetime(row: pd.Series) -> pd.Series:\n",
|
|
"# from datetime import datetime\n",
|
|
"# try:\n",
|
|
"# row['datetime'] = datetime.strptime(row['file_dt'], '%Y-%m-%d_%H-%M-%S')\n",
|
|
"# except ValueError:\n",
|
|
"# row['datetime'] = None\n",
|
|
"# return row"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "e90842f2",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"# data = meta.apply(get_datetime, axis=1)\n",
|
|
"# data.head(10)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 13,
|
|
"id": "b284d40d",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"file object\n",
|
|
"createdate object\n",
|
|
"gpslatitude object\n",
|
|
"gpslongitude object\n",
|
|
"Latitude float64\n",
|
|
"Longitude float64\n",
|
|
"filename object\n",
|
|
"extension object\n",
|
|
"file_dt object\n",
|
|
"dtype: object\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(meta.dtypes)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 14,
|
|
"id": "543eecf8",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import pytz\n",
|
|
"def get_datetime_for_df(row: pd.Series) -> pd.Series:\n",
|
|
" from datetime import datetime\n",
|
|
" try:\n",
|
|
" row['createdate_mod'] = None\n",
|
|
" if row['createdate'] != '-':\n",
|
|
" createdate = datetime.strptime(row['createdate'], '%Y:%m:%d %H:%M:%S')\n",
|
|
" createdate_wtz = createdate.astimezone(pytz.timezone('America/Chicago'))\n",
|
|
" \n",
|
|
" row['createdate_mod'] = createdate_wtz\n",
|
|
" \n",
|
|
" \n",
|
|
" date = datetime.strptime(row['file_dt'], '%Y-%m-%d_%H-%M-%S')\n",
|
|
" dt_w_tz = date.astimezone(pytz.UTC)\n",
|
|
" # dt_w_tz = date.dtz_localize('UTC')\n",
|
|
" # dt_w_tz = date.tz_localize('UTC')\n",
|
|
" row['datetime'] = dt_w_tz\n",
|
|
" row['dt_join'] = f\"{dt_w_tz}\"\n",
|
|
" # row['datetime_str'] = dt_w_tz.strftime('%Y-%m-%d %H:%M:%S %Z')\n",
|
|
" # row['datetime'] = datetime.strptime(row['Date'], '%Y-%m-%d %H-%M-%S')\n",
|
|
" except ValueError:\n",
|
|
" row['createdate_mod'] = None\n",
|
|
" row['datetime'] = None\n",
|
|
" row['dt_join'] = ''\n",
|
|
" return row"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 15,
|
|
"id": "a162c993",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def get_media_type(row: pd.Series) -> pd.Series:\n",
|
|
" row['file_type'] = 'Unknown'\n",
|
|
" if row['extension'] == 'jpg':\n",
|
|
" row['file_type'] = 'Image'\n",
|
|
" if row['extension'] == 'mp4':\n",
|
|
" row['file_type'] = 'Video'\n",
|
|
" return row"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 16,
|
|
"id": "b57f9726",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"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>file</th>\n",
|
|
" <th>createdate</th>\n",
|
|
" <th>gpslatitude</th>\n",
|
|
" <th>gpslongitude</th>\n",
|
|
" <th>Latitude</th>\n",
|
|
" <th>Longitude</th>\n",
|
|
" <th>filename</th>\n",
|
|
" <th>extension</th>\n",
|
|
" <th>file_dt</th>\n",
|
|
" <th>createdate_mod</th>\n",
|
|
" <th>datetime</th>\n",
|
|
" <th>dt_join</th>\n",
|
|
" <th>file_type</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>../downloads/2019-04-05_23-27-17.jpg</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2019-04-05_23-27-17.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2019-04-05_23-27-17</td>\n",
|
|
" <td>NaT</td>\n",
|
|
" <td>2019-04-06 04:27:17+00:00</td>\n",
|
|
" <td>2019-04-06 04:27:17+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>../downloads/2024-10-23_00-29-09.jpg</td>\n",
|
|
" <td>2024:10:22 19:29:09</td>\n",
|
|
" <td>44 deg 6' 15.76\" N</td>\n",
|
|
" <td>94 deg 13' 10.52\" W</td>\n",
|
|
" <td>44.10438</td>\n",
|
|
" <td>-94.21959</td>\n",
|
|
" <td>2024-10-23_00-29-09.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2024-10-23_00-29-09</td>\n",
|
|
" <td>2024-10-22 19:29:09-05:00</td>\n",
|
|
" <td>2024-10-23 05:29:09+00:00</td>\n",
|
|
" <td>2024-10-23 05:29:09+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>../downloads/2025-02-16_00-09-41.mp4</td>\n",
|
|
" <td>2025:02:16 00:09:41</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-02-16_00-09-41.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-02-16_00-09-41</td>\n",
|
|
" <td>2025-02-16 00:09:41-06:00</td>\n",
|
|
" <td>2025-02-16 06:09:41+00:00</td>\n",
|
|
" <td>2025-02-16 06:09:41+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>../downloads/2023-03-10_22-11-18.jpg</td>\n",
|
|
" <td>2023:03:10 16:11:18</td>\n",
|
|
" <td>40 deg 24' 39.14\" N</td>\n",
|
|
" <td>104 deg 41' 33.90\" W</td>\n",
|
|
" <td>40.41087</td>\n",
|
|
" <td>-104.69275</td>\n",
|
|
" <td>2023-03-10_22-11-18.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2023-03-10_22-11-18</td>\n",
|
|
" <td>2023-03-10 16:11:18-06:00</td>\n",
|
|
" <td>2023-03-11 04:11:18+00:00</td>\n",
|
|
" <td>2023-03-11 04:11:18+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>../downloads/2024-02-24_22-18-07.jpg</td>\n",
|
|
" <td>2024:02:24 16:18:07</td>\n",
|
|
" <td>40 deg 25' 17.09\" N</td>\n",
|
|
" <td>104 deg 45' 22.75\" W</td>\n",
|
|
" <td>40.42141</td>\n",
|
|
" <td>-104.75632</td>\n",
|
|
" <td>2024-02-24_22-18-07.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2024-02-24_22-18-07</td>\n",
|
|
" <td>2024-02-24 16:18:07-06:00</td>\n",
|
|
" <td>2024-02-25 04:18:07+00:00</td>\n",
|
|
" <td>2024-02-25 04:18:07+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>../downloads/2020-10-24_03-27-27.mp4</td>\n",
|
|
" <td>2020:10:24 03:27:27</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2020-10-24_03-27-27.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2020-10-24_03-27-27</td>\n",
|
|
" <td>2020-10-24 03:27:27-05:00</td>\n",
|
|
" <td>2020-10-24 08:27:27+00:00</td>\n",
|
|
" <td>2020-10-24 08:27:27+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>../downloads/2020-11-04_04-40-23.mp4</td>\n",
|
|
" <td>2020:11:04 04:40:23</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2020-11-04_04-40-23.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2020-11-04_04-40-23</td>\n",
|
|
" <td>2020-11-04 04:40:23-06:00</td>\n",
|
|
" <td>2020-11-04 10:40:23+00:00</td>\n",
|
|
" <td>2020-11-04 10:40:23+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>../downloads/2018-12-26_06-49-23.mp4</td>\n",
|
|
" <td>2018:12:26 06:49:23</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2018-12-26_06-49-23.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2018-12-26_06-49-23</td>\n",
|
|
" <td>2018-12-26 06:49:23-06:00</td>\n",
|
|
" <td>2018-12-26 12:49:23+00:00</td>\n",
|
|
" <td>2018-12-26 12:49:23+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>../downloads/2024-07-25_04-57-56.mp4</td>\n",
|
|
" <td>2024:07:25 04:57:56</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2024-07-25_04-57-56.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2024-07-25_04-57-56</td>\n",
|
|
" <td>2024-07-25 04:57:56-05:00</td>\n",
|
|
" <td>2024-07-25 09:57:56+00:00</td>\n",
|
|
" <td>2024-07-25 09:57:56+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>../downloads/2022-09-15_23-53-02.jpg</td>\n",
|
|
" <td>2022:09:15 18:53:02</td>\n",
|
|
" <td>40 deg 25' 44.94\" N</td>\n",
|
|
" <td>104 deg 42' 57.92\" W</td>\n",
|
|
" <td>40.42915</td>\n",
|
|
" <td>-104.71609</td>\n",
|
|
" <td>2022-09-15_23-53-02.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2022-09-15_23-53-02</td>\n",
|
|
" <td>2022-09-15 18:53:02-05:00</td>\n",
|
|
" <td>2022-09-16 04:53:02+00:00</td>\n",
|
|
" <td>2022-09-16 04:53:02+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" file createdate \\\n",
|
|
"0 ../downloads/2019-04-05_23-27-17.jpg - \n",
|
|
"1 ../downloads/2024-10-23_00-29-09.jpg 2024:10:22 19:29:09 \n",
|
|
"2 ../downloads/2025-02-16_00-09-41.mp4 2025:02:16 00:09:41 \n",
|
|
"3 ../downloads/2023-03-10_22-11-18.jpg 2023:03:10 16:11:18 \n",
|
|
"4 ../downloads/2024-02-24_22-18-07.jpg 2024:02:24 16:18:07 \n",
|
|
"5 ../downloads/2020-10-24_03-27-27.mp4 2020:10:24 03:27:27 \n",
|
|
"6 ../downloads/2020-11-04_04-40-23.mp4 2020:11:04 04:40:23 \n",
|
|
"7 ../downloads/2018-12-26_06-49-23.mp4 2018:12:26 06:49:23 \n",
|
|
"8 ../downloads/2024-07-25_04-57-56.mp4 2024:07:25 04:57:56 \n",
|
|
"9 ../downloads/2022-09-15_23-53-02.jpg 2022:09:15 18:53:02 \n",
|
|
"\n",
|
|
" gpslatitude gpslongitude Latitude Longitude \\\n",
|
|
"0 - - 0.00000 0.00000 \n",
|
|
"1 44 deg 6' 15.76\" N 94 deg 13' 10.52\" W 44.10438 -94.21959 \n",
|
|
"2 - - 0.00000 0.00000 \n",
|
|
"3 40 deg 24' 39.14\" N 104 deg 41' 33.90\" W 40.41087 -104.69275 \n",
|
|
"4 40 deg 25' 17.09\" N 104 deg 45' 22.75\" W 40.42141 -104.75632 \n",
|
|
"5 - - 0.00000 0.00000 \n",
|
|
"6 - - 0.00000 0.00000 \n",
|
|
"7 - - 0.00000 0.00000 \n",
|
|
"8 - - 0.00000 0.00000 \n",
|
|
"9 40 deg 25' 44.94\" N 104 deg 42' 57.92\" W 40.42915 -104.71609 \n",
|
|
"\n",
|
|
" filename extension file_dt \\\n",
|
|
"0 2019-04-05_23-27-17.jpg jpg 2019-04-05_23-27-17 \n",
|
|
"1 2024-10-23_00-29-09.jpg jpg 2024-10-23_00-29-09 \n",
|
|
"2 2025-02-16_00-09-41.mp4 mp4 2025-02-16_00-09-41 \n",
|
|
"3 2023-03-10_22-11-18.jpg jpg 2023-03-10_22-11-18 \n",
|
|
"4 2024-02-24_22-18-07.jpg jpg 2024-02-24_22-18-07 \n",
|
|
"5 2020-10-24_03-27-27.mp4 mp4 2020-10-24_03-27-27 \n",
|
|
"6 2020-11-04_04-40-23.mp4 mp4 2020-11-04_04-40-23 \n",
|
|
"7 2018-12-26_06-49-23.mp4 mp4 2018-12-26_06-49-23 \n",
|
|
"8 2024-07-25_04-57-56.mp4 mp4 2024-07-25_04-57-56 \n",
|
|
"9 2022-09-15_23-53-02.jpg jpg 2022-09-15_23-53-02 \n",
|
|
"\n",
|
|
" createdate_mod datetime \\\n",
|
|
"0 NaT 2019-04-06 04:27:17+00:00 \n",
|
|
"1 2024-10-22 19:29:09-05:00 2024-10-23 05:29:09+00:00 \n",
|
|
"2 2025-02-16 00:09:41-06:00 2025-02-16 06:09:41+00:00 \n",
|
|
"3 2023-03-10 16:11:18-06:00 2023-03-11 04:11:18+00:00 \n",
|
|
"4 2024-02-24 16:18:07-06:00 2024-02-25 04:18:07+00:00 \n",
|
|
"5 2020-10-24 03:27:27-05:00 2020-10-24 08:27:27+00:00 \n",
|
|
"6 2020-11-04 04:40:23-06:00 2020-11-04 10:40:23+00:00 \n",
|
|
"7 2018-12-26 06:49:23-06:00 2018-12-26 12:49:23+00:00 \n",
|
|
"8 2024-07-25 04:57:56-05:00 2024-07-25 09:57:56+00:00 \n",
|
|
"9 2022-09-15 18:53:02-05:00 2022-09-16 04:53:02+00:00 \n",
|
|
"\n",
|
|
" dt_join file_type \n",
|
|
"0 2019-04-06 04:27:17+00:00 Image \n",
|
|
"1 2024-10-23 05:29:09+00:00 Image \n",
|
|
"2 2025-02-16 06:09:41+00:00 Video \n",
|
|
"3 2023-03-11 04:11:18+00:00 Image \n",
|
|
"4 2024-02-25 04:18:07+00:00 Image \n",
|
|
"5 2020-10-24 08:27:27+00:00 Video \n",
|
|
"6 2020-11-04 10:40:23+00:00 Video \n",
|
|
"7 2018-12-26 12:49:23+00:00 Video \n",
|
|
"8 2024-07-25 09:57:56+00:00 Video \n",
|
|
"9 2022-09-16 04:53:02+00:00 Image "
|
|
]
|
|
},
|
|
"execution_count": 16,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"data = meta.apply(get_datetime_for_df, axis=1)\n",
|
|
"data = data.apply(get_media_type, axis=1)\n",
|
|
"data.head(10)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 17,
|
|
"id": "cea52cd0",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"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>Date</th>\n",
|
|
" <th>Media Type</th>\n",
|
|
" <th>Location</th>\n",
|
|
" <th>Download Link</th>\n",
|
|
" <th>Media Download Url</th>\n",
|
|
" <th>file_dt</th>\n",
|
|
" <th>location_latitude</th>\n",
|
|
" <th>location_longitude</th>\n",
|
|
" <th>file</th>\n",
|
|
" <th>createdate</th>\n",
|
|
" <th>gpslatitude</th>\n",
|
|
" <th>gpslongitude</th>\n",
|
|
" <th>Latitude</th>\n",
|
|
" <th>Longitude</th>\n",
|
|
" <th>filename</th>\n",
|
|
" <th>extension</th>\n",
|
|
" <th>createdate_mod</th>\n",
|
|
" <th>datetime</th>\n",
|
|
" <th>dt_join</th>\n",
|
|
" <th>file_type</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2025-11-29 04:50:47+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.110836, -94.217804</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-29_04-50-47</td>\n",
|
|
" <td>44.11084</td>\n",
|
|
" <td>-94.21780</td>\n",
|
|
" <td>../downloads/2025-11-29_04-50-47.mp4</td>\n",
|
|
" <td>2025:11:29 04:50:47</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-11-29_04-50-47.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-11-29 04:50:47-06:00</td>\n",
|
|
" <td>2025-11-29 10:50:47+00:00</td>\n",
|
|
" <td>2025-11-29 10:50:47+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>2025-11-29 04:49:56+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.110767, -94.217705</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-29_04-49-56</td>\n",
|
|
" <td>44.11077</td>\n",
|
|
" <td>-94.21770</td>\n",
|
|
" <td>../downloads/2025-11-29_04-49-56.mp4</td>\n",
|
|
" <td>2025:11:29 04:49:56</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-11-29_04-49-56.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-11-29 04:49:56-06:00</td>\n",
|
|
" <td>2025-11-29 10:49:56+00:00</td>\n",
|
|
" <td>2025-11-29 10:49:56+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>2025-11-26 14:23:27+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354908, -93.96698</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-26_14-23-27</td>\n",
|
|
" <td>44.35491</td>\n",
|
|
" <td>-93.96698</td>\n",
|
|
" <td>../downloads/2025-11-26_14-23-27.mp4</td>\n",
|
|
" <td>2025:11:26 14:23:27</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-11-26_14-23-27.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-11-26 14:23:27-06:00</td>\n",
|
|
" <td>2025-11-26 20:23:27+00:00</td>\n",
|
|
" <td>2025-11-26 20:23:27+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>2025-11-26 14:18:45+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.355003, -93.96696</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-26_14-18-45</td>\n",
|
|
" <td>44.35500</td>\n",
|
|
" <td>-93.96696</td>\n",
|
|
" <td>../downloads/2025-11-26_14-18-45.mp4</td>\n",
|
|
" <td>2025:11:26 14:18:45</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-11-26_14-18-45.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-11-26 14:18:45-06:00</td>\n",
|
|
" <td>2025-11-26 20:18:45+00:00</td>\n",
|
|
" <td>2025-11-26 20:18:45+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>2025-11-16 17:58:59+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>Latitude, Longitude: 46.184643, -94.363495</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-16_17-58-59</td>\n",
|
|
" <td>46.18464</td>\n",
|
|
" <td>-94.36350</td>\n",
|
|
" <td>../downloads/2025-11-16_17-58-59.jpg</td>\n",
|
|
" <td>2025:11:16 11:58:59</td>\n",
|
|
" <td>46 deg 11' 4.71\" N</td>\n",
|
|
" <td>94 deg 21' 48.58\" W</td>\n",
|
|
" <td>46.18464</td>\n",
|
|
" <td>-94.36349</td>\n",
|
|
" <td>2025-11-16_17-58-59.jpg</td>\n",
|
|
" <td>jpg</td>\n",
|
|
" <td>2025-11-16 11:58:59-06:00</td>\n",
|
|
" <td>2025-11-16 23:58:59+00:00</td>\n",
|
|
" <td>2025-11-16 23:58:59+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>2025-11-12 02:10:34+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354897, -93.96707</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-12_02-10-34</td>\n",
|
|
" <td>44.35490</td>\n",
|
|
" <td>-93.96707</td>\n",
|
|
" <td>../downloads/2025-11-12_02-10-34.mp4</td>\n",
|
|
" <td>2025:11:12 02:10:34</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-11-12_02-10-34.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-11-12 02:10:34-06:00</td>\n",
|
|
" <td>2025-11-12 08:10:34+00:00</td>\n",
|
|
" <td>2025-11-12 08:10:34+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>2025-11-07 04:43:52+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354797, -93.96702</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-11-07_04-43-52</td>\n",
|
|
" <td>44.35480</td>\n",
|
|
" <td>-93.96702</td>\n",
|
|
" <td>../downloads/2025-11-07_04-43-52.mp4</td>\n",
|
|
" <td>2025:11:07 04:43:52</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-11-07_04-43-52.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-11-07 04:43:52-06:00</td>\n",
|
|
" <td>2025-11-07 10:43:52+00:00</td>\n",
|
|
" <td>2025-11-07 10:43:52+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>2025-10-27 21:50:11+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 44.354794, -93.967026</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-10-27_21-50-11</td>\n",
|
|
" <td>44.35479</td>\n",
|
|
" <td>-93.96703</td>\n",
|
|
" <td>../downloads/2025-10-27_21-50-11.mp4</td>\n",
|
|
" <td>2025:10:27 21:50:11</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-10-27_21-50-11.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-10-27 21:50:11-05:00</td>\n",
|
|
" <td>2025-10-28 02:50:11+00:00</td>\n",
|
|
" <td>2025-10-28 02:50:11+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>2025-10-16 06:39:29+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 40.4103, -104.70806</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-10-16_06-39-29</td>\n",
|
|
" <td>40.41030</td>\n",
|
|
" <td>-104.70806</td>\n",
|
|
" <td>../downloads/2025-10-16_06-39-29.mp4</td>\n",
|
|
" <td>2025:10:16 06:39:29</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-10-16_06-39-29.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-10-16 06:39:29-05:00</td>\n",
|
|
" <td>2025-10-16 11:39:29+00:00</td>\n",
|
|
" <td>2025-10-16 11:39:29+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>2025-10-14 20:46:28+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>Latitude, Longitude: 40.432137, -104.76975</td>\n",
|
|
" <td>https://app.snapchat.com/dmd/memories?uid=098c...</td>\n",
|
|
" <td>https://us-east1-aws.api.snapchat.com/dmd/mm?u...</td>\n",
|
|
" <td>2025-10-14_20-46-28</td>\n",
|
|
" <td>40.43214</td>\n",
|
|
" <td>-104.76975</td>\n",
|
|
" <td>../downloads/2025-10-14_20-46-28.mp4</td>\n",
|
|
" <td>2025:10:14 20:46:28</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>2025-10-14_20-46-28.mp4</td>\n",
|
|
" <td>mp4</td>\n",
|
|
" <td>2025-10-14 20:46:28-05:00</td>\n",
|
|
" <td>2025-10-15 01:46:28+00:00</td>\n",
|
|
" <td>2025-10-15 01:46:28+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" Date Media Type \\\n",
|
|
"0 2025-11-29 04:50:47+00:00 Video \n",
|
|
"1 2025-11-29 04:49:56+00:00 Video \n",
|
|
"2 2025-11-26 14:23:27+00:00 Video \n",
|
|
"3 2025-11-26 14:18:45+00:00 Video \n",
|
|
"4 2025-11-16 17:58:59+00:00 Image \n",
|
|
"5 2025-11-12 02:10:34+00:00 Video \n",
|
|
"6 2025-11-07 04:43:52+00:00 Video \n",
|
|
"7 2025-10-27 21:50:11+00:00 Video \n",
|
|
"8 2025-10-16 06:39:29+00:00 Video \n",
|
|
"9 2025-10-14 20:46:28+00:00 Video \n",
|
|
"\n",
|
|
" Location \\\n",
|
|
"0 Latitude, Longitude: 44.110836, -94.217804 \n",
|
|
"1 Latitude, Longitude: 44.110767, -94.217705 \n",
|
|
"2 Latitude, Longitude: 44.354908, -93.96698 \n",
|
|
"3 Latitude, Longitude: 44.355003, -93.96696 \n",
|
|
"4 Latitude, Longitude: 46.184643, -94.363495 \n",
|
|
"5 Latitude, Longitude: 44.354897, -93.96707 \n",
|
|
"6 Latitude, Longitude: 44.354797, -93.96702 \n",
|
|
"7 Latitude, Longitude: 44.354794, -93.967026 \n",
|
|
"8 Latitude, Longitude: 40.4103, -104.70806 \n",
|
|
"9 Latitude, Longitude: 40.432137, -104.76975 \n",
|
|
"\n",
|
|
" Download Link \\\n",
|
|
"0 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"1 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"2 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"3 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"4 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"5 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"6 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"7 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"8 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"9 https://app.snapchat.com/dmd/memories?uid=098c... \n",
|
|
"\n",
|
|
" Media Download Url file_dt \\\n",
|
|
"0 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-29_04-50-47 \n",
|
|
"1 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-29_04-49-56 \n",
|
|
"2 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-26_14-23-27 \n",
|
|
"3 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-26_14-18-45 \n",
|
|
"4 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-16_17-58-59 \n",
|
|
"5 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-12_02-10-34 \n",
|
|
"6 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-11-07_04-43-52 \n",
|
|
"7 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-10-27_21-50-11 \n",
|
|
"8 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-10-16_06-39-29 \n",
|
|
"9 https://us-east1-aws.api.snapchat.com/dmd/mm?u... 2025-10-14_20-46-28 \n",
|
|
"\n",
|
|
" location_latitude location_longitude \\\n",
|
|
"0 44.11084 -94.21780 \n",
|
|
"1 44.11077 -94.21770 \n",
|
|
"2 44.35491 -93.96698 \n",
|
|
"3 44.35500 -93.96696 \n",
|
|
"4 46.18464 -94.36350 \n",
|
|
"5 44.35490 -93.96707 \n",
|
|
"6 44.35480 -93.96702 \n",
|
|
"7 44.35479 -93.96703 \n",
|
|
"8 40.41030 -104.70806 \n",
|
|
"9 40.43214 -104.76975 \n",
|
|
"\n",
|
|
" file createdate \\\n",
|
|
"0 ../downloads/2025-11-29_04-50-47.mp4 2025:11:29 04:50:47 \n",
|
|
"1 ../downloads/2025-11-29_04-49-56.mp4 2025:11:29 04:49:56 \n",
|
|
"2 ../downloads/2025-11-26_14-23-27.mp4 2025:11:26 14:23:27 \n",
|
|
"3 ../downloads/2025-11-26_14-18-45.mp4 2025:11:26 14:18:45 \n",
|
|
"4 ../downloads/2025-11-16_17-58-59.jpg 2025:11:16 11:58:59 \n",
|
|
"5 ../downloads/2025-11-12_02-10-34.mp4 2025:11:12 02:10:34 \n",
|
|
"6 ../downloads/2025-11-07_04-43-52.mp4 2025:11:07 04:43:52 \n",
|
|
"7 ../downloads/2025-10-27_21-50-11.mp4 2025:10:27 21:50:11 \n",
|
|
"8 ../downloads/2025-10-16_06-39-29.mp4 2025:10:16 06:39:29 \n",
|
|
"9 ../downloads/2025-10-14_20-46-28.mp4 2025:10:14 20:46:28 \n",
|
|
"\n",
|
|
" gpslatitude gpslongitude Latitude Longitude \\\n",
|
|
"0 - - 0.00000 0.00000 \n",
|
|
"1 - - 0.00000 0.00000 \n",
|
|
"2 - - 0.00000 0.00000 \n",
|
|
"3 - - 0.00000 0.00000 \n",
|
|
"4 46 deg 11' 4.71\" N 94 deg 21' 48.58\" W 46.18464 -94.36349 \n",
|
|
"5 - - 0.00000 0.00000 \n",
|
|
"6 - - 0.00000 0.00000 \n",
|
|
"7 - - 0.00000 0.00000 \n",
|
|
"8 - - 0.00000 0.00000 \n",
|
|
"9 - - 0.00000 0.00000 \n",
|
|
"\n",
|
|
" filename extension createdate_mod \\\n",
|
|
"0 2025-11-29_04-50-47.mp4 mp4 2025-11-29 04:50:47-06:00 \n",
|
|
"1 2025-11-29_04-49-56.mp4 mp4 2025-11-29 04:49:56-06:00 \n",
|
|
"2 2025-11-26_14-23-27.mp4 mp4 2025-11-26 14:23:27-06:00 \n",
|
|
"3 2025-11-26_14-18-45.mp4 mp4 2025-11-26 14:18:45-06:00 \n",
|
|
"4 2025-11-16_17-58-59.jpg jpg 2025-11-16 11:58:59-06:00 \n",
|
|
"5 2025-11-12_02-10-34.mp4 mp4 2025-11-12 02:10:34-06:00 \n",
|
|
"6 2025-11-07_04-43-52.mp4 mp4 2025-11-07 04:43:52-06:00 \n",
|
|
"7 2025-10-27_21-50-11.mp4 mp4 2025-10-27 21:50:11-05:00 \n",
|
|
"8 2025-10-16_06-39-29.mp4 mp4 2025-10-16 06:39:29-05:00 \n",
|
|
"9 2025-10-14_20-46-28.mp4 mp4 2025-10-14 20:46:28-05:00 \n",
|
|
"\n",
|
|
" datetime dt_join file_type \n",
|
|
"0 2025-11-29 10:50:47+00:00 2025-11-29 10:50:47+00:00 Video \n",
|
|
"1 2025-11-29 10:49:56+00:00 2025-11-29 10:49:56+00:00 Video \n",
|
|
"2 2025-11-26 20:23:27+00:00 2025-11-26 20:23:27+00:00 Video \n",
|
|
"3 2025-11-26 20:18:45+00:00 2025-11-26 20:18:45+00:00 Video \n",
|
|
"4 2025-11-16 23:58:59+00:00 2025-11-16 23:58:59+00:00 Image \n",
|
|
"5 2025-11-12 08:10:34+00:00 2025-11-12 08:10:34+00:00 Video \n",
|
|
"6 2025-11-07 10:43:52+00:00 2025-11-07 10:43:52+00:00 Video \n",
|
|
"7 2025-10-28 02:50:11+00:00 2025-10-28 02:50:11+00:00 Video \n",
|
|
"8 2025-10-16 11:39:29+00:00 2025-10-16 11:39:29+00:00 Video \n",
|
|
"9 2025-10-15 01:46:28+00:00 2025-10-15 01:46:28+00:00 Video "
|
|
]
|
|
},
|
|
"execution_count": 17,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"joined = pd.merge(df, data, how='left', left_on='file_dt', right_on='file_dt', suffixes=('_df', '_meta'))\n",
|
|
"joined.head(10)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 18,
|
|
"id": "3f350445",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"col_mapper = {\n",
|
|
" 'Date': 'correct_date_utc',\n",
|
|
" 'Media Type': 'correct_media_type',\n",
|
|
" # 'Location': 'correct_location',\n",
|
|
" 'location_latitude': 'correct_latitude',\n",
|
|
" 'location_longitude': 'correct_longitude',\n",
|
|
" 'file': 'path',\n",
|
|
" 'createdate': 'actual_date_cst',\n",
|
|
" 'Latitude': 'actual_latitude',\n",
|
|
" 'Longitude': 'actual_longitude',\n",
|
|
" # 'extension': 'actual_extension',\n",
|
|
" 'file_type': 'actual_media_type'\n",
|
|
"}"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 19,
|
|
"id": "07ac5dd2",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"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>correct_date_utc</th>\n",
|
|
" <th>correct_media_type</th>\n",
|
|
" <th>correct_latitude</th>\n",
|
|
" <th>correct_longitude</th>\n",
|
|
" <th>path</th>\n",
|
|
" <th>actual_date_cst</th>\n",
|
|
" <th>actual_latitude</th>\n",
|
|
" <th>actual_longitude</th>\n",
|
|
" <th>actual_media_type</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2025-11-29 04:50:47+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.11084</td>\n",
|
|
" <td>-94.21780</td>\n",
|
|
" <td>../downloads/2025-11-29_04-50-47.mp4</td>\n",
|
|
" <td>2025:11:29 04:50:47</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>2025-11-29 04:49:56+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.11077</td>\n",
|
|
" <td>-94.21770</td>\n",
|
|
" <td>../downloads/2025-11-29_04-49-56.mp4</td>\n",
|
|
" <td>2025:11:29 04:49:56</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>2025-11-26 14:23:27+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.35491</td>\n",
|
|
" <td>-93.96698</td>\n",
|
|
" <td>../downloads/2025-11-26_14-23-27.mp4</td>\n",
|
|
" <td>2025:11:26 14:23:27</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>2025-11-26 14:18:45+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.35500</td>\n",
|
|
" <td>-93.96696</td>\n",
|
|
" <td>../downloads/2025-11-26_14-18-45.mp4</td>\n",
|
|
" <td>2025:11:26 14:18:45</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>2025-11-16 17:58:59+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>46.18464</td>\n",
|
|
" <td>-94.36350</td>\n",
|
|
" <td>../downloads/2025-11-16_17-58-59.jpg</td>\n",
|
|
" <td>2025:11:16 11:58:59</td>\n",
|
|
" <td>46.18464</td>\n",
|
|
" <td>-94.36349</td>\n",
|
|
" <td>Image</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>2025-11-12 02:10:34+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.35490</td>\n",
|
|
" <td>-93.96707</td>\n",
|
|
" <td>../downloads/2025-11-12_02-10-34.mp4</td>\n",
|
|
" <td>2025:11:12 02:10:34</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>2025-11-07 04:43:52+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.35480</td>\n",
|
|
" <td>-93.96702</td>\n",
|
|
" <td>../downloads/2025-11-07_04-43-52.mp4</td>\n",
|
|
" <td>2025:11:07 04:43:52</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>2025-10-27 21:50:11+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.35479</td>\n",
|
|
" <td>-93.96703</td>\n",
|
|
" <td>../downloads/2025-10-27_21-50-11.mp4</td>\n",
|
|
" <td>2025:10:27 21:50:11</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>2025-10-16 06:39:29+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>40.41030</td>\n",
|
|
" <td>-104.70806</td>\n",
|
|
" <td>../downloads/2025-10-16_06-39-29.mp4</td>\n",
|
|
" <td>2025:10:16 06:39:29</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>2025-10-14 20:46:28+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>40.43214</td>\n",
|
|
" <td>-104.76975</td>\n",
|
|
" <td>../downloads/2025-10-14_20-46-28.mp4</td>\n",
|
|
" <td>2025:10:14 20:46:28</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" correct_date_utc correct_media_type correct_latitude \\\n",
|
|
"0 2025-11-29 04:50:47+00:00 Video 44.11084 \n",
|
|
"1 2025-11-29 04:49:56+00:00 Video 44.11077 \n",
|
|
"2 2025-11-26 14:23:27+00:00 Video 44.35491 \n",
|
|
"3 2025-11-26 14:18:45+00:00 Video 44.35500 \n",
|
|
"4 2025-11-16 17:58:59+00:00 Image 46.18464 \n",
|
|
"5 2025-11-12 02:10:34+00:00 Video 44.35490 \n",
|
|
"6 2025-11-07 04:43:52+00:00 Video 44.35480 \n",
|
|
"7 2025-10-27 21:50:11+00:00 Video 44.35479 \n",
|
|
"8 2025-10-16 06:39:29+00:00 Video 40.41030 \n",
|
|
"9 2025-10-14 20:46:28+00:00 Video 40.43214 \n",
|
|
"\n",
|
|
" correct_longitude path \\\n",
|
|
"0 -94.21780 ../downloads/2025-11-29_04-50-47.mp4 \n",
|
|
"1 -94.21770 ../downloads/2025-11-29_04-49-56.mp4 \n",
|
|
"2 -93.96698 ../downloads/2025-11-26_14-23-27.mp4 \n",
|
|
"3 -93.96696 ../downloads/2025-11-26_14-18-45.mp4 \n",
|
|
"4 -94.36350 ../downloads/2025-11-16_17-58-59.jpg \n",
|
|
"5 -93.96707 ../downloads/2025-11-12_02-10-34.mp4 \n",
|
|
"6 -93.96702 ../downloads/2025-11-07_04-43-52.mp4 \n",
|
|
"7 -93.96703 ../downloads/2025-10-27_21-50-11.mp4 \n",
|
|
"8 -104.70806 ../downloads/2025-10-16_06-39-29.mp4 \n",
|
|
"9 -104.76975 ../downloads/2025-10-14_20-46-28.mp4 \n",
|
|
"\n",
|
|
" actual_date_cst actual_latitude actual_longitude actual_media_type \n",
|
|
"0 2025:11:29 04:50:47 0.00000 0.00000 Video \n",
|
|
"1 2025:11:29 04:49:56 0.00000 0.00000 Video \n",
|
|
"2 2025:11:26 14:23:27 0.00000 0.00000 Video \n",
|
|
"3 2025:11:26 14:18:45 0.00000 0.00000 Video \n",
|
|
"4 2025:11:16 11:58:59 46.18464 -94.36349 Image \n",
|
|
"5 2025:11:12 02:10:34 0.00000 0.00000 Video \n",
|
|
"6 2025:11:07 04:43:52 0.00000 0.00000 Video \n",
|
|
"7 2025:10:27 21:50:11 0.00000 0.00000 Video \n",
|
|
"8 2025:10:16 06:39:29 0.00000 0.00000 Video \n",
|
|
"9 2025:10:14 20:46:28 0.00000 0.00000 Video "
|
|
]
|
|
},
|
|
"execution_count": 19,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"df0 = joined[col_mapper.keys()].rename(columns=col_mapper)\n",
|
|
"df0.head(10)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 23,
|
|
"id": "192561b3",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def check_for_errors(row: pd.Series) -> pd.Series:\n",
|
|
" errors = 0\n",
|
|
" if row[\"correct_media_type\"] != row['actual_media_type']:\n",
|
|
" errors += 1\n",
|
|
" if row[\"actual_latitude\"] == 0.00 and row[\"correct_media_type\"] == \"Image\":\n",
|
|
" if row['correct_latitude'] != 0.00:\n",
|
|
" errors +=1\n",
|
|
" if row[\"actual_date_cst\"] == '-':\n",
|
|
" errors +=1\n",
|
|
" if pd.isna(row['path']):\n",
|
|
" errors +=1\n",
|
|
" row[\"errors\"] = errors\n",
|
|
" return row"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 24,
|
|
"id": "c89101b9",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"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>correct_date_utc</th>\n",
|
|
" <th>correct_media_type</th>\n",
|
|
" <th>correct_latitude</th>\n",
|
|
" <th>correct_longitude</th>\n",
|
|
" <th>path</th>\n",
|
|
" <th>actual_date_cst</th>\n",
|
|
" <th>actual_latitude</th>\n",
|
|
" <th>actual_longitude</th>\n",
|
|
" <th>actual_media_type</th>\n",
|
|
" <th>errors</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2025-11-29 04:50:47+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.11084</td>\n",
|
|
" <td>-94.21780</td>\n",
|
|
" <td>../downloads/2025-11-29_04-50-47.mp4</td>\n",
|
|
" <td>2025:11:29 04:50:47</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>2025-11-29 04:49:56+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.11077</td>\n",
|
|
" <td>-94.21770</td>\n",
|
|
" <td>../downloads/2025-11-29_04-49-56.mp4</td>\n",
|
|
" <td>2025:11:29 04:49:56</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>2025-11-26 14:23:27+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.35491</td>\n",
|
|
" <td>-93.96698</td>\n",
|
|
" <td>../downloads/2025-11-26_14-23-27.mp4</td>\n",
|
|
" <td>2025:11:26 14:23:27</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>2025-11-26 14:18:45+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.35500</td>\n",
|
|
" <td>-93.96696</td>\n",
|
|
" <td>../downloads/2025-11-26_14-18-45.mp4</td>\n",
|
|
" <td>2025:11:26 14:18:45</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>2025-11-16 17:58:59+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>46.18464</td>\n",
|
|
" <td>-94.36350</td>\n",
|
|
" <td>../downloads/2025-11-16_17-58-59.jpg</td>\n",
|
|
" <td>2025:11:16 11:58:59</td>\n",
|
|
" <td>46.18464</td>\n",
|
|
" <td>-94.36349</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>2025-11-12 02:10:34+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.35490</td>\n",
|
|
" <td>-93.96707</td>\n",
|
|
" <td>../downloads/2025-11-12_02-10-34.mp4</td>\n",
|
|
" <td>2025:11:12 02:10:34</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>2025-11-07 04:43:52+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.35480</td>\n",
|
|
" <td>-93.96702</td>\n",
|
|
" <td>../downloads/2025-11-07_04-43-52.mp4</td>\n",
|
|
" <td>2025:11:07 04:43:52</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>2025-10-27 21:50:11+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.35479</td>\n",
|
|
" <td>-93.96703</td>\n",
|
|
" <td>../downloads/2025-10-27_21-50-11.mp4</td>\n",
|
|
" <td>2025:10:27 21:50:11</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>2025-10-16 06:39:29+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>40.41030</td>\n",
|
|
" <td>-104.70806</td>\n",
|
|
" <td>../downloads/2025-10-16_06-39-29.mp4</td>\n",
|
|
" <td>2025:10:16 06:39:29</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>2025-10-14 20:46:28+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>40.43214</td>\n",
|
|
" <td>-104.76975</td>\n",
|
|
" <td>../downloads/2025-10-14_20-46-28.mp4</td>\n",
|
|
" <td>2025:10:14 20:46:28</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" correct_date_utc correct_media_type correct_latitude \\\n",
|
|
"0 2025-11-29 04:50:47+00:00 Video 44.11084 \n",
|
|
"1 2025-11-29 04:49:56+00:00 Video 44.11077 \n",
|
|
"2 2025-11-26 14:23:27+00:00 Video 44.35491 \n",
|
|
"3 2025-11-26 14:18:45+00:00 Video 44.35500 \n",
|
|
"4 2025-11-16 17:58:59+00:00 Image 46.18464 \n",
|
|
"5 2025-11-12 02:10:34+00:00 Video 44.35490 \n",
|
|
"6 2025-11-07 04:43:52+00:00 Video 44.35480 \n",
|
|
"7 2025-10-27 21:50:11+00:00 Video 44.35479 \n",
|
|
"8 2025-10-16 06:39:29+00:00 Video 40.41030 \n",
|
|
"9 2025-10-14 20:46:28+00:00 Video 40.43214 \n",
|
|
"\n",
|
|
" correct_longitude path \\\n",
|
|
"0 -94.21780 ../downloads/2025-11-29_04-50-47.mp4 \n",
|
|
"1 -94.21770 ../downloads/2025-11-29_04-49-56.mp4 \n",
|
|
"2 -93.96698 ../downloads/2025-11-26_14-23-27.mp4 \n",
|
|
"3 -93.96696 ../downloads/2025-11-26_14-18-45.mp4 \n",
|
|
"4 -94.36350 ../downloads/2025-11-16_17-58-59.jpg \n",
|
|
"5 -93.96707 ../downloads/2025-11-12_02-10-34.mp4 \n",
|
|
"6 -93.96702 ../downloads/2025-11-07_04-43-52.mp4 \n",
|
|
"7 -93.96703 ../downloads/2025-10-27_21-50-11.mp4 \n",
|
|
"8 -104.70806 ../downloads/2025-10-16_06-39-29.mp4 \n",
|
|
"9 -104.76975 ../downloads/2025-10-14_20-46-28.mp4 \n",
|
|
"\n",
|
|
" actual_date_cst actual_latitude actual_longitude actual_media_type \\\n",
|
|
"0 2025:11:29 04:50:47 0.00000 0.00000 Video \n",
|
|
"1 2025:11:29 04:49:56 0.00000 0.00000 Video \n",
|
|
"2 2025:11:26 14:23:27 0.00000 0.00000 Video \n",
|
|
"3 2025:11:26 14:18:45 0.00000 0.00000 Video \n",
|
|
"4 2025:11:16 11:58:59 46.18464 -94.36349 Image \n",
|
|
"5 2025:11:12 02:10:34 0.00000 0.00000 Video \n",
|
|
"6 2025:11:07 04:43:52 0.00000 0.00000 Video \n",
|
|
"7 2025:10:27 21:50:11 0.00000 0.00000 Video \n",
|
|
"8 2025:10:16 06:39:29 0.00000 0.00000 Video \n",
|
|
"9 2025:10:14 20:46:28 0.00000 0.00000 Video \n",
|
|
"\n",
|
|
" errors \n",
|
|
"0 0 \n",
|
|
"1 0 \n",
|
|
"2 0 \n",
|
|
"3 0 \n",
|
|
"4 0 \n",
|
|
"5 0 \n",
|
|
"6 0 \n",
|
|
"7 0 \n",
|
|
"8 0 \n",
|
|
"9 0 "
|
|
]
|
|
},
|
|
"execution_count": 24,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"df1 = df0.apply(check_for_errors, axis=1)\n",
|
|
"df1.head(10)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 25,
|
|
"id": "445c1b9b",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"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>correct_date_utc</th>\n",
|
|
" <th>correct_media_type</th>\n",
|
|
" <th>correct_latitude</th>\n",
|
|
" <th>correct_longitude</th>\n",
|
|
" <th>path</th>\n",
|
|
" <th>actual_date_cst</th>\n",
|
|
" <th>actual_latitude</th>\n",
|
|
" <th>actual_longitude</th>\n",
|
|
" <th>actual_media_type</th>\n",
|
|
" <th>errors</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>608</th>\n",
|
|
" <td>2024-05-11 05:50:50+00:00</td>\n",
|
|
" <td>Video</td>\n",
|
|
" <td>44.10428</td>\n",
|
|
" <td>-94.21973</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>2</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>823</th>\n",
|
|
" <td>2023-11-29 17:14:20+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>40.41069</td>\n",
|
|
" <td>-104.69252</td>\n",
|
|
" <td>../downloads/2023-11-29_17-14-20.jpg</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.0</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>2</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>824</th>\n",
|
|
" <td>2023-11-29 17:14:20+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>40.41069</td>\n",
|
|
" <td>-104.69252</td>\n",
|
|
" <td>../downloads/2023-11-29_17-14-20.jpg</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.0</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>2</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>983</th>\n",
|
|
" <td>2023-09-04 23:46:07+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>41.00173</td>\n",
|
|
" <td>-102.19107</td>\n",
|
|
" <td>../downloads/2023-09-04_23-46-07.jpg</td>\n",
|
|
" <td>2023:09:04 18:46:07</td>\n",
|
|
" <td>0.0</td>\n",
|
|
" <td>-102.19107</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>1</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1498</th>\n",
|
|
" <td>2022-06-26 00:36:04+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>40.01046</td>\n",
|
|
" <td>-105.00995</td>\n",
|
|
" <td>../downloads/2022-06-26_00-36-04.jpg</td>\n",
|
|
" <td>2022:06:25 19:36:04</td>\n",
|
|
" <td>0.0</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>1</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1519</th>\n",
|
|
" <td>2022-06-12 02:53:57+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>40.81056</td>\n",
|
|
" <td>-105.61546</td>\n",
|
|
" <td>../downloads/2022-06-12_02-53-57.jpg</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.0</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>2</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1520</th>\n",
|
|
" <td>2022-06-12 02:51:55+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>40.81056</td>\n",
|
|
" <td>-105.61546</td>\n",
|
|
" <td>../downloads/2022-06-12_02-51-55.jpg</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.0</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>2</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1522</th>\n",
|
|
" <td>2022-06-12 02:50:04+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>40.81055</td>\n",
|
|
" <td>-105.61549</td>\n",
|
|
" <td>../downloads/2022-06-12_02-50-04.jpg</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.0</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>2</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1523</th>\n",
|
|
" <td>2022-06-12 02:35:23+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>40.81058</td>\n",
|
|
" <td>-105.61549</td>\n",
|
|
" <td>../downloads/2022-06-12_02-35-23.jpg</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.0</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>2</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1526</th>\n",
|
|
" <td>2022-06-11 23:47:52+00:00</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>40.80940</td>\n",
|
|
" <td>-105.61659</td>\n",
|
|
" <td>../downloads/2022-06-11_23-47-52.jpg</td>\n",
|
|
" <td>-</td>\n",
|
|
" <td>0.0</td>\n",
|
|
" <td>0.00000</td>\n",
|
|
" <td>Image</td>\n",
|
|
" <td>2</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" correct_date_utc correct_media_type correct_latitude \\\n",
|
|
"608 2024-05-11 05:50:50+00:00 Video 44.10428 \n",
|
|
"823 2023-11-29 17:14:20+00:00 Image 40.41069 \n",
|
|
"824 2023-11-29 17:14:20+00:00 Image 40.41069 \n",
|
|
"983 2023-09-04 23:46:07+00:00 Image 41.00173 \n",
|
|
"1498 2022-06-26 00:36:04+00:00 Image 40.01046 \n",
|
|
"1519 2022-06-12 02:53:57+00:00 Image 40.81056 \n",
|
|
"1520 2022-06-12 02:51:55+00:00 Image 40.81056 \n",
|
|
"1522 2022-06-12 02:50:04+00:00 Image 40.81055 \n",
|
|
"1523 2022-06-12 02:35:23+00:00 Image 40.81058 \n",
|
|
"1526 2022-06-11 23:47:52+00:00 Image 40.80940 \n",
|
|
"\n",
|
|
" correct_longitude path \\\n",
|
|
"608 -94.21973 NaN \n",
|
|
"823 -104.69252 ../downloads/2023-11-29_17-14-20.jpg \n",
|
|
"824 -104.69252 ../downloads/2023-11-29_17-14-20.jpg \n",
|
|
"983 -102.19107 ../downloads/2023-09-04_23-46-07.jpg \n",
|
|
"1498 -105.00995 ../downloads/2022-06-26_00-36-04.jpg \n",
|
|
"1519 -105.61546 ../downloads/2022-06-12_02-53-57.jpg \n",
|
|
"1520 -105.61546 ../downloads/2022-06-12_02-51-55.jpg \n",
|
|
"1522 -105.61549 ../downloads/2022-06-12_02-50-04.jpg \n",
|
|
"1523 -105.61549 ../downloads/2022-06-12_02-35-23.jpg \n",
|
|
"1526 -105.61659 ../downloads/2022-06-11_23-47-52.jpg \n",
|
|
"\n",
|
|
" actual_date_cst actual_latitude actual_longitude \\\n",
|
|
"608 NaN NaN NaN \n",
|
|
"823 - 0.0 0.00000 \n",
|
|
"824 - 0.0 0.00000 \n",
|
|
"983 2023:09:04 18:46:07 0.0 -102.19107 \n",
|
|
"1498 2022:06:25 19:36:04 0.0 0.00000 \n",
|
|
"1519 - 0.0 0.00000 \n",
|
|
"1520 - 0.0 0.00000 \n",
|
|
"1522 - 0.0 0.00000 \n",
|
|
"1523 - 0.0 0.00000 \n",
|
|
"1526 - 0.0 0.00000 \n",
|
|
"\n",
|
|
" actual_media_type errors \n",
|
|
"608 NaN 2 \n",
|
|
"823 Image 2 \n",
|
|
"824 Image 2 \n",
|
|
"983 Image 1 \n",
|
|
"1498 Image 1 \n",
|
|
"1519 Image 2 \n",
|
|
"1520 Image 2 \n",
|
|
"1522 Image 2 \n",
|
|
"1523 Image 2 \n",
|
|
"1526 Image 2 "
|
|
]
|
|
},
|
|
"execution_count": 25,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"errors = df1[df1['errors'] > 0]\n",
|
|
"errors.head(10)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 26,
|
|
"id": "de9ed1f5",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"(679, 10)"
|
|
]
|
|
},
|
|
"execution_count": 26,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"errors.shape"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"id": "bd5d80b3",
|
|
"metadata": {},
|
|
"source": [
|
|
"679/3700 (oof)"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": ".venv",
|
|
"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.13.11"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|