Created
September 11, 2019 11:01
-
-
Save Ayeeta/9060fe454add0baeba4c380e5c72b979 to your computer and use it in GitHub Desktop.
Plot international migrations from 2010 - 2018 through all states
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
state = states["State"] | |
international_2010 = states["INTERNATIONAL_MIG_2010"] | |
international_2011 = states["INTERNATIONAL_MIG_2011"] | |
international_2012 = states["INTERNATIONAL_MIG_2012"] | |
international_2013 = states["INTERNATIONAL_MIG_2013"] | |
international_2014 = states["INTERNATIONAL_MIG_2014"] | |
international_2015 = states["INTERNATIONAL_MIG_2015"] | |
international_2016 = states["INTERNATIONAL_MIG_2016"] | |
international_2017 = states["INTERNATIONAL_MIG_2017"] | |
international_2018 = states["INTERNATIONAL_MIG_2018"] | |
trace0 = go.Scatter( | |
x = state, | |
y = international_2010, | |
mode = "lines", | |
name = "International Migration 2010" | |
) | |
trace1 = go.Scatter( | |
x = state, | |
y = international_2011, | |
mode = "lines", | |
name = "International Migration 2011" | |
) | |
trace2 = go.Scatter( | |
x = state, | |
y = international_2012, | |
mode = "lines", | |
name = "International Migration 2012" | |
) | |
trace3 = go.Scatter( | |
x = state, | |
y = international_2013, | |
mode = "lines", | |
name = "International Migration 2013" | |
) | |
trace4 = go.Scatter( | |
x = state, | |
y = international_2014, | |
mode = "lines", | |
name = "International Migration 2014" | |
) | |
trace5 = go.Scatter( | |
x = state, | |
y = international_2015, | |
mode = "lines", | |
name = "International Migration 2015" | |
) | |
trace6 = go.Scatter( | |
x = state, | |
y = international_2016, | |
mode = "lines", | |
name = "International Migration 2016" | |
) | |
trace7 = go.Scatter( | |
x = state, | |
y = international_2017, | |
mode = "lines", | |
name = "International Migration 2017" | |
) | |
trace8 = go.Scatter( | |
x = state, | |
y = international_2018, | |
mode = "lines", | |
name = "International Migration 2018" | |
) | |
data = [trace0,trace1, trace2, trace3, trace4,trace5, trace6, trace7,trace8] | |
layout = go.Layout( | |
title = "International Migration 2010 - 2018", | |
xaxis=dict( | |
title='US States', | |
tickmode='linear'), | |
yaxis=dict( | |
title='Internation Migration') | |
) | |
fig = go.Figure(data = data, layout = layout) | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment