├── Procfile ├── requirements.txt ├── .gitignore ├── app.py └── data └── parallel_coordinates.csv /Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn app:server -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pandas 2 | plotly 3 | dash 4 | gunicorn -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | *.pyc 3 | .DS_Store 4 | .env 5 | *.ipynb 6 | test 7 | -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | import dash 2 | import dash_core_components as dcc 3 | import dash_html_components as html 4 | import plotly.express as px 5 | import pandas as pd 6 | 7 | ### FIGURE 1 8 | 9 | df = pd.read_csv("data/parallel_coordinates.csv") 10 | 11 | fig = px.parallel_coordinates(df, color="Cost Penalty [%]", color_continuous_scale="Viridis") 12 | fig.update_layout(margin={"r":0,"t":50,"l":80,"b":10}, height=600) 13 | 14 | ### Text 15 | 16 | markdown_text = ''' 17 | ### Info and Explanation 18 | 19 | 20 | I created this [parallel coordinates plot](https://plotly.com/python-api-reference/generated/plotly.express.parallel_coordinates.html) 21 | with Plotly and Dash, following up on a discussion on [this](https://twitter.com/fneum_/status/1308728435787866113?s=20) 22 | Twitter thread about the article: 23 | 24 | **Fabian Neumann, Tom Brown, 25 | The near-optimal feasible space of a renewable power system model, 26 | *Electric Power Systems Research*, 27 | Volume 190, 28 | 2021, 29 | 106690, 30 | [doi:10.1016/j.epsr.2020.106690](https://doi.org/10.1016/j.epsr.2020.106690), 31 | [arXiv:1910.01891](https://arxiv.org/abs/1910.01891).** 32 | 33 | This page is a work in progress! I will add new features and more detailed explanations step by step. 34 | 35 | Copyright 2020 © [Fabian Neumann](https://www.neumann.fyi/). 36 | This work is licensed under a [Creative Commons Attribution 4.0 International license](https://creativecommons.org/licenses/by/4.0/). 37 | ''' 38 | 39 | ### APPLICATION 40 | 41 | external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] 42 | 43 | app = dash.Dash(__name__, external_stylesheets=external_stylesheets) 44 | 45 | server = app.server 46 | 47 | app.layout = html.Div(style={'backgroundColor': "#ffffff"}, children=[ 48 | html.H1(children='nearoptimal.systems', style={"textAlign": "center"}), 49 | 50 | html.Div([ 51 | 52 | dcc.Graph( 53 | id="map", 54 | figure=fig 55 | ), 56 | 57 | ], className="row"), 58 | 59 | dcc.Markdown(children=markdown_text) 60 | 61 | 62 | 63 | ]) 64 | 65 | if __name__ == '__main__': 66 | app.run_server() -------------------------------------------------------------------------------- /data/parallel_coordinates.csv: -------------------------------------------------------------------------------- 1 | Gini Coefficient [-],Solar [GW],Onshore Wind [GW],Offshore Wind [GW],Hydrogen Storage (168h) [GW],Battery Storage (6h) [GW],Transmission Expansion [TWkm],Cost Penalty [%] 2 | 0.7461932296181857,427.263,151.877,463.427,126.788,46.724,560.3017961651326,0.5 3 | 0.7382518069889894,398.737,464.476,277.60699999999997,125.546,40.602,565.0534031597307,0.5 4 | 0.7688830299823324,277.991,337.971,384.317,125.508,38.006,578.1027145245321,0.5 5 | 0.7167763894375834,557.8,286.275,349.099,126.781,48.838,549.2613011062821,0.5 6 | 0.7425874242273338,490.866,176.748,422.182,130.53,49.563,560.1036803999422,0.5 7 | 0.7458472511078695,337.563,436.196,320.078,119.918,38.547,564.4789070825178,0.5 8 | 0.7295095385193455,443.979,449.536,268.193,130.502,41.402,564.0075913336626,0.5 9 | 0.7496392281839024,374.221,167.587,475.611,122.87,43.954,561.1903533407242,0.5 10 | 0.7514912593214115,384.926,346.375,346.08,150.491,14.374,561.692698513116,0.5 11 | 0.7419123368795866,440.511,276.344,378.83299999999997,110.097,76.715,564.7976614902909,0.5 12 | 0.7339202559816091,408.198,307.632,381.80899999999997,99.712,62.884,583.9246714530618,0.5 13 | 0.7537520075175645,415.14,326.133,344.23199999999997,156.862,21.567,543.094112544431,0.5 14 | 0.7349407871152509,366.198,353.347,365.3,113.468,34.59,587.7325966268895,0.5 15 | 0.7523110673634377,454.9,275.552,367.12199999999996,131.608,64.478,536.1649731956401,0.5 16 | 0.7303091701660116,452.028,296.431,373.219,136.175,43.321,491.1023017638766,0.5 17 | 0.7522798105465758,388.979,318.481,359.914,119.253,44.629,638.4462379948121,0.5 18 | 0.7390081057401308,426.668,107.128,496.465,127.789,45.345,559.4928946763287,1.0 19 | 0.7189809768486422,395.157,531.886,241.686,124.425,40.8,565.8170015795077,1.0 20 | 0.7737796622142348,226.446,343.598,399.105,125.546,35.392,582.5947200699674,1.0 21 | 0.7010669065863291,627.559,279.898,341.633,125.584,52.055,544.2452903837882,1.0 22 | 0.7421892567062911,541.647,154.592,419.94899999999996,134.696,52.458,562.6719091472808,1.0 23 | 0.7440697038134538,316.153,495.229,298.117,118.052,36.864,564.6968574170937,1.0 24 | 0.7184640021492621,454.981,512.973,229.275,129.727,42.589,566.8197527194076,1.0 25 | 0.7442705906210804,351.299,129.585,513.164,121.624,43.039,563.8909271518801,1.0 26 | 0.7523048063058699,373.75,347.335,348.688,162.518,0.007,566.0336905773739,1.0 27 | 0.7401546858790917,455.003,273.588,376.796,105.577,93.278,563.3743082125387,1.0 28 | 0.7331782428028826,404.428,326.043,380.159,91.111,66.457,594.0994044690077,1.0 29 | 0.7582840029335266,410.199,332.037,339.224,171.232,9.784,542.5922636232827,1.0 30 | 0.7354390515422768,337.053,380.205,365.57,108.439,30.588,595.7117058712302,1.0 31 | 0.7550946030854966,470.994,273.204,362.293,130.95,78.35,532.7774668210191,1.0 32 | 0.7222507939949842,466.134,288.722,381.373,139.796,42.37,467.4759769040459,1.0 33 | 0.7520664985572285,385.102,317.275,359.77700000000004,118.406,44.771,675.0262914379433,1.0 34 | 0.7339423211219949,424.083,54.215,540.8320000000001,129.377,45.249,560.9204875680255,2.0 35 | 0.7079651858109814,382.328,633.413,192.204,123.071,39.484,569.945980034795,2.0 36 | 0.7846416309569562,162.318,358.048,413.074,129.199,28.123,591.1693773328017,2.0 37 | 0.6857000659927739,730.246,275.633,327.31,128.649,53.883,534.8234111513824,2.0 38 | 0.7343687165582735,609.709,119.244,426.735,138.353,56.518,565.3156749183775,2.0 39 | 0.7128623286739652,285.931,583.965,265.978,116.445,33.358,563.1579243740414,2.0 40 | 0.7116051207700793,470.846,604.245,174.386,131.19,43.49,573.7144612558875,2.0 41 | 0.7416930758877991,311.072,82.458,566.316,121.238,41.851,567.0903807468973,2.0 42 | 0.72805347611663,396.355,347.031,351.247,161.493,0.0,579.9819191147836,2.0 43 | 0.7380783907765414,474.214,271.01,373.914,98.343,121.914,561.7025531556753,2.0 44 | 0.7247849691055188,417.558,340.401,375.498,80.282,82.504,606.4737383010103,2.0 45 | 0.7667446735917866,416.106,327.568,335.916,191.761,0.003,538.1124500986889,2.0 46 | 0.7416474005651406,303.111,425.512,362.10699999999997,102.796,24.887,605.605847547626,2.0 47 | 0.7598949088405283,491.147,266.225,358.709,129.546,103.295,528.2431819517462,2.0 48 | 0.7096501632184791,484.921,277.915,394.856,145.738,40.01,437.78481988715384,2.0 49 | 0.7498050602997715,384.125,317.066,359.59900000000005,117.277,45.185,736.2782212858422,2.0 50 | 0.7293213960442015,420.576,23.903,563.329,136.458,43.915,563.758703569227,3.0 51 | 0.7082004600539038,371.803,717.166,153.67,123.877,37.782,574.2479932270404,3.0 52 | 0.7929143447472078,115.77,367.331,425.41700000000003,133.919,21.45,597.1424900128444,3.0 53 | 0.6732298355551303,815.114,270.168,318.423,128.752,56.435,530.9427096390096,3.0 54 | 0.7312019185830219,675.334,107.765,417.651,142.591,61.736,565.9074364078747,3.0 55 | 0.7086585232344633,267.649,663.483,233.153,116.778,29.515,566.0355625991414,3.0 56 | 0.7048926110236016,481.384,679.355,131.115,134.79,43.345,578.8472442574429,3.0 57 | 0.7433522278873725,286.684,57.351,603.828,118.945,40.927,566.3699998815046,3.0 58 | 0.7113688891316206,396.961,360.599,351.874,160.378,0.0,590.146841736166,3.0 59 | 0.7383350909153324,488.313,265.766,373.551,93.055,147.209,558.9150647261064,3.0 60 | 0.7166627770878236,440.646,329.879,381.326,72.401,100.922,614.090822918327,3.0 61 | 0.7712644901245913,427.874,323.735,330.567,206.23,0.002,530.9491197097062,3.0 62 | 0.7432472334798185,285.697,445.005,369.373,98.877,21.274,610.1938951372923,3.0 63 | 0.7588987367627282,507.668,261.798,354.805,130.923,123.65,524.0521380551959,3.0 64 | 0.7004123423640796,504.193,281.253,397.253,151.276,39.022,418.42093151947097,3.0 65 | 0.7497376750037392,384.1,317.121,359.563,117.234,45.214,794.6851231573057,3.0 66 | 0.7351285398922334,418.188,2.499,578.088,144.751,42.33,565.7757404857357,4.0 67 | 0.7182459564249233,362.332,788.721,121.812,122.948,37.897,578.9410035880911,4.0 68 | 0.8011390230553916,78.81,370.939,437.793,138.823,16.242,602.5651966628983,4.0 69 | 0.6606027266412258,890.749,266.167,311.058,129.479,58.714,525.6583645033437,4.0 70 | 0.7285990653886072,732.786,96.674,412.95900000000006,144.323,66.404,568.2258386629369,4.0 71 | 0.7134956308106137,251.092,734.279,204.277,117.324,26.899,568.1686653037343,4.0 72 | 0.7084561613363788,499.467,738.998,95.357,136.924,45.208,584.027246973261,4.0 73 | 0.7367061482780308,269.47,43.141,632.916,117.642,39.448,565.1661957498318,4.0 74 | 0.7064179154211092,394.002,372.725,353.791,159.387,0.0,598.366270827588,4.0 75 | 0.7394671178603077,495.494,261.536,374.40200000000004,89.249,170.262,557.2987824053766,4.0 76 | 0.7142478968251826,461.957,299.781,400.046,65.903,121.266,616.3280826812733,4.0 77 | 0.7726417081078795,436.156,324.751,325.819,219.219,0.002,524.7980455360242,4.0 78 | 0.7435483441339796,272.172,471.487,368.171,97.642,16.944,616.6975215814026,4.0 79 | 0.7589926672547571,519.771,258.238,352.32,131.426,143.869,521.1006242309484,4.0 80 | 0.6846616847250291,520.049,280.801,403.37,155.547,38.698,403.2882911881625,4.0 81 | 0.7496513461336931,384.101,317.111,359.56899999999996,117.236,45.213,853.0669162919538,4.0 82 | 0.7161811978837384,452.712,0.0,576.471,138.412,50.084,583.8225251509355,5.0 83 | 0.7184608727121308,354.893,851.018,96.109,122.774,38.374,578.5791454297754,5.0 84 | 0.8084296235179973,48.756,375.813,446.977,143.866,11.366,610.2850956423222,5.0 85 | 0.6498584444233457,960.416,261.637,305.08,131.051,60.18,521.2795746060388,5.0 86 | 0.7233092505540963,775.474,82.327,414.837,147.499,69.513,567.8615337724567,5.0 87 | 0.7087304166858609,233.635,795.372,182.023,117.483,24.748,570.3036778257198,5.0 88 | 0.7066257268854074,516.381,790.791,65.115,138.765,46.691,588.0499169424954,5.0 89 | 0.7334772873895676,253.172,34.375,657.033,116.149,38.379,567.2297891316359,5.0 90 | 0.6899637237493548,410.278,381.833,356.887,156.299,0.0,601.1375636853825,5.0 91 | 0.7403935773288571,498.223,259.332,375.142,86.341,192.495,555.9816898084931,5.0 92 | 0.7128362872964745,487.176,284.703,407.935,60.144,139.533,619.0943845227238,5.0 93 | 0.7732014041429041,440.439,327.722,321.419,231.613,0.002,521.4447862688307,5.0 94 | 0.7447467716414207,251.551,499.182,366.77700000000004,97.846,12.119,624.7567709911247,5.0 95 | 0.7604247878928146,525.922,256.629,350.381,131.207,164.245,519.2344942486261,5.0 96 | 0.6669611192413589,533.519,289.006,405.055,158.879,37.315,390.9749473740303,5.0 97 | 0.7496468866369381,384.101,317.117,359.56500000000005,117.235,45.214,911.4574036986705,5.0 98 | 0.704625079245377,478.75,0.0,579.858,129.709,60.555,592.2130952876071,6.0 99 | 0.7173712559960104,349.179,908.119,72.46000000000001,122.445,38.418,579.9192272582687,6.0 100 | 0.8157167450298306,24.794,380.709,452.519,152.605,5.748,612.0750666846855,6.0 101 | 0.6414944477639251,1026.163,257.004,300.166,132.028,61.72,518.619994079957,6.0 102 | 0.715275592375022,819.935,77.36,408.972,151.672,76.159,566.9339493741521,6.0 103 | 0.7102456636084209,216.915,848.553,164.68,116.6,23.261,572.792004627011,6.0 104 | 0.7133411360466935,526.063,840.759,38.551,140.973,47.54,591.7092060373224,6.0 105 | 0.7318052434143296,232.532,30.864,678.073,114.378,37.749,567.2393529303334,6.0 106 | 0.6812938677001082,419.433,391.987,361.418,152.173,0.0,607.1447941149811,6.0 107 | 0.7397412576478872,499.564,254.946,378.184,83.222,214.281,555.0309105480598,6.0 108 | 0.7163436720765864,510.437,280.293,409.569,55.036,156.185,621.0121718286011,6.0 109 | 0.7722046398387685,443.242,331.082,317.66,243.603,0.003,518.2034854167713,6.0 110 | 0.7451662894880356,234.555,505.56,378.811,98.509,7.595,631.437221129208,6.0 111 | 0.7609201415923085,530.578,256.09,348.35,130.539,184.735,517.7372948819634,6.0 112 | 0.6475297511388829,546.977,296.91,407.139,162.076,35.789,380.5140301481122,6.0 113 | 0.7498238457805565,384.105,317.113,359.568,117.235,45.214,969.8386252341764,6.0 114 | 0.6990756717430944,499.111,0.0,584.392,123.839,67.495,598.6805695602163,7.000000000000001 115 | 0.7179500792769553,339.739,961.269,52.415000000000006,122.179,38.569,580.2093417129437,7.000000000000001 116 | 0.822435003520573,6.268,372.15,464.848,159.73,2.946,615.9815634867732,7.000000000000001 117 | 0.6385684058318806,1089.119,254.198,295.11699999999996,132.449,63.115,516.6010517598882,7.000000000000001 118 | 0.7073410587406528,864.926,74.433,401.96999999999997,155.433,83.796,566.4716544779028,7.000000000000001 119 | 0.7158839987674941,206.391,898.883,148.266,116.517,21.876,572.0317122802095,7.000000000000001 120 | 0.7086171063313388,541.36,882.324,16.230999999999998,143.077,50.35,590.6256342963936,7.000000000000001 121 | 0.73079484014828,217.961,25.633,697.405,113.29,37.903,567.6107909748441,7.000000000000001 122 | 0.6825913905475371,415.749,398.577,369.38,149.186,0.0,615.3532417446853,7.000000000000001 123 | 0.7398030471588557,498.729,254.785,378.887,80.418,235.687,553.9681075847266,7.000000000000001 124 | 0.7149994509774955,533.312,273.748,413.817,50.443,170.718,624.3577570876087,7.000000000000001 125 | 0.7718995942704637,444.936,335.284,313.781,255.298,0.001,515.3758745408273,7.000000000000001 126 | 0.7551217596314413,230.488,516.452,384.365,98.515,4.383,637.2362007277396,7.000000000000001 127 | 0.7616032321579074,534.007,256.011,346.706,129.855,204.939,515.8900184932244,7.000000000000001 128 | 0.6249891402716705,563.374,311.47,403.363,166.041,34.469,371.64365732776605,7.000000000000001 129 | 0.7469102392726166,374.432,330.499,349.832,113.372,46.576,1010.1018734463347,7.000000000000001 130 | 0.6915948979500925,520.061,0.0,587.778,119.416,72.48,609.0827409190391,8.0 131 | 0.7111272946988959,320.597,1009.149,39.476,121.491,37.129,578.9692586696096,8.0 132 | 0.8085981719762585,0.0,358.374,482.33799999999997,159.496,5.149,623.4919401395715,8.0 133 | 0.6348820981675659,1149.601,251.669,290.842,132.67,64.325,515.1666917717112,8.0 134 | 0.702230309680011,906.791,71.847,395.369,159.44,90.875,565.3190568248702,8.0 135 | 0.7155047686948105,199.7,949.868,129.643,116.494,21.315,571.3553215886403,8.0 136 | 0.7089985623496613,542.345,910.518,0.993,149.877,51.204,586.1184320722607,8.0 137 | 0.7312734126932772,206.385,19.798,715.6800000000001,112.918,38.428,567.4666193530688,8.0 138 | 0.6764215192481418,421.902,408.941,373.179,146.413,0.0,620.334096291507,8.0 139 | 0.7407778870000041,497.78,253.711,379.904,77.781,256.768,553.3180073072009,8.0 140 | 0.7119257777479493,556.762,266.889,416.696,46.235,186.178,625.0239702613934,8.0 141 | 0.7718465947546267,447.3,336.91,311.243,266.766,0.002,512.207936034478,8.0 142 | 0.7622354033124427,231.05,530.722,387.721,97.012,3.06,637.4418665021776,8.0 143 | 0.7616584325822395,537.05,255.993,345.256,129.204,224.865,514.2218192864807,8.0 144 | 0.6042027465111837,577.291,329.384,397.93600000000004,169.554,33.981,364.1815173653347,8.0 145 | 0.7499135384567213,366.317,334.109,347.70000000000005,110.713,47.673,1037.6783356527176,8.0 146 | 0.6875403251610002,537.318,0.0,591.196,114.94,81.629,613.5837680942761,9.0 147 | 0.7075082393866066,306.131,1053.384,28.573,120.79,36.761,577.2069543915118,9.0 148 | 0.7985333238155263,0.0,377.602,480.876,155.096,10.203,630.9068791973904,9.0 149 | 0.6304968440667137,1208.259,248.792,287.346,132.85,65.461,514.0583304698944,9.0 150 | 0.6966848331501301,950.246,70.009,388.16499999999996,163.335,97.577,564.4865145855536,9.0 151 | 0.717348021206367,187.793,992.679,117.721,116.623,19.75,569.7895938975614,9.0 152 | 0.6953486544632581,549.465,924.797,0.0,144.813,53.19,599.7007314395294,9.0 153 | 0.7294907011517155,197.264,14.556,733.064,113.326,38.326,566.6692394702959,9.0 154 | 0.6596544944559986,469.303,406.388,369.673,153.17,0.0,608.5888999984957,9.0 155 | 0.7397685720706629,497.158,254.687,379.55600000000004,75.275,277.604,552.5023309306508,9.0 156 | 0.7128862402923883,577.394,262.24,419.501,42.404,200.672,626.1754724219694,9.0 157 | 0.7727491964471433,449.413,338.277,308.936,278.051,0.003,509.43641675098263,9.0 158 | 0.7662985710471986,233.159,543.587,391.349,96.068,1.572,635.5025436295233,9.0 159 | 0.7614730470850521,539.346,256.504,343.764,128.501,244.686,512.462630514745,9.0 160 | 0.590484335347234,591.486,344.899,393.5,173.034,34.617,357.83513935854995,9.0 161 | 0.7591273466010893,357.371,338.593,345.29499999999996,109.827,47.938,1060.2687929614308,9.0 162 | 0.6837002012828428,548.47,0.0,596.5609999999999,108.146,93.331,624.3546711262594,10.0 163 | 0.7041846224866171,289.025,1093.776,20.639,120.528,34.823,573.9322653516017,10.0 164 | 0.7931759835660073,0.0,401.052,475.08000000000004,149.907,19.443,634.8461738515448,10.0 165 | 0.6272856783330396,1265.544,244.448,285.23,132.827,66.595,513.3256987062842,10.0 166 | 0.6916280895776699,991.87,68.206,381.651,166.959,104.137,563.7741573984429,10.0 167 | 0.7189812202308212,178.375,1034.418,105.585,116.564,18.03,568.6653627740852,10.0 168 | 0.6841956661757672,563.84,936.467,0.0,138.294,59.172,608.967106742216,10.0 169 | 0.7290947815850047,189.471,10.419,749.779,114.243,37.473,563.7948175746116,10.0 170 | 0.6614221424468756,439.548,431.714,377.773,142.795,0.0,624.3702884259126,10.0 171 | 0.7389904093768458,496.875,256.07,378.871,72.824,298.498,551.9607909637372,10.0 172 | 0.7070880540496036,599.613,262.182,420.77,38.854,213.167,624.9697747971497,10.0 173 | 0.7714511401640103,453.595,342.909,304.59499999999997,289.169,0.002,505.81730249337676,10.0 174 | 0.7692496532507218,231.303,559.989,394.36800000000005,94.683,0.722,632.9818892967238,10.0 175 | 0.7621341243088189,540.165,256.525,343.078,127.383,264.782,510.99617126806567,10.0 176 | 0.5741366907560264,603.455,360.626,389.599,176.609,34.127,352.40726486750646,10.0 177 | 0.7606569509590766,354.269,338.349,346.086,109.263,47.826,1081.1617992394783,10.0 178 | --------------------------------------------------------------------------------