diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f4ee643afe09065bb038a29e0ff9cf204cb8a6ec --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +This script creates a static website that shows a formula student world ranking according to the Elo rating system. + +This site is available on https://fs-elo-a9b310.fspages.org/ + +Special thanks to Jasper v. B.! I used his script to scrape fs-world.org. Leave him a star on Github: https://github.com/jazzpi/fsworld-analysis \ No newline at end of file diff --git a/public/GET racing schwarz.svg b/public/GET racing schwarz.svg index f5ecda7fa3e203483722ee3394587bb72edcd27f..f2520530b13b935ad275821c2448a7b84bf2ad67 100644 --- a/public/GET racing schwarz.svg +++ b/public/GET racing schwarz.svg @@ -22,10 +22,13 @@ <g id="GET_racing" data-name="GET racing"> - <text + <path + d="m 53.347929,-40.165429 h -1.647812 q -1.23586,-0.411953 -3.501602,-0.61793 -2.265742,-0.205977 -4.47999,-0.205977 -3.656084,0 -7.054697,0.566436 -3.398613,0.514941 -7.003203,1.699307 L 20.700644,0 H 2.0597656 L 15.448242,-57.827919 h 18.640879 l -1.956778,8.496533 q 5.252403,-3.862061 10.453311,-6.282285 5.252402,-2.420225 10.556299,-2.420225 0.978388,0 2.162754,0.05149 1.235859,0.05149 2.162753,0.154483 z m 45.646466,12.873535 q -4.943437,0.411953 -9.268945,0.978388 -4.325508,0.566436 -7.363662,1.647813 -3.141143,1.132871 -4.788955,3.192637 -1.647813,2.059765 -1.647813,5.458378 0,2.986661 2.162754,4.22252 2.214248,1.184365 6.385274,1.184365 2.729189,0 5.818838,-1.235859 3.141142,-1.287354 5.870332,-3.244131 z m -4.891943,21.1640913 q -1.750801,1.1328711 -4.22252,2.7291894 -2.471718,1.5963184 -4.582978,2.52321292 -2.883672,1.18436522 -5.406885,1.8022949 -2.523213,0.61792968 -7.003203,0.61792968 -7.209179,0 -11.792158,-4.0165429 -4.531484,-4.0680371 -4.531484,-10.5562983 0,-6.848721 3.244131,-11.586182 3.24413,-4.788955 9.629404,-7.621133 5.97332,-2.677695 14.212382,-3.86206 8.290557,-1.184365 17.919959,-1.750801 0.0515,-0.308965 0.20598,-0.978389 0.15448,-0.720918 0.15448,-1.596318 0,-3.656084 -3.398612,-5.09792 -3.398613,-1.49333 -10.144346,-1.49333 -4.582978,0 -10.144345,1.544824 -5.509873,1.544824 -8.290557,2.574707 h -1.699306 l 2.729189,-13.697441 q 3.244131,-0.823906 10.041357,-1.853789 6.797227,-1.029883 13.542959,-1.029883 13.594451,0 19.928231,3.553096 6.38527,3.553095 6.38527,11.019746 0,1.029883 -0.20597,2.677695 -0.15448,1.647813 -0.46345,2.883672 L 111.14701,0 h -18.4349 z m 67.016538,7.6726269 q -5.92182,0 -11.12273,-1.49333006 -5.14941,-1.44183594 -9.01147,-4.53148434 -3.75908,-3.0381543 -5.87034,-7.6211328 -2.11126,-4.582978 -2.11126,-10.607793 0,-7.775615 2.93517,-14.418359 2.98666,-6.694238 8.34205,-11.68917 5.2524,-4.891943 12.82204,-7.724121 7.56964,-2.883672 16.37514,-2.883672 5.30389,0 10.5048,1.184365 5.2524,1.184366 9.73239,3.450108 l -3.91355,15.808701 h -2.6262 q -3.03816,-3.656084 -6.90022,-5.406885 -3.81056,-1.802295 -8.59952,-1.802295 -8.754,0 -14.0579,6.230791 -5.30389,6.179297 -5.30389,15.448242 0,6.436768 3.24413,9.629404 3.29562,3.192637 10.19584,3.192637 5.35539,0 9.73239,-2.162754 4.4285,-2.214248 7.56964,-4.891943 h 2.6262 l -3.91356,15.808701 q -5.56136,2.4202246 -9.78388,3.4501074 -4.17103,1.0298828 -10.86527,1.0298828 z M 228.49598,-57.827919 215.1075,0 h -18.64087 l 13.38847,-57.827919 z m 5.66436,-22.296963 -3.24413,14.0579 h -19.67077 l 3.24414,-14.0579 z m 69.23078,35.376474 q 0,1.544824 -0.20597,3.347119 -0.20598,1.802295 -0.66943,3.759073 L 293.86471,0 h -18.74387 l 6.59125,-28.682236 q 0.72092,-3.192637 1.13287,-5.458379 0.41195,-2.265742 0.41195,-4.222519 0,-3.34712 -1.6993,-4.891944 -1.69931,-1.544824 -6.23079,-1.544824 -2.21425,0 -5.09792,0.978389 -2.88368,0.926894 -6.48827,2.832177 L 254.31721,0 h -18.64088 l 13.33698,-57.827919 h 18.64088 l -1.49333,6.385273 q 5.71585,-3.759072 10.40181,-5.870332 4.73747,-2.11126 10.40182,-2.11126 7.77562,0 12.10112,3.759072 4.32551,3.759073 4.32551,10.916758 z m 80.25053,-13.079511 -11.63768,51.1851749 q -1.90528,8.2390624 -5.40688,13.6974413 -3.50161,5.4583788 -8.49654,8.7025098 -5.14941,3.347119 -11.17423,4.685967 -6.02481,1.338847 -13.54295,1.338847 -6.2308,0 -11.94665,-0.772412 -5.71584,-0.720918 -9.6294,-1.699306 L 314.6395,5.0979199 h 2.26574 q 4.27401,1.6478125 8.65102,2.6262011 4.377,0.9783887 7.77561,0.9783887 4.89194,0 8.49653,-0.9268945 3.60459,-0.8754004 5.66436,-2.574707 2.21425,-1.8022949 3.5016,-4.4284961 1.33885,-2.6262011 2.16276,-6.4367675 l 0.25747,-1.081377 q -4.01655,2.7291895 -7.9816,4.3255078 -3.96504,1.59631836 -8.95998,1.59631836 -9.73239,0 -15.24226,-4.89194336 -5.45838,-4.8919434 -5.45838,-14.7788184 0,-17.04456 9.6294,-27.961318 9.62941,-10.968252 23.37834,-10.968252 4.94344,0 8.95998,1.184365 4.06804,1.184366 6.53976,2.986661 l 1.28735,-2.574707 z m -21.73053,13.388476 q -1.49333,-0.669424 -3.96505,-1.235859 -2.42022,-0.61793 -4.27401,-0.61793 -8.29056,0 -13.33699,6.230791 -5.04642,6.230791 -5.04642,16.014678 0,4.428496 2.16275,6.900214 2.16276,2.471719 7.77562,2.471719 2.72919,0 5.50987,-1.029883 2.83218,-1.081377 5.3039,-2.523213 z" + id="text1" class="cls-1" + style="font-style:italic;font-weight:700;font-size:105.46px;font-family:Verdana-BoldItalic, Verdana;letter-spacing:0.03em;fill:#1d1d1b" transform="translate(1326.16,245.26)" - id="text1">racing</text> + aria-label="racing" /> <path id="ET" class="cls-2" diff --git a/test.py b/test.py deleted file mode 100644 index 0b87ca0bfe99402dbef1d31ad8d2cc799d2d0ce3..0000000000000000000000000000000000000000 --- a/test.py +++ /dev/null @@ -1,50 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np - -np.random.seed(19680801) - - -def gradient_image(ax, direction=1, cmap_range=(0, 1), **kwargs): - """ - Draw a gradient image based on a colormap. - - Parameters - ---------- - ax : Axes - The Axes to draw on. - direction : float - The direction of the gradient. This is a number in - range 0 (=vertical) to 1 (=horizontal). - cmap_range : float, float - The fraction (cmin, cmax) of the colormap that should be - used for the gradient, where the complete colormap is (0, 1). - **kwargs - Other parameters are passed on to `.Axes.imshow()`. - In particular, *cmap*, *extent*, and *transform* may be useful. - """ - phi = direction * np.pi / 2 - v = np.array([np.cos(phi), np.sin(phi)]) - X = np.array([[v @ [1, 0], v @ [1, 1]], - [v @ [0, 0], v @ [0, 1]]]) - a, b = cmap_range - X = a + (b - a) / X.max() * X - im = ax.imshow(X, interpolation='bicubic', clim=(0, 1), - aspect='auto', **kwargs) - return im - - -def gradient_bar(ax, x, y, width=0.5, bottom=0): - for left, top in zip(x, y): - right = left + width - gradient_image(ax, extent=(left, right, bottom, top), - cmap=plt.cm.Blues_r, cmap_range=(0, 0.8)) - - -fig, ax = plt.subplots() -ax.set(xlim=(0, 10), ylim=(0, 1)) - -N = 10 -x = np.arange(N) + 0.15 -y = np.random.rand(N) -gradient_bar(ax, x, y, width=0.7) -plt.show() \ No newline at end of file diff --git a/test2.py b/test2.py deleted file mode 100644 index 54fca3f7594e02e1d9b5998a4fc165bb56f5381c..0000000000000000000000000000000000000000 --- a/test2.py +++ /dev/null @@ -1,51 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np -from matplotlib.colors import LinearSegmentedColormap -import matplotlib.patches as patches - -# Create custom colormap -colors = [(255/255, 255/255, 30/255), (255/255, 196/255, 0/255)] # RGB values for #ffff1e and #ffc400 -custom_yellow_cmap = LinearSegmentedColormap.from_list('custom_yellow', colors) - -np.random.seed(19680801) - -# Create figure directly without subplot -fig = plt.figure(figsize=(8, 6)) -ax = fig.add_axes([0.1, 0.1, 0.8, 0.8]) # [left, bottom, width, height] - -N = 10 -y = np.arange(N) -x = np.random.rand(N) - -# Create horizontal bars -bars = ax.barh(y, x, height=0.7) - -# Apply gradient to each bar -for bar in bars: - # Get the coordinates of the bar - x0, y0 = bar.get_xy() - width = bar.get_width() - height = bar.get_height() - - # Set the bar's face color to none (remove default color) - bar.set_facecolor('none') - - # Create multiple thin rectangles to simulate a gradient - steps = 50 - for i in range(steps): - left = x0 + (i/steps) * width - rect_width = width/steps - color = custom_yellow_cmap(i/steps) - rect = patches.Rectangle((left, y0), rect_width, height, - linewidth=0, - color=color) - ax.add_patch(rect) - -# Set limits and labels -ax.set_xlim(0, 1) -ax.set_ylim(-0.5, N-0.5) -ax.set_title('Horizontal Bar Chart with Yellow Gradient') -ax.set_xlabel('Values') -ax.set_ylabel('Categories') - -plt.show() \ No newline at end of file