magma-var
Python package for MAGMA Volcanic Activity Report (VAR)
1. How to use
Make sure you have MAGMA token. Check examples directory.
Volcano name and code:
| Volcano | Code |
|---|---|
| Agung | AGU |
| Ambang | AMB |
| Anak Krakatau | KRA |
| Anak Ranakah | RAN |
| Arjuno Welirang | WEL |
| Awu | AWU |
| Banda Api | BAN |
| Batur | BAT |
| Batutara | TAR |
| Bromo | BRO |
| Bur Ni Telong | TEL |
| Ciremai | CER |
| Colo | COL |
| Dempo | DEM |
| Dieng | DIE |
| Dukono | DUK |
| Ebulobo | EBU |
| Egon | EGO |
| Galunggung | GAL |
| Gamalama | GML |
| Gamkonora | GMK |
| Gede | GED |
| Guntur | GUN |
| Ibu | IBU |
| Ijen | IJE |
| Ile Werung | WER |
| Ili Boleng | BOL |
| Ili Lewotolok | LEW |
| Inielika | LIK |
| Inierie | RIE |
| Iya | IYA |
| Kaba | KAB |
| Karangetang | KAR |
| Kelimutu | KLM |
| Kelud | KLD |
| Kerinci | KER |
| Kie Besi | KIE |
| Lamongan | LAM |
| Lereboleng | LER |
| Lewotobi Laki-laki | LWK |
| Lewotobi Perempuan | LWP |
| Lokon | LOK |
| Mahawu | MAH |
| Marapi | MAR |
| Merapi | MER |
| Papandayan | PAP |
| Peut Sague | PEU |
| Raung | RAU |
| Rinjani | RIN |
| Rokatenda | ROK |
| Ruang | RUA |
| Salak | SAL |
| Sangeangapi | SAN |
| Semeru | SMR |
| Seulawah Agam | SEU |
| Sinabung | SIN |
| Sirung | SIR |
| Slamet | SLA |
| Soputan | SOP |
| Sorikmarapi | SOR |
| Sumbing | SBG |
| Sundoro | SUN |
| Talang | TAL |
| Tambora | TAM |
| Tandikat | TAN |
| Tangkoko | TGK |
| Tangkuban Parahu | TPR |
| Teon | TEO |
| Wurlali | WUR |
1.1 Install module
pip install magma-var
Check your version:
print(magma_var.__version__)
1.2 Download Volcanic Activity Report (VAR)
To download Volcanic Activity Report (VAR):
import magma_var
from magma_auth import auth
from magma_var import Download
print(magma_var.__version__)
token = auth.token # or replace with your own token
download = Download(
token=token,
volcano_code='LOK',
start_date='2025-01-01',
end_date='2025-06-08',
locale="id", # [testing] Change to "en" for english translation
current_dir='D:\\Projects\\magma-var', # Change your current directory. Default to None.
verbose=True,
)
download.var()
download.to_excel()
download.to_csv()
1.3 Plot VAR
Plot seismicity count:
Earthquake name and code:
| Jenis Gempa | Earthquake (EN) | Code |
|---|---|---|
| Semua Gempa | Select all earthquake | * |
| Letusan | Eruption | lts |
| Awan Panas Letusan | Fountain Collapse Pyroclastic Flow | apl |
| Awan Panas Guguran | Pyroclastic Density Current (PDC) | apg |
| Guguran | Rockfall | gug |
| Hembusan | Degassing | hbs |
| Harmonik | Harmonic | hrm |
| Tremor Non-Harmonik | Non-Harmonic Tremor | tre |
| Tornillo | Tornillo | tor |
| Low Frequency | Low Frequency | lof |
| Hybrid/Fase Banyak | Hybrid/Multi Phase | hyb |
| Vulkanik Dangkal | Shallow Volcanic-Tectonic (VT-B) | vtb |
| Vulkanik Dalam | Deep Volcanic-Tectonic (VT-A) | vta |
| Very Long Period | Very Long Period | vlp |
| Tektonik Lokal | Local Tectonic | tel |
| Terasa | Felt Earthquake | trs |
| Tektonik Jauh | Teleseismic | tej |
| Double Event | Double Event | dev |
| Getaran Banjir | Lahar | gtb |
| Deep Tremor | Deep Tremor | dpt |
| Tremor Menerus | Tremor | mtr |
from magma_auth import auth
from magma_var import Plot
token = auth.token or replace with your own token
plot = Plot(
token = token,
volcano_code = 'LOK',
start_date = '2025-01-01',
end_date = '2025-03-13',
earthquake_code = '*', # Check table above for earthquake code
locale = 'en', # change to "id" for Indonesia. Default to "id"
overwrite=True, # Overwrite existing downloaded file
verbose=True, # Show detailed information
)
Print DataFrame:
plot.df
Show plot:
plot.show(
interval=7, # 7 days. X-axis interval in days.
width=1.0, # Size bar width
title='Lokon', # Plot title
figsize=(10,1),
title_fontsize=12,
figure_ylabel_fontsize=9,
x_labelsize=8,
y_labelsize=8,
legend_fontsize=6,
color='black', # remove or change to None to use default color
)
Changelog
[0.1.1] 2025-09-04
Bug fix.
Added
- Update jupyter notebook example.
Fixed
- Fix readme.
- Fix color options.
Changed
- Code reformatting using
black.
Metadata
Release files for magma-var 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| magma_var-0.1.3.tar.gz | 16.4 kB | Without provenance | Details for magma_var-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| magma_var-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for magma_var-0.1.3-py3-none-any.whl |
Total release size: 33.6 kB
Release files / magma_var-0.1.3.tar.gz
| Download URL | magma_var-0.1.3.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
796bc56ac666f8304b21b6de4fa4bc2c53050cac2465022462855e64ae799143
|
|
BLAKE2b-256 checksum How to use checksums |
786d9117a0aa9a54df440e00508f660650b049e44b112c79901328f818fdd965
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|
Release files / magma_var-0.1.3-py3-none-any.whl
| Download URL | magma_var-0.1.3-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3c36d079f581f421e75a9a28cd844e3cd415c1a4186201383e8eaa9f9deeff1
|
|
BLAKE2b-256 checksum How to use checksums |
1e5323c69f1af0a52e9040a59a4779ceba08d8ee845d271cb1816f0160bf7f72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|
Security for magma-var 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.