Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 72 additions & 15 deletions assignment_1/table_manager.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<!-- Data -->
<script>

// Don't copy this to any other places in this file. You can just use the "organizations" variable to do your assignment.
// Don't copy this to any other places in this file. You can just use the "organizations" variable to do your assignment.
var organizations = [
{
"Region": "East Asia & Pacific",
Expand All @@ -19,7 +19,7 @@
"Organization Name": "200 Square",
"Organization Type": "For-profit",
"Sectors": "Housing, construction & real estate",
"Description": "200 Square is an online real estate agent in New Zealand.",
"Description": "200 Square is an online real estate agent in New Zealand.",
"City": "Wellington",
"State/Region": "Wellington",
"Founding Year": 2010,
Expand All @@ -34,7 +34,7 @@
"Organization Name": "21c Consultancy",
"Organization Type": "For-profit",
"Sectors": "IT and geospatial",
"Description": "21c is ICT innovation consultancy which advises international actors, institutions and governments around the world on technological trends which can affect the way they deliver services.",
"Description": "21c is ICT innovation consultancy which advises international actors, institutions and governments around the world on technological trends which can affect the way they deliver services.",
"City": "London",
"State/Region": "",
"Founding Year": 2015,
Expand All @@ -49,7 +49,7 @@
"Organization Name": "2GIS",
"Organization Type": "For-profit",
"Sectors": "IT and geospatial",
"Description": "2GIS is a city information service combined with a map. ",
"Description": "2GIS is a city information service combined with a map. ",
"City": "Novosibirsk",
"State/Region": "Novosibirsk Oblast",
"Founding Year": 1999,
Expand All @@ -64,7 +64,7 @@
"Organization Name": "2nd City Zoning",
"Organization Type": "Nonprofit",
"Sectors": "Housing, construction & real estate",
"Description": "An Open City App, 2nd City Zoning is an interactive map that lets you find out how your building is zoned, learn where to locate your business and explore zoning patterns throughout the city.",
"Description": "An Open City App, 2nd City Zoning is an interactive map that lets you find out how your building is zoned, learn where to locate your business and explore zoning patterns throughout the city.",
"City": "Chicago",
"State/Region": "Illinois",
"Founding Year": 2013,
Expand Down Expand Up @@ -94,7 +94,7 @@
"Organization Name": "360 Yield Center",
"Organization Type": "For-profit",
"Sectors": "Agriculture",
"Description": "Taking a 360-degree view of key yield-limiting variables, 360 Yield Center develops strategies for better-performing crops and better on-farm profits.",
"Description": "Taking a 360-degree view of key yield-limiting variables, 360 Yield Center develops strategies for better-performing crops and better on-farm profits.",
"City": "Morton",
"State/Region": "Illinois",
"Founding Year": 2014,
Expand Down Expand Up @@ -124,7 +124,7 @@
"Organization Name": "3Tier (Europe) ",
"Organization Type": "For-profit",
"Sectors": "Energy and climate",
"Description": "3TIER is a global environmental and industrial measurement company providing weather-driven renewable energy risk assessment and forecasting for wind, solar, and hydro power projects.",
"Description": "3TIER is a global environmental and industrial measurement company providing weather-driven renewable energy risk assessment and forecasting for wind, solar, and hydro power projects.",
"City": "Helsinki",
"State/Region": "Uusimaa",
"Founding Year": 2012,
Expand All @@ -139,7 +139,7 @@
"Organization Name": "5PSolutions",
"Organization Type": "For-profit",
"Sectors": "IT and geospatial",
"Description": "5PSolutions are artisans of mobile platforms.",
"Description": "5PSolutions are artisans of mobile platforms.",
"City": "Fairfax",
"State/Region": "Virginia",
"Founding Year": 2007,
Expand All @@ -154,7 +154,7 @@
"Organization Name": "AAA National",
"Organization Type": "Other",
"Sectors": "Transportation and logistics",
"Description": "AAA provides services such as travel, automotive, insurance, financial, and discounts.",
"Description": "AAA provides services such as travel, automotive, insurance, financial, and discounts.",
"City": "Irving",
"State/Region": "Texas",
"Founding Year": 1902,
Expand Down Expand Up @@ -184,33 +184,90 @@
"Organization Name": "ABRELATAM",
"Organization Type": "Nonprofit",
"Sectors": "Governance",
"Description": "ABRELATAM is an conference that seeks to accelerate the process of opening information through Open Data transparency and promote the Latin America.",
"Description": "ABRELATAM is an conference that seeks to accelerate the process of opening information through Open Data transparency and promote the Latin America.",
"City": "Santiago",
"State/Region": "",
"Founding Year": 2015,
"Size": "",
"Type of Data Used": "",
"profileID": "1687"
}

];
</script>

</head>

<body>
<!-- Feel free to add empty tags. Data shouldn't be here. -->
<div id="org_table"></div>
<h1>Table Representation of Questions</h1>
<table style = "width:100%">
<tr>
<th>Nonprofit Orgs</th>
<th>Orgs less than 10 yrs old</th>
<th>Orgs in North America</th>
<th>Orgs using Transportation data type</th>
<th>Orgs with high income</th>
</tr>
<tr>
<th><div id = "question1"></div></th>
<th><div id = "question2"></div></th>
<th><div id = "question3"></div></th>
<th><div id = "question4"></div></th>
<th><div id = "question5"></div></th>
</tr>
</table>




<script>
// outputs the first item of the organizations array. Just for testing.
// console.log(organizations[0]);
console.log("test");

console.log(organizations[0].Region);

// console.log(organizations[0]);



// Your JavaScript code goes here


var count = 0;
var count2 = 0;
var count3 = 0;
var count4 = 0;
var count5 = 0;

for(var i = 0; i < organizations.length; i++){
if((organizations[i]["Organization Type"])==="Nonprofit"){
count++;
}

if(2018 - organizations[i]["Founding Year"] < 10){
count2++;
}
if((organizations[i].Region)==="North America"){
count3++;
}
if((organizations[i]["Type of Data Used"])==="Transportation"){
count4++;
}else if((organizations[i]["Type of Data Used"])==="Transportation, Geospatial, Business"){
count4++;
}
if((organizations[i]["Country Income Level"])==="High income"){
count5++;
}

}

document.getElementById("question1").innerHTML = count
document.getElementById("question2").innerHTML = count2
document.getElementById("question3").innerHTML = count3
document.getElementById("question4").innerHTML = count4
document.getElementById("question5").innerHTML = count5

</script>

</body>
</html>
</html>
Empty file added git/introductions/Middleton.md
Empty file.