Skip to main content

synthetic-cdrs: call detail records

Synthetic call detail records (CDRs): one row per call or SMS event. The data is simulated; it does not describe real subscribers. Back to Course datasets

Files

Folder data/raw/synthetic-cdrs/
Size on disk about 12.5 GB
Number of files about 10,000 CSV files (.dat.csv), all with the same columns
Format CSV with a header row in every file; comma-delimited
Rows about 15,000–16,000 per file (about 0.8 MB each); roughly 240 million in total (estimated from file size)
Used in Days 2–4; course project

Columns

# Name Type Description
0 cdr type text Type of record: mobile-originated or mobile-terminated call or SMS, plus a few gateway, call-forwarding and roaming records
1 cdr datetime text (14 digits, YYYYMMDDhhmmss) Date and time of the event
2 call duration number Duration of the call. Empty in every row checked
3 last calling cellid number, stored with a trailing .0 ID of the cell (antenna) that handled the event. Links to cell_id in synthetic-cell-locs
4 user_id integer, up to 19 digits Pseudonymous subscriber ID

Notes

  • Column names contain spaces. In Spark, refer to them with backticks (col("`cdr type`")) or rename them after loading.
  • Read user_id and cdr datetime as text. user_id can have 19 digits, which can overflow a 64-bit integer; cdr datetime should be parsed with the format yyyyMMddHHmmss.
  • The cell column is often empty: in the files checked, about 60% of rows have no cell ID.
  • The cell ID is written as a decimal (for example with a trailing .0). Convert it to an integer before joining to the cell locations.
  • Not every cell ID has a location. In a sample of 10 files, about one third of the non-empty cell IDs matched a cell_id in synthetic-cell-locs.csv. Use a left join and expect missing locations.
  • call duration is empty in all rows checked; don’t rely on it.
  • Files are named by a timestamp (HW followed by digits, then .dat.csv).

Columns and notes are based on 3 files read in full and the headers of a further sample; the folder size and file count are for the full course copy.