The Massviews export mechanism, both CSV format and JSON format, produces incorrect tabular data. The data is "left aligned" within the table: empty cells are removed and non-empty cells are exported in consequent order without gaps marking empty cells.
For example, let's assume we have two articles, A and B, where A was created January 1st, and B was created January 3rd. The pageviews data for both articles might be something like:
Title | Jan 01 | Jan 02 | Jan 03 | Jan 04 | Jan 05 | Jan 06 | .... |
Article A | 0 | 5 | 8 | 10 | 12 | 6 | ... |
Article B | – | – | 0 | 12 | 7 | 4 | ... |
where "–" means "no data available", that is, empty cell in the table, which is essentially "0". However, the exported CSV/JSON data is as follows:
Title | Jan 01 | Jan 02 | Jan 03 | Jan 04 | Jan 05 | Jan 06 | .... |
Article A | 0 | 5 | 8 | 10 | 12 | 6 | ... |
Article B | 0 | 12 | 7 | 4 | ... | ||
The problem is more severe when the pageviews API returns no data for a certain date. Instead of
Title | Jan 01 | Jan 02 | Jan 03 | Jan 04 | Jan 05 | Jan 06 | .... |
Article A | 0 | 5 | 8 | 10 | – | 6 | ... |
Article B | – | – | 0 | 12 | 7 | 4 | ... |
we get the following table:
Title | Jan 01 | Jan 02 | Jan 03 | Jan 04 | Jan 05 | Jan 06 | .... |
Article A | 0 | 5 | 8 | 10 | 6 | ... | |
Article B | 0 | 12 | 7 | 4 | ... | ||