Skip to content

Modifying Variables

MFHolm edited this page Jan 29, 2018 · 1 revision

The first and most straightforward way of changing the model is to modify constants or the initial values of the indicators. The constants in the bottom of the spreadsheet are located in the different classes of AvailableData.ts. These can be modified to change how the indicators change during the simulation. The initial values of the indicators are located in the file Overlay.ts as mentioned before. The data in Overlay.ts is structured using JSON. The file contains data for every country, while the spreadsheet only lists the data for the countries of the two roles where EAST is Bulgaria and WEST is the Netherlands. The data from the code for Bulgaria is listed below along with the screenshot from the spreadsheet. CO2 emissions from the spreadsheet corresponds to emissionsCO2, comfort level corresponds to housing and GDP corresponds to GDP. The temperature in the spreadsheet is listed from June to June while in the code is listed from January to January. This initial data can be modified by modifying the numbers in the file. The code also contains data for drawing the countries on the map, which the spreadsheet does not.

{ "type": "Feature", "id": "BGR", "properties": { "name": "Bulgaria", "emisionsCO2": { value: 5.4, east: 50, west: 50 }, "housing": 30, "GNP": 17512, "temp": [-0.6, 0.4, 3.9, 8.8, 13.6, 17.3, 19.6, 19.3, 15.9, 11.0, 5.6, 1.3], "neighboors": ["ROU", "TUR", "GRC", "MKD", "SRB"] }, "geometry": { "type": "Polygon", "coordinates": [[[22.65715, 44.234923], [22.944832, 43.823785], [23.332302, 43.897011], [24.100679, 43.741051], [25.569272, 43.688445], [26.065159, 43.943494], [27.2424, 44.175986], [27.970107, 43.812468], [28.558081, 43.707462], [28.039095, 43.293172], [27.673898, 42.577892], [27.99672, 42.007359], [27.135739, 42.141485], [26.117042, 41.826905], [26.106138, 41.328899], [25.197201, 41.234486], [24.492645, 41.583896], [23.692074, 41.309081], [22.952377, 41.337994], [22.881374, 41.999297], [22.380526, 42.32026], [22.545012, 42.461362], [22.436595, 42.580321], [22.604801, 42.898519], [22.986019, 43.211161], [22.500157, 43.642814], [22.410446, 44.008063], [22.65715, 44.234923]]] } },