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.1.tar.gz (16.4 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.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: magma_var-0.1.1.tar.gz
  • Upload date:
  • Size: 16.4 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.1.tar.gz
Algorithm Hash digest
SHA256 527af264683990628a50b04a55d9ac7342dc69196bbee6f8cd7a83ea530a1e33
MD5 91571a3b19bc7bedc4bfff233892ae5a
BLAKE2b-256 3d05e01bd3f74acd5a3873ef3b8f26be774f64b3169619b8e38b004a73ece3cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: magma_var-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3bb6d910017661371ec650d0931ff485c73a72d1fa5f6d164a682fbfc09b8269
MD5 76e001d4e97bf3cad599886bdb56811b
BLAKE2b-256 66cff7a55743aba0b14c5c4e01cbe39892029d6c94fe8d6e72eff1f8b3253882

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