Collection cities contains break down of new, total and unique cities provided in the metrics by time periods.

For shorter representation, these stats are abbreviated as:

- n - new
- t - total
- u - unique

There are 4 types of documents available:

- Zero document, which id is formed from {appID}_{year}:0 And it contains stats breakdown by months and weeks for the specified year
- Month document, which id is formed from {appID}_{year}:{month} And it contains stats breakdown by days of the month
- Splitted zero document which id is formed from {appID}
*{year}:0*{shardname} - Splitted month document which id is formed from {appID}
*{year}:{month}*{shardname}

Here is the list of possible fields

Field | Description | Example |
---|---|---|

_id | ID formed as {appID}{year}:0 or {appID}{year}:{month} or {appID}{year}:0{shardname} or {appID}{year}:{month}{shardname} |
542e95d747f0be510c000004_2014:10 |

a | App ID | 542e95d747f0be510c000004 |

d | Data for specific document | { "14": { "Unknown": { "t": 3 } }, "21": { "Istanbul": { "t": 1 } } }, |

m | {year}:{month} for which data is provided | 2014:10 |

meta | Information about all city values. Note it exists only for Zero documents of each year | "cities": [ "Unknown", "Istanbul" ] |

meta_v2 | New way to store meta info, much faster writes than using sets | "cities": { "Unknown":true, "Istanbul":true } |

Here are examples of both document types:

```
{
"_id": "54b6b5f55b15821c6dade6ea_2014:0",
"m": "2014:0",
"a": "54b6b5f55b15821c6dade6ea",
"d": {
"12": {
"Oulu": {
"u": 1
},
"Unknown": {
"u": 5
},
"Helsinki": {
"u": 2
},
"Järvenpää": {
"u": 1
},
"Vammala": {
"u": 1
}
},
"Oulu": {
"u": 1
},
"w52": {
"Oulu": {
"u": 1
}
},
"Unknown": {
"u": 5
},
"w50": {
"Unknown": {
"u": 2
}
},
"Helsinki": {
"u": 2
},
"w49": {
"Helsinki": {
"u": 1
},
"Järvenpää": {
"u": 1
}
},
"w51": {
"Unknown": {
"u": 3
},
"Vammala": {
"u": 1
},
"Helsinki": {
"u": 1
}
},
"Järvenpää": {
"u": 1
},
"Vammala": {
"u": 1
}
},
"meta": {
"cities": [
"Oulu",
"Unknown",
"Helsinki",
"Järvenpää",
"Vammala"
]
}
}
```

```
{
"_id": "54b6b5f55b15821c6dade6ea_2014:12",
"m": "2014:12",
"a": "54b6b5f55b15821c6dade6ea",
"d": {
"5": {
"Helsinki": {
"t": 1,
"n": 1,
"u": 1
}
},
"9": {
"Järvenpää": {
"t": 1,
"n": 1,
"u": 1
}
},
"13": {
"Unknown": {
"t": 1,
"n": 1,
"u": 1
}
},
"14": {
"Unknown": {
"t": 1,
"n": 1,
"u": 1
}
},
"17": {
"Vammala": {
"t": 1,
"n": 1,
"u": 1
}
},
"18": {
"Unknown": {
"t": 2,
"n": 2,
"u": 2
}
},
"21": {
"Unknown": {
"t": 1,
"n": 1,
"u": 1
},
"Helsinki": {
"t": 1,
"n": 1,
"u": 1
}
},
"27": {
"Oulu": {
"t": 1,
"n": 1,
"u": 1
}
}
}
}
```