Difference between revisions of "Group10 Analysis Report"
Xjsong.2017 (talk | contribs) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <div style="background:# | + | <div style="background:#2a2a2a; border:#002060; padding:15px; text-align:center;"> |
− | <font size =8; color="#FFFFFF"><span style="font-family:Segoe UI Light;"> Voice | + | <font size =8; color="#FFFFFF"><span style="font-family:Segoe UI Light;"> Voice Integrated Visual Analysis of Global Migration </span></font> |
</div> | </div> | ||
<!--MAIN HEADER --> | <!--MAIN HEADER --> | ||
{|style="background-color:#002060;" width="100%" cellspacing="0" cellpadding="0" valign="top" border="0" | | {|style="background-color:#002060;" width="100%" cellspacing="0" cellpadding="0" valign="top" border="0" | | ||
− | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:# | + | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:#2a2a2a; text-align:center;" width="14.28%" | |
; | ; | ||
[[Group10_Overview| <font color="#FFFFFF">Introduction</font>]] | [[Group10_Overview| <font color="#FFFFFF">Introduction</font>]] | ||
− | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:# | + | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:#2a2a2a; text-align:center;" width="14.28%" | |
; | ; | ||
[[Group10_Proposal| <font color="#FFFFFF">Proposal</font>]] | [[Group10_Proposal| <font color="#FFFFFF">Proposal</font>]] | ||
− | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:# | + | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:#b95030; text-align:center;" width="14.28%" | |
; | ; | ||
[[Group10_Analysis Report| <font color="#FFFFFF">Project Report</font>]] | [[Group10_Analysis Report| <font color="#FFFFFF">Project Report</font>]] | ||
− | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:# | + | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:#2a2a2a; text-align:center;" width="14.28%" | |
; | ; | ||
[[Group10_Poster| <font color="#FFFFFF">Poster</font>]] | [[Group10_Poster| <font color="#FFFFFF">Poster</font>]] | ||
− | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:# | + | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:#2a2a2a; text-align:center;" width="14.28%" | |
; | ; | ||
− | [[Group10_Application| <font color="#FFFFFF"> | + | [[Group10_Application| <font color="#FFFFFF">Dashboard</font>]] |
− | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:# | + | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:#2a2a2a; text-align:center;" width="14.28%" | |
+ | ; | ||
+ | [[Group10_research paper| <font color="#FFFFFF">Research Paper</font>]] | ||
+ | |||
+ | | style="font-family:Georgia; font-size:100%; solid #FFFFFF; background:#2a2a2a; text-align:center;" width="14.28%" | | ||
; | ; | ||
[https://wiki.smu.edu.sg/1718t3isss608/Project_Groups <font color="#FFFFFF">Back to Main</font>]] | [https://wiki.smu.edu.sg/1718t3isss608/Project_Groups <font color="#FFFFFF">Back to Main</font>]] | ||
Line 55: | Line 59: | ||
<br><br> | <br><br> | ||
Load R shiny app in Chrome browser and activate Annyang, the functions defined to recognize the user's voice input are loaded onto Annyang and the javascript is included into R shiny as a tag. | Load R shiny app in Chrome browser and activate Annyang, the functions defined to recognize the user's voice input are loaded onto Annyang and the javascript is included into R shiny as a tag. | ||
− | [[file:annyang1.png|600px|center]] | + | [[file:annyang1.png|600px|center]]<br> |
The user speaks the voice input in the defined command format and the input value is parsed into shiny using the shiny.oninput method. | The user speaks the voice input in the defined command format and the input value is parsed into shiny using the shiny.oninput method. | ||
− | [[file:annyang2.png|600px|center]] | + | [[file:annyang2.png|600px|center]]<br> |
The parsed input which is the user's voice converted to text is received in shiny by using an observe command which is used to update the state of the dashboard input element using the corresponding oninput method. | The parsed input which is the user's voice converted to text is received in shiny by using an observe command which is used to update the state of the dashboard input element using the corresponding oninput method. | ||
− | [[file:annyang3.png|800px|center]]<br><br> | + | [[file:annyang3.png|800px|center]]<br> |
− | [[file:Chord1.gif|800px|center]]<br><br> | + | The voice command "TYPE: REGION/TYPE: CONTINENT" is used to modify the aggregation level of the flows in the Chord plot.<br> |
− | [[file:map1_1.gif|800px|center]]<br><br> | + | [[file:Chord1.gif|800px|center]]<br> |
− | [[file:tab4.gif|800px|center]]<br><br> | + | The voice command "SHOW TOP 5/10/15" is used to modify the number of countries displayed in the bar chart representing top countries by remittance/migration.<br> |
+ | [[file:map1_1.gif|800px|center]]<br> | ||
+ | The voice command "GO TO HOME/TREND/MAP/UNILATERAL/BILATERAL" is used to switch tabs in the Shiny app.<br> | ||
+ | [[file:tab4.gif|800px|center]]<br> | ||
+ | The voice control overview of all commands.<br> | ||
[[file:G10Overview.gif|800px|center]]<br><br> | [[file:G10Overview.gif|800px|center]]<br><br> | ||
</font></div></div> | </font></div></div> | ||
− | |||
− | |||
<!-- Visualization Methodology --> | <!-- Visualization Methodology --> | ||
Line 82: | Line 88: | ||
The above figure has 2 connected chord diagrams. The chord diagram on the left visualizes migration flows on a continent or a sub region level. Once a flow is selected, the second chord diagram reacts to the change and displays countries accordingly. The country flow migration flow can then be visualized. | The above figure has 2 connected chord diagrams. The chord diagram on the left visualizes migration flows on a continent or a sub region level. Once a flow is selected, the second chord diagram reacts to the change and displays countries accordingly. The country flow migration flow can then be visualized. | ||
<br><br> | <br><br> | ||
− | ===2. Choropleth Map=== | + | ===2. Bidirectional Trend chart=== |
+ | The trend chart is a graphical representation of time series data showing the trend line that reveals a general pattern of change. | ||
+ | The chord diagram gives the bidirectional flow of migrants for a year, so we use a line chart to observe the trend of the migrant stock over the years. The input to the line chart is from the chord diagram when a flow line is selected. The line chart displays the bidirectional migrant stock trend for the two countries in the flow line selected. <br><br> | ||
+ | ===3. Choropleth Map=== | ||
A choropleth map is a thematic map in which areas are shaded or patterned in proportion to the measurement of the statistical variable being displayed on the map, such as population density or per-capita income. Choropleth maps provide an easy way to visualize how a measurement varies across a geographic area or show the level of variability within a region. A heat map is similar but does not use geographic boundaries. | A choropleth map is a thematic map in which areas are shaded or patterned in proportion to the measurement of the statistical variable being displayed on the map, such as population density or per-capita income. Choropleth maps provide an easy way to visualize how a measurement varies across a geographic area or show the level of variability within a region. A heat map is similar but does not use geographic boundaries. | ||
<br><br> | <br><br> | ||
Leaflet is one of the most popular open-source JavaScript libraries for interactive maps. 'leaflet' package makes it easy to integrate and control Leaflet maps in R. Choropleth Maps display divided geographical regions that are coloured in relation to a data variable. This provides a way to visualise values over a geographical area, which can show variation across the displayed location. | Leaflet is one of the most popular open-source JavaScript libraries for interactive maps. 'leaflet' package makes it easy to integrate and control Leaflet maps in R. Choropleth Maps display divided geographical regions that are coloured in relation to a data variable. This provides a way to visualise values over a geographical area, which can show variation across the displayed location. | ||
<br><br> | <br><br> | ||
− | [[file: | + | [[file:g10line1.png|700px|center]]<br> |
In this case, we use choropleth map to display the migration and remittance data and filtering out the top 10 migrants/remittance countries after selecting the origin country using select input. When compared to chord diagram, which can only show the value of the migrants, in this map, we can also see the location of each country to investigate the detail of why people migrate. In this map, the darker the colour the higher the value. Therefore, we can find out the countries with large number of migrants, but with small amount of remittance. | In this case, we use choropleth map to display the migration and remittance data and filtering out the top 10 migrants/remittance countries after selecting the origin country using select input. When compared to chord diagram, which can only show the value of the migrants, in this map, we can also see the location of each country to investigate the detail of why people migrate. In this map, the darker the colour the higher the value. Therefore, we can find out the countries with large number of migrants, but with small amount of remittance. | ||
<br><br> | <br><br> | ||
− | === | + | ===4. Correlation Plot=== |
Corrplot contains algorithms to do matrix reordering and is good at details, including choosing colour, text labels, colour labels, layout. The corrplot package is a graphical display of a correlation matrix, confidence interval. | Corrplot contains algorithms to do matrix reordering and is good at details, including choosing colour, text labels, colour labels, layout. The corrplot package is a graphical display of a correlation matrix, confidence interval. | ||
<br><br> | <br><br> | ||
Line 107: | Line 116: | ||
[[file:g10corr.png|900px|center]]<br> | [[file:g10corr.png|900px|center]]<br> | ||
<br> | <br> | ||
− | === | + | ===5. Quadrant Plot=== |
Quadrant Analysis is used to see the relationship between two data variables analysed on four quadrants. | Quadrant Analysis is used to see the relationship between two data variables analysed on four quadrants. | ||
<br><br> | <br><br> | ||
Line 114: | Line 123: | ||
[[file:G1011.png|900px|center]]<br><br> | [[file:G1011.png|900px|center]]<br><br> | ||
This plot investigates the relationship between migration and remittance percentile for a selected origin country. The bubbles are coloured by region or income level or development type and sized by the GDP Per Capita of the destination country. | This plot investigates the relationship between migration and remittance percentile for a selected origin country. The bubbles are coloured by region or income level or development type and sized by the GDP Per Capita of the destination country. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ===6. Bar chart=== | |
− | + | Bar charts are used to visualize the relationship between one categorical variable and one continuous variable. We have used it in it’s few forms to visualize part of whole, trend and migrant remittance relationships plotted using ggplot wrapped on to the plotly package, since we do not require any of the plotly filter features, we have removed all the unnecessary non-data ink. | |
− | == | + | The below 100% stacked bar chart shows the trend change in the part whole relationship of the world’s total migrants as a proportion of their current country of residence by income level. There is an increasing trend in the migrants moving towards high income countries. <br><br> |
− | + | [[file:g10bar1.png|900px|center]]<br><br> | |
− | < | + | The below dodged bar chart presents a gender bias analysis, when a flow and year is picked, bars indicating the trend of men and women migrant stock numbers over years is plotted. The selected year is highlighted in red, using ggplot’s grammar of graphics by superimposing multiple layers by varying fill and border functions. <br><br> |
− | < | + | [[file:g10bar2.png|900px|center]]<br><br> |
− | + | The below dodged bar chart is implemented using plotly’s event data method to captured a user selected subset of input data from an existing plotly plot to interactively visualize the migration and remittance numbers from an origin country across all selected destination countries.<br><br> | |
− | : | + | [[file:g10bar3.png|900px|center]]<br><br> |
</font></div></div> | </font></div></div> | ||
− | + | ==References== | |
− | |||
− | == | ||
<div style="font-family:Georgia; font-size:100%; padding: 0px 0px 0px 10px;"> | <div style="font-family:Georgia; font-size:100%; padding: 0px 0px 0px 10px;"> | ||
<div style="font-family:Georgia;"> | <div style="font-family:Georgia;"> | ||
<font size = 3; color ="#000000 | <font size = 3; color ="#000000 | ||
"> | "> | ||
− | :)) | + | [1] World GeoJSON johan/world.geo.json. [https://github.com/johan/world.geo.json] (2018). <br> |
+ | [2] Speech KITT GUI for Speech Recognition. TalAter/SpeechKITT. [https://github.com/TalAter/SpeechKITT] (2018). <br> | ||
+ | [3] Annyang Javascript library for Speech recognition. [https://github.com/TalAter/annyang] (2018). <br> | ||
+ | [4] Nogle, J. (1994). The Systems Approach to International Migration: An Application of Network Analysis Methods. International Migration, 32(2), 329-342. doi: 10.1111/j.1468-2435.1994.tb00156.x <br> | ||
+ | [5] Bertocchi, G., & Strozzi, C. (2007). The age of mass migration. London: Centre for Economic Policy Research. <br> | ||
+ | [6] Castles, S., & Miller, M. J. (1998). The age of migration: International population movements in the modern world. New York: Guilford Press. | ||
+ | Gheasi, M., & Nijkamp, P. (2017). <br> | ||
+ | [7] A Brief Overview of International Migration Motives and Impacts, with Specific Reference to FDI. Economies, 5(3), 31. | ||
</font></div></div> | </font></div></div> |
Latest revision as of 11:32, 19 August 2018
Voice Integrated Visual Analysis of Global Migration
|
|
|
|
|
|
|
Contents
Data Preparation
The dataset for building the visual models for this analysis have been obtained from World Bank Open Data repository. We have taken the bilateral matrix of migrant stock counts and the remittance amounts contributed by the migrants for the years 1990-2015 in 5-year intervals. To added dimensionality to the analysis we also obtained the GDP per capita (USD), GDP (USD), Population, Migrants as a % of population from the World Bank’s WDI (World development Index) series data.
Lastly, we have used a GeoJSON file with polygon data for all countries of the world to visualize the spatial distribution for analysis. The data was fairly clean and the cleaning steps involved only replacing the cells that were filled with dots in cells indicating no migrant stock from the row origin to column destination country to blanks for readability into R. The rows containing the sub-region, continent, world level aggregation of migrant stock to the countries were removed.
The other data preparation involved reshaping the data to suit creating the visualizations. For the chord diagram, a bilateral matrix with non-zero cells of migrant stock numbers and zeroed diagonal matrix was created.
For the choropleth map, the migrant stock data was binned to percentiles based on the origin/destination country.
For performing the quadrant analysis, the migrant stock inverse percentiles are calculated to each origin country dynamically for every destination.
For the corrplot, the bilateral balance index model was applied to the data by categorizing the countries based on their development levels.
Voice Integration Methodology
Annyang is a tiny JavaScript library for performing Speech Recognition and SpeechKITT is a GUI for the user to interact with Speech Recognition. Our project integrates both Annyang and Speech KITT using JavaScript to send the voice input to R Shiny dashboard for visual analysis.
Load R shiny app in Chrome browser and activate Annyang, the functions defined to recognize the user's voice input are loaded onto Annyang and the javascript is included into R shiny as a tag.
The user speaks the voice input in the defined command format and the input value is parsed into shiny using the shiny.oninput method.
The parsed input which is the user's voice converted to text is received in shiny by using an observe command which is used to update the state of the dashboard input element using the corresponding oninput method.
The voice command "TYPE: REGION/TYPE: CONTINENT" is used to modify the aggregation level of the flows in the Chord plot.
The voice command "SHOW TOP 5/10/15" is used to modify the number of countries displayed in the bar chart representing top countries by remittance/migration.
The voice command "GO TO HOME/TREND/MAP/UNILATERAL/BILATERAL" is used to switch tabs in the Shiny app.
The voice control overview of all commands.
Visualization Methodology
1. Chord Diagram
The chord diagram visualises the inter-relationships between entities. The connections between entities are used to display that they share something in common. This makes Chord Diagrams ideal for comparing the similarities within a dataset or between different groups of data. Nodes are arranged along a circle, with the relationships between points connected to each other either using arcs or Bezier curves. Values are assigned to each connection, which is represented proportionally by the size of each arc. Colour can be used to group the data into different categories, which aids in making comparisons and distinguishing groups.
The ‘chorddiag’ package allows to create interactive chord diagrams using the JavaScript visualization library D3 from within R using the html widgets interfacing framework.
The above figure has 2 connected chord diagrams. The chord diagram on the left visualizes migration flows on a continent or a sub region level. Once a flow is selected, the second chord diagram reacts to the change and displays countries accordingly. The country flow migration flow can then be visualized.
2. Bidirectional Trend chart
The trend chart is a graphical representation of time series data showing the trend line that reveals a general pattern of change.
The chord diagram gives the bidirectional flow of migrants for a year, so we use a line chart to observe the trend of the migrant stock over the years. The input to the line chart is from the chord diagram when a flow line is selected. The line chart displays the bidirectional migrant stock trend for the two countries in the flow line selected.
3. Choropleth Map
A choropleth map is a thematic map in which areas are shaded or patterned in proportion to the measurement of the statistical variable being displayed on the map, such as population density or per-capita income. Choropleth maps provide an easy way to visualize how a measurement varies across a geographic area or show the level of variability within a region. A heat map is similar but does not use geographic boundaries.
Leaflet is one of the most popular open-source JavaScript libraries for interactive maps. 'leaflet' package makes it easy to integrate and control Leaflet maps in R. Choropleth Maps display divided geographical regions that are coloured in relation to a data variable. This provides a way to visualise values over a geographical area, which can show variation across the displayed location.
In this case, we use choropleth map to display the migration and remittance data and filtering out the top 10 migrants/remittance countries after selecting the origin country using select input. When compared to chord diagram, which can only show the value of the migrants, in this map, we can also see the location of each country to investigate the detail of why people migrate. In this map, the darker the colour the higher the value. Therefore, we can find out the countries with large number of migrants, but with small amount of remittance.
4. Correlation Plot
Corrplot contains algorithms to do matrix reordering and is good at details, including choosing colour, text labels, colour labels, layout. The corrplot package is a graphical display of a correlation matrix, confidence interval.
Bilateral balance index is a measure of strength of balance in a bi-directional flow data. It ranges from 0 to 1, with 1 indicating an equally strong flow in both directions.
For any country pair i-j, the bilateral balance is calculated as:
Mij = Migrant stock in j from i in a time period
Mji = Migrant stock in i from j in a time period
The corr plot is used to study the bilateral balance in the migration between countries of same development types. Darker cells in the matrix indicate higher bilateral balance between two countries.
5. Quadrant Plot
Quadrant Analysis is used to see the relationship between two data variables analysed on four quadrants.
Plotly's R graphing library makes interactive, publication-quality graphs online. Plotly allows users to Zoom, Pan, and Hover Controls in Plotly Graphs. Also, when the user hovers over a point on a scatter plot, the tooltip shows information about this point.
This plot investigates the relationship between migration and remittance percentile for a selected origin country. The bubbles are coloured by region or income level or development type and sized by the GDP Per Capita of the destination country.
6. Bar chart
Bar charts are used to visualize the relationship between one categorical variable and one continuous variable. We have used it in it’s few forms to visualize part of whole, trend and migrant remittance relationships plotted using ggplot wrapped on to the plotly package, since we do not require any of the plotly filter features, we have removed all the unnecessary non-data ink.
The below 100% stacked bar chart shows the trend change in the part whole relationship of the world’s total migrants as a proportion of their current country of residence by income level. There is an increasing trend in the migrants moving towards high income countries.
The below dodged bar chart presents a gender bias analysis, when a flow and year is picked, bars indicating the trend of men and women migrant stock numbers over years is plotted. The selected year is highlighted in red, using ggplot’s grammar of graphics by superimposing multiple layers by varying fill and border functions.
The below dodged bar chart is implemented using plotly’s event data method to captured a user selected subset of input data from an existing plotly plot to interactively visualize the migration and remittance numbers from an origin country across all selected destination countries.
References
[1] World GeoJSON johan/world.geo.json. [1] (2018).
[2] Speech KITT GUI for Speech Recognition. TalAter/SpeechKITT. [2] (2018).
[3] Annyang Javascript library for Speech recognition. [3] (2018).
[4] Nogle, J. (1994). The Systems Approach to International Migration: An Application of Network Analysis Methods. International Migration, 32(2), 329-342. doi: 10.1111/j.1468-2435.1994.tb00156.x
[5] Bertocchi, G., & Strozzi, C. (2007). The age of mass migration. London: Centre for Economic Policy Research.
[6] Castles, S., & Miller, M. J. (1998). The age of migration: International population movements in the modern world. New York: Guilford Press.
Gheasi, M., & Nijkamp, P. (2017).
[7] A Brief Overview of International Migration Motives and Impacts, with Specific Reference to FDI. Economies, 5(3), 31.