Reformat the data object and add the docs properties for d3.js compliance
(data, tpd, groups)
| 146 | |
| 147 | |
| 148 | def reformat_data(data, tpd, groups): |
| 149 | """ |
| 150 | Reformat the data object and add the docs properties for d3.js compliance |
| 151 | """ |
| 152 | for i in range(0, len(data["nodes"])): |
| 153 | data["nodes"][i]["name"] = data["nodes"][i]["id"] |
| 154 | data["nodes"][i]["group"] = groups[data["nodes"][i]["type"]] |
| 155 | |
| 156 | |
| 157 | def get_tpds(mongo_connector): |