Check COVID locations of interest against Google location history

Overview

Location of Interest Checker

Script to compare COVID locations of interest to Google location history.

The script produces a map plot (as shown below) as well .csv file for further inspection of the data.

locations_of_interest_map Figure: Output plot from checker script. Orange points are locations of interest, green points are personal locations at corresponding times. Blue lines show the 10 locations of interest you were closest to.

distance to locations Figure: Output .csv checker script, visualised in Excel. Column distance_to_location_km shows how far in km you were from the given location of interest.

NOTE see health.govt.nz for the official list of locations of interest, and guidance on what to do if you have been at one.

Disclaimer!

I do not recommend the use of this script in lieu of manual checking of travel history against locations of interest. This script is largely untested, and further I am unsure as to whether Google location history records come with sufficient accuracy and frequency to reliably determine proximity to a location of interest.

Usage

Export Google location history

  1. Go to https://takeout.google.com/
  2. Under 'CREATE A NEW EXPORT`, deselect all, then select 'Location History', then 'Next Step'
  3. Follow instructions to download, then unzip exported data. This tool uses the file 'Location History.json'

Install

To install this package/script into a virtualenv:

python -m venv venv
source venv/bin/activate
pip install git+https://github.com/tim-fan/location_of_interest_checker.git

Run

Run the checker script. See the -h flag for usage.

$ location_of_interest_checker -h
Locations of Interest Checker.

Check current New Zealand COVID locations of interest against exported Google location history.

Input arguments are the path to the exported location history json, and the file underwhich
to save the results of the check.

The output csv contains a list of all locations of interest, along with a column specifying how
far (in km) you were from that location at that time. If any distances are less
than, say 0.1km, you should probably get a test and self isolate!

See https://www.health.govt.nz/our-work/diseases-and-conditions/covid-19-novel-coronavirus/covid-19-health-advice-public/contact-tracing-covid-19/covid-19-contact-tracing-locations-interest
for official list of locations of interest, and instructions on what to do if you have been at one.

Usage:
  location_of_interest_checker <location_history_file> <output_csv>

Options:
  -h --help     Show this screen.

For example, if your exported history file is saved as Location History.json;

location_of_interest_checker Location\ History.json /tmp/results.csv

On completion, the file /tmp/results.csv can be opened in Excel or similar tools for inspection.

See the column distance_to_location_km to see how close you were to the locations of interest.

TODO

  • Think about packaging/distribution so this can easily be used by non-python users
  • Provide instructions for windows setup - looks like this may be difficult with geopandas+pip: https://geopandas.readthedocs.io/en/latest/getting_started/install.html
  • Improvements to the plot:
    • More emphasis on high-proximity locations - currently it's easy to miss locations you were very close to, as the line will be very short - this is the oposite of how it should be!
    • Better show the association between history points and interest points
    • Better hover text
    • Add a legend
    • Color lines by distance
    • Widgets for filtering by distance, time etc.
  • Look into connecting directly to Google API to extract location history, rather than requiring manual export.
  • Add a flag to match to closest location record (in time) in cases where no location history is present within the timebounds of a given location of interest
    • alternatively, specify a maximum association time (e.g. match to records up to 1hr outside event interval)?
  • Better configurability:
    • support different timezones? Different source datasets?
    • support different filtering start-times
    • flags to enable/disable plotting and .csv export
A similarity measurer on two programming assignments on Online Judge.

A similarity measurer on two programming assignments on Online Judge. Algorithm implementation details are at here. Install Recommend OS: Ubuntu 20.04

StardustDL 6 May 21, 2022
Replit theme sync; Github theme sync but in Replit.

This is a Replit theme sync, basically meaning that it keeps track of the current time (which may need to be edited later on), and if the time passes morning, afternoon, etc, the theme switches. The

Glitch 8 Jun 25, 2022
PythonCalculator - A simple Calculator made in python using tkinter for GUI

PythonCalculator A simple Calculator made in python using tkinter for GUI. For P

