Languages and tools:
PHP, JavaScript, Ajax, HTML
API: Google Maps API
Description:
- The purpose of this web application is to provide a quick overview of the population distribution within a country and if taking into consideration the size of circles in the heatmap, an overview of the population density.
- The application is built using the Google Maps API and uses their visualization library in addition to the default functionality provided by the API.
- The application needs to pieces of information as input: the name of the country and the population limit. The population limit is very important since it is the decisive factor when creating the visualization. The application will consider when building the visualization only the cities in the chosen country which have a population above the population limit.
- For a very detailed representation, it is necessary to use a low limit, which means the application will consider more cities when building the heatmap.
Data manipulation:
- The application uses the MySQL database provided by Windows Azure which is automatically linked to the web-site. It contains two tables, one which was populated with data from the original data source using Navicat and one additional table which contains a match between the country abbreviation and the name of the country. The second table was needed because I wanted to give the user the possibility of searching a country by its name instead of its abbreviation.
- Once the country value was entered, and the user hits “Search”, the application will use the second table to find the corresponding abbreviation for the input country.
- Then, using that abbreviation, it queries the original data for different information like name of the city, latitude, longitude and population which are then used to implement the actual visualization.
- In order to create the tables in my database and fill in the data, I set up the connection to my database using Navicat and then using the built-in Import Wizard, I parsed the input data source and I populated both tables.
Features:
- The application uses the latitude, longitude and the population value for each city from the database to build a heatmap layer which illustrates the population density. Google Maps API builds the visualization considering the weight of each point which in my case is the population and the location of the point.
- The main web page provides three different settings which can be used to customize and enhance the visualization depending on the input used. The first two offers two sliders for the user to change the radius scale of the circles which are used in the representation and a slider which changes the opacity of the visualization. The third setting is the Dissipation which, if it is checked it will adjust the represented data depending on the zoom level.
- To obtain a much better representation of the data, the application maps the population values to a custom interval which depends on the extreme population values. Each population value will be mapped to the interval [0, maxPopulation/minPopulation].