{ "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": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DateMedia TypeLocationDownload LinkMedia Download Url
02025-11-29 04:50:47+00:00VideoLatitude, Longitude: 44.110836, -94.217804https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...
12025-11-29 04:49:56+00:00VideoLatitude, Longitude: 44.110767, -94.217705https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...
22025-11-26 14:23:27+00:00VideoLatitude, Longitude: 44.354908, -93.96698https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...
32025-11-26 14:18:45+00:00VideoLatitude, Longitude: 44.355003, -93.96696https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...
42025-11-16 17:58:59+00:00ImageLatitude, Longitude: 46.184643, -94.363495https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...
52025-11-12 02:10:34+00:00VideoLatitude, Longitude: 44.354897, -93.96707https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...
62025-11-07 04:43:52+00:00VideoLatitude, Longitude: 44.354797, -93.96702https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...
72025-10-27 21:50:11+00:00VideoLatitude, Longitude: 44.354794, -93.967026https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...
82025-10-16 06:39:29+00:00VideoLatitude, Longitude: 40.4103, -104.70806https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...
92025-10-14 20:46:28+00:00VideoLatitude, Longitude: 40.432137, -104.76975https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...
\n", "
" ], "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": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DateMedia TypeLocationDownload LinkMedia Download Urlfile_dtlocation_latitudelocation_longitude
02025-11-29 04:50:47+00:00VideoLatitude, Longitude: 44.110836, -94.217804https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-29_04-50-4744.11084-94.21780
12025-11-29 04:49:56+00:00VideoLatitude, Longitude: 44.110767, -94.217705https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-29_04-49-5644.11077-94.21770
22025-11-26 14:23:27+00:00VideoLatitude, Longitude: 44.354908, -93.96698https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-26_14-23-2744.35491-93.96698
32025-11-26 14:18:45+00:00VideoLatitude, Longitude: 44.355003, -93.96696https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-26_14-18-4544.35500-93.96696
42025-11-16 17:58:59+00:00ImageLatitude, Longitude: 46.184643, -94.363495https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-16_17-58-5946.18464-94.36350
52025-11-12 02:10:34+00:00VideoLatitude, Longitude: 44.354897, -93.96707https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-12_02-10-3444.35490-93.96707
62025-11-07 04:43:52+00:00VideoLatitude, Longitude: 44.354797, -93.96702https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-07_04-43-5244.35480-93.96702
72025-10-27 21:50:11+00:00VideoLatitude, Longitude: 44.354794, -93.967026https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-10-27_21-50-1144.35479-93.96703
82025-10-16 06:39:29+00:00VideoLatitude, Longitude: 40.4103, -104.70806https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-10-16_06-39-2940.41030-104.70806
92025-10-14 20:46:28+00:00VideoLatitude, Longitude: 40.432137, -104.76975https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-10-14_20-46-2840.43214-104.76975
\n", "
" ], "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": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
filecreatedategpslatitudegpslongitude
0../downloads/2019-04-05_23-27-17.jpg---
1../downloads/2024-10-23_00-29-09.jpg2024:10:22 19:29:0944 deg 6' 15.76\" N94 deg 13' 10.52\" W
2../downloads/2025-02-16_00-09-41.mp42025:02:16 00:09:41--
3../downloads/2023-03-10_22-11-18.jpg2023:03:10 16:11:1840 deg 24' 39.14\" N104 deg 41' 33.90\" W
4../downloads/2024-02-24_22-18-07.jpg2024:02:24 16:18:0740 deg 25' 17.09\" N104 deg 45' 22.75\" W
5../downloads/2020-10-24_03-27-27.mp42020:10:24 03:27:27--
6../downloads/2020-11-04_04-40-23.mp42020:11:04 04:40:23--
7../downloads/2018-12-26_06-49-23.mp42018:12:26 06:49:23--
8../downloads/2024-07-25_04-57-56.mp42024:07:25 04:57:56--
9../downloads/2022-09-15_23-53-02.jpg2022:09:15 18:53:0240 deg 25' 44.94\" N104 deg 42' 57.92\" W
\n", "
" ], "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": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
filecreatedategpslatitudegpslongitudeLatitudeLongitudefilenameextensionfile_dt
0../downloads/2019-04-05_23-27-17.jpg---0.000000.000002019-04-05_23-27-17.jpgjpg2019-04-05_23-27-17
1../downloads/2024-10-23_00-29-09.jpg2024:10:22 19:29:0944 deg 6' 15.76\" N94 deg 13' 10.52\" W44.10438-94.219592024-10-23_00-29-09.jpgjpg2024-10-23_00-29-09
2../downloads/2025-02-16_00-09-41.mp42025:02:16 00:09:41--0.000000.000002025-02-16_00-09-41.mp4mp42025-02-16_00-09-41
3../downloads/2023-03-10_22-11-18.jpg2023:03:10 16:11:1840 deg 24' 39.14\" N104 deg 41' 33.90\" W40.41087-104.692752023-03-10_22-11-18.jpgjpg2023-03-10_22-11-18
4../downloads/2024-02-24_22-18-07.jpg2024:02:24 16:18:0740 deg 25' 17.09\" N104 deg 45' 22.75\" W40.42141-104.756322024-02-24_22-18-07.jpgjpg2024-02-24_22-18-07
5../downloads/2020-10-24_03-27-27.mp42020:10:24 03:27:27--0.000000.000002020-10-24_03-27-27.mp4mp42020-10-24_03-27-27
6../downloads/2020-11-04_04-40-23.mp42020:11:04 04:40:23--0.000000.000002020-11-04_04-40-23.mp4mp42020-11-04_04-40-23
7../downloads/2018-12-26_06-49-23.mp42018:12:26 06:49:23--0.000000.000002018-12-26_06-49-23.mp4mp42018-12-26_06-49-23
8../downloads/2024-07-25_04-57-56.mp42024:07:25 04:57:56--0.000000.000002024-07-25_04-57-56.mp4mp42024-07-25_04-57-56
9../downloads/2022-09-15_23-53-02.jpg2022:09:15 18:53:0240 deg 25' 44.94\" N104 deg 42' 57.92\" W40.42915-104.716092022-09-15_23-53-02.jpgjpg2022-09-15_23-53-02
\n", "
" ], "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": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
filecreatedategpslatitudegpslongitudeLatitudeLongitudefilenameextensionfile_dtcreatedate_moddatetimedt_joinfile_type
0../downloads/2019-04-05_23-27-17.jpg---0.000000.000002019-04-05_23-27-17.jpgjpg2019-04-05_23-27-17NaT2019-04-06 04:27:17+00:002019-04-06 04:27:17+00:00Image
1../downloads/2024-10-23_00-29-09.jpg2024:10:22 19:29:0944 deg 6' 15.76\" N94 deg 13' 10.52\" W44.10438-94.219592024-10-23_00-29-09.jpgjpg2024-10-23_00-29-092024-10-22 19:29:09-05:002024-10-23 05:29:09+00:002024-10-23 05:29:09+00:00Image
2../downloads/2025-02-16_00-09-41.mp42025:02:16 00:09:41--0.000000.000002025-02-16_00-09-41.mp4mp42025-02-16_00-09-412025-02-16 00:09:41-06:002025-02-16 06:09:41+00:002025-02-16 06:09:41+00:00Video
3../downloads/2023-03-10_22-11-18.jpg2023:03:10 16:11:1840 deg 24' 39.14\" N104 deg 41' 33.90\" W40.41087-104.692752023-03-10_22-11-18.jpgjpg2023-03-10_22-11-182023-03-10 16:11:18-06:002023-03-11 04:11:18+00:002023-03-11 04:11:18+00:00Image
4../downloads/2024-02-24_22-18-07.jpg2024:02:24 16:18:0740 deg 25' 17.09\" N104 deg 45' 22.75\" W40.42141-104.756322024-02-24_22-18-07.jpgjpg2024-02-24_22-18-072024-02-24 16:18:07-06:002024-02-25 04:18:07+00:002024-02-25 04:18:07+00:00Image
5../downloads/2020-10-24_03-27-27.mp42020:10:24 03:27:27--0.000000.000002020-10-24_03-27-27.mp4mp42020-10-24_03-27-272020-10-24 03:27:27-05:002020-10-24 08:27:27+00:002020-10-24 08:27:27+00:00Video
6../downloads/2020-11-04_04-40-23.mp42020:11:04 04:40:23--0.000000.000002020-11-04_04-40-23.mp4mp42020-11-04_04-40-232020-11-04 04:40:23-06:002020-11-04 10:40:23+00:002020-11-04 10:40:23+00:00Video
7../downloads/2018-12-26_06-49-23.mp42018:12:26 06:49:23--0.000000.000002018-12-26_06-49-23.mp4mp42018-12-26_06-49-232018-12-26 06:49:23-06:002018-12-26 12:49:23+00:002018-12-26 12:49:23+00:00Video
8../downloads/2024-07-25_04-57-56.mp42024:07:25 04:57:56--0.000000.000002024-07-25_04-57-56.mp4mp42024-07-25_04-57-562024-07-25 04:57:56-05:002024-07-25 09:57:56+00:002024-07-25 09:57:56+00:00Video
9../downloads/2022-09-15_23-53-02.jpg2022:09:15 18:53:0240 deg 25' 44.94\" N104 deg 42' 57.92\" W40.42915-104.716092022-09-15_23-53-02.jpgjpg2022-09-15_23-53-022022-09-15 18:53:02-05:002022-09-16 04:53:02+00:002022-09-16 04:53:02+00:00Image
\n", "
" ], "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": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DateMedia TypeLocationDownload LinkMedia Download Urlfile_dtlocation_latitudelocation_longitudefilecreatedategpslatitudegpslongitudeLatitudeLongitudefilenameextensioncreatedate_moddatetimedt_joinfile_type
02025-11-29 04:50:47+00:00VideoLatitude, Longitude: 44.110836, -94.217804https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-29_04-50-4744.11084-94.21780../downloads/2025-11-29_04-50-47.mp42025:11:29 04:50:47--0.000000.000002025-11-29_04-50-47.mp4mp42025-11-29 04:50:47-06:002025-11-29 10:50:47+00:002025-11-29 10:50:47+00:00Video
12025-11-29 04:49:56+00:00VideoLatitude, Longitude: 44.110767, -94.217705https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-29_04-49-5644.11077-94.21770../downloads/2025-11-29_04-49-56.mp42025:11:29 04:49:56--0.000000.000002025-11-29_04-49-56.mp4mp42025-11-29 04:49:56-06:002025-11-29 10:49:56+00:002025-11-29 10:49:56+00:00Video
22025-11-26 14:23:27+00:00VideoLatitude, Longitude: 44.354908, -93.96698https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-26_14-23-2744.35491-93.96698../downloads/2025-11-26_14-23-27.mp42025:11:26 14:23:27--0.000000.000002025-11-26_14-23-27.mp4mp42025-11-26 14:23:27-06:002025-11-26 20:23:27+00:002025-11-26 20:23:27+00:00Video
32025-11-26 14:18:45+00:00VideoLatitude, Longitude: 44.355003, -93.96696https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-26_14-18-4544.35500-93.96696../downloads/2025-11-26_14-18-45.mp42025:11:26 14:18:45--0.000000.000002025-11-26_14-18-45.mp4mp42025-11-26 14:18:45-06:002025-11-26 20:18:45+00:002025-11-26 20:18:45+00:00Video
42025-11-16 17:58:59+00:00ImageLatitude, Longitude: 46.184643, -94.363495https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-16_17-58-5946.18464-94.36350../downloads/2025-11-16_17-58-59.jpg2025:11:16 11:58:5946 deg 11' 4.71\" N94 deg 21' 48.58\" W46.18464-94.363492025-11-16_17-58-59.jpgjpg2025-11-16 11:58:59-06:002025-11-16 23:58:59+00:002025-11-16 23:58:59+00:00Image
52025-11-12 02:10:34+00:00VideoLatitude, Longitude: 44.354897, -93.96707https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-12_02-10-3444.35490-93.96707../downloads/2025-11-12_02-10-34.mp42025:11:12 02:10:34--0.000000.000002025-11-12_02-10-34.mp4mp42025-11-12 02:10:34-06:002025-11-12 08:10:34+00:002025-11-12 08:10:34+00:00Video
62025-11-07 04:43:52+00:00VideoLatitude, Longitude: 44.354797, -93.96702https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-11-07_04-43-5244.35480-93.96702../downloads/2025-11-07_04-43-52.mp42025:11:07 04:43:52--0.000000.000002025-11-07_04-43-52.mp4mp42025-11-07 04:43:52-06:002025-11-07 10:43:52+00:002025-11-07 10:43:52+00:00Video
72025-10-27 21:50:11+00:00VideoLatitude, Longitude: 44.354794, -93.967026https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-10-27_21-50-1144.35479-93.96703../downloads/2025-10-27_21-50-11.mp42025:10:27 21:50:11--0.000000.000002025-10-27_21-50-11.mp4mp42025-10-27 21:50:11-05:002025-10-28 02:50:11+00:002025-10-28 02:50:11+00:00Video
82025-10-16 06:39:29+00:00VideoLatitude, Longitude: 40.4103, -104.70806https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-10-16_06-39-2940.41030-104.70806../downloads/2025-10-16_06-39-29.mp42025:10:16 06:39:29--0.000000.000002025-10-16_06-39-29.mp4mp42025-10-16 06:39:29-05:002025-10-16 11:39:29+00:002025-10-16 11:39:29+00:00Video
92025-10-14 20:46:28+00:00VideoLatitude, Longitude: 40.432137, -104.76975https://app.snapchat.com/dmd/memories?uid=098c...https://us-east1-aws.api.snapchat.com/dmd/mm?u...2025-10-14_20-46-2840.43214-104.76975../downloads/2025-10-14_20-46-28.mp42025:10:14 20:46:28--0.000000.000002025-10-14_20-46-28.mp4mp42025-10-14 20:46:28-05:002025-10-15 01:46:28+00:002025-10-15 01:46:28+00:00Video
\n", "
" ], "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": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
correct_date_utccorrect_media_typecorrect_latitudecorrect_longitudepathactual_date_cstactual_latitudeactual_longitudeactual_media_type
02025-11-29 04:50:47+00:00Video44.11084-94.21780../downloads/2025-11-29_04-50-47.mp42025:11:29 04:50:470.000000.00000Video
12025-11-29 04:49:56+00:00Video44.11077-94.21770../downloads/2025-11-29_04-49-56.mp42025:11:29 04:49:560.000000.00000Video
22025-11-26 14:23:27+00:00Video44.35491-93.96698../downloads/2025-11-26_14-23-27.mp42025:11:26 14:23:270.000000.00000Video
32025-11-26 14:18:45+00:00Video44.35500-93.96696../downloads/2025-11-26_14-18-45.mp42025:11:26 14:18:450.000000.00000Video
42025-11-16 17:58:59+00:00Image46.18464-94.36350../downloads/2025-11-16_17-58-59.jpg2025:11:16 11:58:5946.18464-94.36349Image
52025-11-12 02:10:34+00:00Video44.35490-93.96707../downloads/2025-11-12_02-10-34.mp42025:11:12 02:10:340.000000.00000Video
62025-11-07 04:43:52+00:00Video44.35480-93.96702../downloads/2025-11-07_04-43-52.mp42025:11:07 04:43:520.000000.00000Video
72025-10-27 21:50:11+00:00Video44.35479-93.96703../downloads/2025-10-27_21-50-11.mp42025:10:27 21:50:110.000000.00000Video
82025-10-16 06:39:29+00:00Video40.41030-104.70806../downloads/2025-10-16_06-39-29.mp42025:10:16 06:39:290.000000.00000Video
92025-10-14 20:46:28+00:00Video40.43214-104.76975../downloads/2025-10-14_20-46-28.mp42025:10:14 20:46:280.000000.00000Video
\n", "
" ], "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": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
correct_date_utccorrect_media_typecorrect_latitudecorrect_longitudepathactual_date_cstactual_latitudeactual_longitudeactual_media_typeerrors
02025-11-29 04:50:47+00:00Video44.11084-94.21780../downloads/2025-11-29_04-50-47.mp42025:11:29 04:50:470.000000.00000Video0
12025-11-29 04:49:56+00:00Video44.11077-94.21770../downloads/2025-11-29_04-49-56.mp42025:11:29 04:49:560.000000.00000Video0
22025-11-26 14:23:27+00:00Video44.35491-93.96698../downloads/2025-11-26_14-23-27.mp42025:11:26 14:23:270.000000.00000Video0
32025-11-26 14:18:45+00:00Video44.35500-93.96696../downloads/2025-11-26_14-18-45.mp42025:11:26 14:18:450.000000.00000Video0
42025-11-16 17:58:59+00:00Image46.18464-94.36350../downloads/2025-11-16_17-58-59.jpg2025:11:16 11:58:5946.18464-94.36349Image0
52025-11-12 02:10:34+00:00Video44.35490-93.96707../downloads/2025-11-12_02-10-34.mp42025:11:12 02:10:340.000000.00000Video0
62025-11-07 04:43:52+00:00Video44.35480-93.96702../downloads/2025-11-07_04-43-52.mp42025:11:07 04:43:520.000000.00000Video0
72025-10-27 21:50:11+00:00Video44.35479-93.96703../downloads/2025-10-27_21-50-11.mp42025:10:27 21:50:110.000000.00000Video0
82025-10-16 06:39:29+00:00Video40.41030-104.70806../downloads/2025-10-16_06-39-29.mp42025:10:16 06:39:290.000000.00000Video0
92025-10-14 20:46:28+00:00Video40.43214-104.76975../downloads/2025-10-14_20-46-28.mp42025:10:14 20:46:280.000000.00000Video0
\n", "
" ], "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": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
correct_date_utccorrect_media_typecorrect_latitudecorrect_longitudepathactual_date_cstactual_latitudeactual_longitudeactual_media_typeerrors
6082024-05-11 05:50:50+00:00Video44.10428-94.21973NaNNaNNaNNaNNaN2
8232023-11-29 17:14:20+00:00Image40.41069-104.69252../downloads/2023-11-29_17-14-20.jpg-0.00.00000Image2
8242023-11-29 17:14:20+00:00Image40.41069-104.69252../downloads/2023-11-29_17-14-20.jpg-0.00.00000Image2
9832023-09-04 23:46:07+00:00Image41.00173-102.19107../downloads/2023-09-04_23-46-07.jpg2023:09:04 18:46:070.0-102.19107Image1
14982022-06-26 00:36:04+00:00Image40.01046-105.00995../downloads/2022-06-26_00-36-04.jpg2022:06:25 19:36:040.00.00000Image1
15192022-06-12 02:53:57+00:00Image40.81056-105.61546../downloads/2022-06-12_02-53-57.jpg-0.00.00000Image2
15202022-06-12 02:51:55+00:00Image40.81056-105.61546../downloads/2022-06-12_02-51-55.jpg-0.00.00000Image2
15222022-06-12 02:50:04+00:00Image40.81055-105.61549../downloads/2022-06-12_02-50-04.jpg-0.00.00000Image2
15232022-06-12 02:35:23+00:00Image40.81058-105.61549../downloads/2022-06-12_02-35-23.jpg-0.00.00000Image2
15262022-06-11 23:47:52+00:00Image40.80940-105.61659../downloads/2022-06-11_23-47-52.jpg-0.00.00000Image2
\n", "
" ], "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 }