Skip to content

KrisChalmers/tescoDataParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tescoDataParser

A Class and script that parses the JSON file that is provided from Tesco personal data portability request. Data is parsed to 3 csv files.

  • online orders (no product information, just item quantities)
  • trips - details of shopping trips i.e. till transactions)
  • products - the itemisation relating to the trips - these have the common field of "trip_key" the above are all saved as instance variable.

Find out more about Tesco Data Portability here: https://www.tesco.com/data-portability/en-GB

Running from commandline

This can be run from the commandline as follows:

python parser.py Tesco-Customer-Data.json

Use in python

The class can be used as follows:

from parser import TescoParser
filepath = "Tesco-Customer-Data.json"
parser = TescoParser(filepath)
online_orders, trips, products = parser.parse()

About

A Class and script that parses the JSON file that is provided from Tesco personal data portability request. Data is parsed to 3 csv files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages