Skip to main content

MAGMA Volcanic Activity Report (VAR)

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magma_var-0.1.2.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magma_var-0.1.2-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file magma_var-0.1.2.tar.gz.

File metadata

  • Download URL: magma_var-0.1.2.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for magma_var-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f53ee52a5b118c1eb3b7251b2335acb54b22959f8a604817ddc35eed000ccc41
MD5 ef9d9203988c1a1045aeb7876263608a
BLAKE2b-256 58e5c717c2a949110a01312a458d4945aa223795617fc7d5695073f436f07772

See more details on using hashes here.

File details

Details for the file magma_var-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: magma_var-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for magma_var-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b55ed1dd349a48658cd3ff908a5911b1ce306e9bd8ad62e0d9df01b9f031587c
MD5 658c617918d184181ad92b581ea4df68
BLAKE2b-256 364a5c2e386db06746f6a19a5d6f4c5bffa84164a80eacbdec98d927a64675e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page