ʀᴇxɪɴᴀᴢᴏʀ 1 Jan 01, 2022
rTorrent Crash Prevention

rTorrent Disk Checker This program is capable of the following when: - a torrent is added by any program (autodl-irssi, RSS Downloader et

16 Dec 14, 2022
Superset custom path for python

It is a common requirement to have superset running under a base url, (https://mydomain.at/analytics/ instead of https://mydomain.at/). I created the

9 Dec 14, 2022
Logo DYS (Doküman Yönetim Sitemi) API Python Implementation

dys-connector Logo DYS (Dokuman Yonetim Sistemi) API Python Implementation Python Package: https://pypi.org/project/dys-connector Quick Start from dys

Logo Group 8 Mar 19, 2022
tgEasy | Easy for a Brighter Shine | Monkey Patcher Addon for Pyrogram

tgEasy | Easy for a Brighter Shine | Monkey Patcher Addon for Pyrogram

Jayant Hegde Kageri 35 Nov 12, 2022
A python script based on OpenCV-Python, you can automatically hang up the Destiny 2 Throne to get the Dawning Essence.

A python script based on OpenCV-Python, you can automatically hang up the Destiny 2 Throne to get the Dawning Essence.

1 Dec 19, 2021
to learn how to do pull request and do contribution to other's repo

Hacktoberfest-2021 - open-source-contribution An Open Source repository to Teach people How to contribute to open sources. 💥 🔥 JOIN PVX PROGRAMMING

Shubham Rawat 82 Dec 26, 2022
Credit Card Fraud Detection

Credit Card Fraud Detection For this project, I used the datasets from the kaggle competition called IEEE-CIS Fraud Detection. The competition aims to

RayWu 4 Jun 21, 2022
World's best free and open source ERP.

World's best free and open source ERP.

Frappe 12.5k Jan 07, 2023
Sikulix with Ubuntu Calculator Automation

CalculatorAutomation Sikulix with Ubuntu Calculator Automation STEP 1: DOWNLOAD and INSTALL SIKULIX https://raiman.github.io/SikuliX1/downloads.html T

Bedirhan Sayakci 2 Oct 27, 2021
Fused multiply-add (with a single rounding) for Python.

pyfma Fused multiply-add for Python. Fused multiply-add computes (x*y) + z with a single rounding. Useful for dot products, matrix multiplications, po

Nico Schlömer 18 Nov 08, 2022
Test to grab m3u from YouTube live.

YouTube_to_m3u https://raw.githubusercontent.com/benmoose39/YouTube_to_m3u/main/youtube.m3u Updated m3u links of YouTube live channels, auto-updated e

136 Jan 06, 2023
Python module used to generate random facts

Randfacts is a python library that generates random facts. You can use randfacts.get_fact() to return a random fun fact. Disclaimer: Facts are not gua

Tabulate 14 Dec 14, 2022
A simple but fully functional calculator that will take multiple operations.

Functional-Calculator A simple but fully functional calculator that will take multiple operations. Usage Run the following command through terminal: p

Uzziel Ariel 1 Dec 22, 2022
User management system (UMS), has the primary purpose of connecting to an Active Directory (AD)

💿 Sistema de Gerenciamento de Usuário (SGU) 📚 Sobre o projeto Sistema de gerenciamento de usuários (SGU), tem o objetivo primário de se conectar a u

Patrick Viegas 2 Feb 25, 2022
Exploiting Linksys WRT54G using a vulnerability I found.

Exploiting Linksys WRT54G Exploit # Install the requirements. pip install -r requirements.txt ROUTER_HOST=192.169.1.1 ROUTER_USERNAME=admin ROUTER_P

Elon Gliksberg 31 May 29, 2022
🥦 Send and receive nano with 2 simple functions

easy_nano Send and receive nano (without having to understand the nano protocol).

1 Feb 14, 2022
Buffer Overflows

BOF Buffer Overflows 1. BOF tips Practice using mona.py Download vulnerable exe from Exploit DB.

Vinh Nguyễn 27 Dec 08, 2022