vinvelivaanilai

Vinvelivaanilai


Keywords
space, weather, indices
License
LGPL-3.0
Install
pip install vinvelivaanilai==0.0.1

Documentation

vinvelivaanilai

Vinveli - Space, Vaanilai - Weather (in Tamil)

This project collects space weather data from ftp.swpc.noaa.gov for your use

Currently the project supports the following indices for a complete year/quarter:

  • DGD (Daily Geomagnetic Data)
  • DSD (Daily Solar Data)
  • DPD (Daily Particle Data)

All of the above are daily indices and are accessible at ftp://ftp.swpc.noaa.gov/pub/indices/old_indices/.

The project structure is like so:

|_ vinvelivaanilai
   |_ extractor.py (extracts data from each fetched file)
   |_ file_fetch.py (Fetches files using FTP)

Installation

You can now install vinvelivaanilai using pip

pip install vinvelivaanilai

It is recommended that you install the project in a virtual environment as it is still under development To create a virtual environment and install in it, run:

python -m venv .venv
source .venv/bin/activate
pythom -m pip install vinvelivaanilai

To install an editable version of the master branch:

git clone https://gitlab.com/adithyav1511/vinvelivaanilai.git
cd vinvelivaanilai
pip install -e .

Usage

(.venv) $ python

>>> from vinvelivaanilai.extractor import *

>>> from vinvelivaanilai.file_fetch import *

>>> import datetime

>>> start_date =  datetime.datetime(year=2018, month=1, day=30)

>>> fetch_indices("DGD", start_date) # stores in the current folder
230 Anonymous access granted, restrictions apply
Fetching for: 2018 at 2018_DGD.txt
Fetching for: 2019 at 2019Q1_DGD.txt
Fetching for: 2019 at 2019Q2_DGD.txt
Fetching for: 2019 at 2019Q3_DGD.txt
Fetching for: 2019 at 2019Q4_DGD.txt
Fetching for: 2020 at 2020Q1_DGD.txt
Fetching for: 2020 at 2020Q2_DGD.txt

>>> df = dgd_to_dataframe("2018_DGD.txt")

>>>df
            Fredericksburg A  ...  Planetary K 21-24
Date                          ...
2018-01-01                 8  ...                  1
2018-01-02                 4  ...                  1
2018-01-03                 3  ...                  1
2018-01-04                 3  ...                  1
2018-01-05                 5  ...                  2
...                      ...  ...                ...
2018-12-27                 5  ...                  3
2018-12-28                19  ...                  3
2018-12-29                 9  ...                  2
2018-12-30                 7  ...                  2
2018-12-31                 7  ...                  1

[365 rows x 27 columns]

Work in progress

  • pip installation support
  • GEOA data extraction
  • TLE extraction and orbit propogation
  • SPE (Space Proton Event) data extraction (*)

(*) Some proton events are already covered in DPD data.