Archivo:SOI.svg
De testwiki
Ir a la navegación
Ir a la búsqueda
Tamaño de esta previsualización PNG del archivo SVG: 800 × 246 píxeles. Otras resoluciones: 320 × 98 píxeles | 640 × 197 píxeles | 1024 × 315 píxeles | 1280 × 394 píxeles | 2560 × 788 píxeles | 1248 × 384 píxeles.
Archivo original (archivo SVG, nominalmente 1248 × 384 píxeles, tamaño de archivo: 139 kB)
Este archivo es de Wikimedia Commons y puede usarse en otros proyectos. La descripción en su página de descripción del archivo se muestra debajo.
Resumen
Python
from urllib.request import urlretrieve
if input('Refresh local copy of SOI data from ftp.bom.gov.au/..?\n'
'Empty input for NO, anything else for YES '
) > '':
print('Loading...')
urlretrieve('ftp://ftp.bom.gov.au/anon/home/ncc/www/sco/soi/soiplaintext.html',
'soiplaintext.html')
data = []
with open('soiplaintext.html', 'r') as f:
for line in f: # until table header (the line after '"`UNIQ--pre-00000001-QINU`"'
data = [float(_) for _ in data]
import numpy as np
x = 1876. + 1/24. + np.linspace(0., len(data)/12, len(data), endpoint=False)
n = 7
n2 = n//2
kernel = np.sin(np.pi*np.linspace(1/(n+1), 1., n, endpoint=False))
kernel /= np.sum(kernel)
av = np.convolve(data, kernel, mode='valid')
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
plt.rcParams['svg.fonttype'] = 'none' # text as text, not curves
fig, ax = plt.subplots(1,1)
fig.set_size_inches(13, 4)
ax.fill_between(x[n2:-n2], av, 7., where= av > 7., facecolor='blue', interpolate=True)
ax.fill_between(x[n2:-n2], av,-7., where= av <-7., facecolor='red', interpolate=True)
ax.plot(x[n2:-n2], av, 'k-', linewidth=0.4)
ax.plot(x, data, 'ko', markerfacecolor='#00000040', markeredgecolor='#00000000', markersize=3)
ax.set_xlim(x[0]-2., x[-1]+2.)
ax.set_ylim(-43., 40.)
ax.xaxis.set_major_locator(MultipleLocator(10.))
fig.tight_layout()
fig.text(.91,.88, 'La-Niña', color='blue', fontname='Verdana', fontsize=15)
fig.text(.91,.12, 'El-Niño', color='red', fontname='Verdana', fontsize=15)
fig.savefig('SOI.svg', format='svg')
fig.show()
from re import sub
svg = open('SOI.svg', 'r').read() # In the file ...
svg = sub(r'[0-9]+\.[0-9]+', lambda x: str(round(float(x.group()), 1)), svg) # round to .1f,
STYLE = ' style="fill-opacity: 0.3; stroke: #000000; stroke-opacity: 0"'
rest = svg.split(STYLE) # draw the style info
rest[0] = sub('z\n" style="', 'z\n" style="fill-opacity: 0.3; ', rest[0]) # into the g element,
symbol = rest[1].split('"')[1][1:] # identify the symbol name for the marker
svg = sub(symbol, 'o', ''.join(rest)) # and shorten it to "o",
svg = sub(' *<use x', '<use x', svg) # and finally unindent the most frequent lines.
open('SOI.svg', 'w').write(svg)
| DescripciónSOI.svg |
English: Southern Oscillation Index monthly data 1876-2024, black line: smoothed with a 7-months cosine kernel, events colored with a threshold at |SOI| = 7 according to the Bureau of Meteorology description page. The red events are generally associated with El Niño and the blue events with La Niña. Data Source:ftp://ftp.bom.gov.au/anon/home/ncc/www/sco/soi/soiplaintext.html Description:http://www.bom.gov.au/climate/glossary/soi.shtml |
| Fecha | |
| Fuente | Trabajo propio |
| Autor | Rainald62 |
| Otras versiones | File:Soi.svg outdated, disallowed to overwrite. |
Licencia
Yo, el titular de los derechos de autor de esta obra, la publico en los términos de la siguiente licencia:
Este archivo está disponible bajo la licencia Creative Commons Attribution-Share Alike 4.0 International.
- Eres libre:
- de compartir – de copiar, distribuir y transmitir el trabajo
- de remezclar – de adaptar el trabajo
- Bajo las siguientes condiciones:
- atribución – Debes otorgar el crédito correspondiente, proporcionar un enlace a la licencia e indicar si realizaste algún cambio. Puedes hacerlo de cualquier manera razonable pero no de manera que sugiera que el licenciante te respalda a ti o al uso que hagas del trabajo.
- compartir igual – En caso de mezclar, transformar o modificar este trabajo, deberás distribuir el trabajo resultante bajo la misma licencia o una compatible como el original.
Leyendas
Añade una explicación corta acerca de lo que representa este archivo
Elementos representados en este archivo
representa a
Algún valor sin elemento de Wikidata
7 nov 2023
image/svg+xml
141 130 byte
384 píxel
1248 píxel
1b8fb7394ceaaa727dc8ee132ecd36296b4ea755
Historial del archivo
Haz clic sobre una fecha y hora para ver el archivo tal como apareció en ese momento.
| Fecha y hora | Miniatura | Dimensiones | Usuario | Comentario | |
|---|---|---|---|---|---|
| actual | 18:39 18 dic 2025 | 1248 × 384 (139 kB) | wikimediacommons>Rainald62 | Update |
Usos del archivo
La siguiente página usa este archivo: