Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cleanup(raw_data) {
- // remove unneeded columns
- var data = [];
- raw_data.forEach(function(obj){
- if (obj["County"] == "Dutchess" && obj["Month"] == 12)
- data.push(obj)
- });
- data.forEach(function(obj) {
- delete obj["2012 Census Population"];
- delete obj["Population 18+ Estimate"];
- delete obj["OPO"];
- delete obj["Location"];
- delete obj["Month"];
- delete obj["County"];
- delete obj["Chart Month"];
- });
- data.sort(function (a,b) {
- return a["Year"] > b["Year"];
- });
- return data;
- }
Add Comment
Please, Sign In to add comment