The aim of this app is to visualise the noise generated by traffic in Dublin city, relevant to the user's current location. Allowing users to retrieve a visualisation of the noise pollution in their surrounding area
Opted to use Firebase as it allows for easier integration into android studio, as uniform storage types are not needed with Firebase.
The general flow of the apps is :
The appliation will first make use of the database stored in Firebase and the Dublin noise API.
First an onPublicRequest permission is invoked in order to gain access to the device's location( this required for android devices on the newer OS). Once enabled the location listener is called, this class then makes a call to the API, passing in the current latitude a longitude from the device.
This API will return ;
-
Location: An integer from 1 to 12 representing the site you wish to query , which defaults to 1.
-
Start: the start date of the measurement time frame you wish to query. Must be a unix timestamp in seconds.
-
End: The end date of the measurement time frame you wish to query. Must be a unix timestamp in seconds
Now that we have the noise data points that will be drawn at the location, they then need to be loaded into the map to draw the location corresponding points to. To load the map instance we look to the MapAtivity class, which uses Google Map API to call a draw map.
Then there is the KML layer. This is gotten from importing the google.android.data to read the klm files from the dataset saved in the android environment. The KML layer receives the map and the instance of longitude and latitude from the API key as parameters. This key then returns the measurements for the location and draws the data on top of the map with the API pre specified colours.
This dataset contains the noise model results for the Dublin region illustrating the population exposure to sound from specific traffic sources. The noise maps show colour coded areas in Dublin based on sound levels in 5 bands, which increment in 5 decibels. The night time band starts at 50 decibels and the 24 hour band starts at 55 decibels. There are two categories of sound sources mapped, all roads and major roads (roads with more than 3 million vehicle passages per year). Traffic volumes are averaged to an hourly traffic count over a typical 24 hour day.
The dataset was neither a json file nor a csv. It was the KML, which is an extension of the XML data format and it represents geographical data on a map. Firebase database does not support kml, especially one of this magnitude and size. Instead it saves it as an xml file. One could have chose to switch to google cloud services as it supports KML, but there may be issues with storage uniformity for other sensor data. As such, this data is stored in firebase.
The android studio environment is used to visualise the data, load the geolocation, the users current location and to draw the corresponding data streams on top of the map.
For data points in a given area a smaller number of data is visualised, this drasctisally decreases load time and incase. The user may only want to see noise in their given vercinity and not the entirety of Dublin and the greater Dublin area, this choice is made using the buttons at the top