diff --git a/assignment_1/table_manager.html b/assignment_1/table_manager.html index 5eb0bdc..7306f6f 100644 --- a/assignment_1/table_manager.html +++ b/assignment_1/table_manager.html @@ -10,7 +10,7 @@ + - -
+
+ + + + + - + //each list corresponds to the question that needs to be answered + var nonproOrgs = []; + var lessThanTen = []; + var northAmerican = []; + var transportData = []; + //fifth list is the bonus question that I find interesting + var highIncome = []; + + + for (var key of Object.keys(organizations)) { + var orgKeys = organizations[key]; + + + //1 + if (orgKeys["Organization Type"] == "Nonprofit") { + nonproOrgs.push(orgKeys["Organization Type"]); + } + + row0[0].innerHTML = "Nonprofit Organizations:"; + row0[1].innerHTML = nonproOrgs.length; + //2 + if (orgKeys["Founding Year"] > 2008) { + lessThanTen.push(orgKeys["Founding Year"]); + } + + row1[0].innerHTML = "Less Than 10 Years Old:"; + row1[1].innerHTML = lessThanTen.length; + + //3 + if (orgKeys["Region"] == "North America") { + northAmerican.push(orgKeys["Region"]); + } + + row2[0].innerHTML = "Count in North America:"; + row2[1].innerHTML = northAmerican.length; + + //4 + if (orgKeys["Type of Data Used"] == "Transportation") { + transportData.push(orgKeys["Type of Data Used"]); + } + + row3[0].innerHTML = "Count using Transportation Data:"; + row3[1].innerHTML = transportData.length; + + //5 + //How many organizations have a high income level? + if (orgKeys["Country Income Level"] == "High income") { + highIncome.push(orgKeys["Organization Type"]); + } + + row4[0].innerHTML = "High Income Level:"; + row4[1].innerHTML = highIncome.length; + + } + + - \ No newline at end of file + diff --git a/git/introductions/gurukar.md b/git/introductions/gurukar.md new file mode 100644 index 0000000..e69de29