Global

Methods

(async) fetchAdmissionData() → {Promise.<Array.<AdmissionItem>>}

Fetch statistics from JSON file - used as data source for both charts
Source:
Returns:
Type
Promise.<Array.<AdmissionItem>>

initChartsPage() → {Promise.<void>}

Initialize diagram page - render both charts
Source:
Returns:
Type
Promise.<void>

initMapPage() → {void}

Initialize the map page - if req elements arent foound it does nothing
Source:
Returns:
Type
void

toNumber(value) → {number}

Convert a number-like string to real number - trim spaces, return 0 if value isnt a num
Parameters:
Name Type Description
value string
Source:
Returns:
Type
number

topByTotal(data, type, count) → {Array.<{name: string, total: number}>}

Filter dataset by type, sort by applicantsTotal - return top N rows
Parameters:
Name Type Description
data Array.<AdmissionItem>
type "Kurs" | "Program"
count number
Source:
Returns:
Type
Array.<{name: string, total: number}>

updateMap(frame, lat, lon) → {void}

Update OpenStreetMap iframe so it shows map centered around coordinates marker at selected place
Parameters:
Name Type Description
frame HTMLIFrameElement
lat number
lon number
Source:
Returns:
Type
void

Type Definitions

AdmissionItem

Single row from dataset
Type:
  • Object
Properties:
Name Type Description
type "Kurs" | "Program"
name string
applicantsFirstHand string
applicantsTotal string
Source:

GeoResult

Cleaned up geocoding for the app
Type:
  • Object
Properties:
Name Type Description
lat number
lon number
displayName string
Source: