mirror of
https://github.com/kristoferssolo/LU-Data-Visualisation.git
synced 2025-10-21 20:10:40 +00:00
update dependency info
This commit is contained in:
parent
6710551bbf
commit
db5a110981
28
main.py
28
main.py
@ -1,5 +1,16 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""
|
||||||
|
Author: Kristiāns Francis Cagulis, kc22015
|
||||||
|
Date: 25.12.2023.
|
||||||
|
Github: https://github.com/kristoferssolo/LU-Data-Visualisation
|
||||||
|
Dependencies: matplotlib, numpy, pandas, loguru, openpyxl
|
||||||
|
|
||||||
|
This script generates two plots from Excel files and saves them to a PDF file.
|
||||||
|
Excel files can be stored in the same directory as this script or in a subdirectory called "data".
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
import platform
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -11,14 +22,6 @@ from loguru import logger
|
|||||||
from matplotlib.backends.backend_pdf import PdfPages
|
from matplotlib.backends.backend_pdf import PdfPages
|
||||||
|
|
||||||
|
|
||||||
logger.add(
|
|
||||||
Path("logs", "data.log"),
|
|
||||||
format="{time} | {level} | {message}",
|
|
||||||
level="INFO",
|
|
||||||
rotation="1 MB",
|
|
||||||
compression="zip",
|
|
||||||
)
|
|
||||||
|
|
||||||
BASE_PATH = Path(__file__).parent
|
BASE_PATH = Path(__file__).parent
|
||||||
WIND_GUSTS_FILENAME = "vejaAtrumsBrazmas.xlsx"
|
WIND_GUSTS_FILENAME = "vejaAtrumsBrazmas.xlsx"
|
||||||
WIND_SPEED_FILENAME = "vejaAtrumsFaktiskais.xlsx"
|
WIND_SPEED_FILENAME = "vejaAtrumsFaktiskais.xlsx"
|
||||||
@ -29,6 +32,15 @@ BLUE = "#1f77b4"
|
|||||||
ORANGE = "#ff7f0e"
|
ORANGE = "#ff7f0e"
|
||||||
BLACK = "#000000"
|
BLACK = "#000000"
|
||||||
|
|
||||||
|
# Setup logger
|
||||||
|
logger.add(
|
||||||
|
BASE_PATH.joinpath("logs", "data.log"),
|
||||||
|
format="{time} | {level} | {message}",
|
||||||
|
level="INFO",
|
||||||
|
rotation="1 MB",
|
||||||
|
compression="zip",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def read_data(filename: str) -> pd.DataFrame:
|
def read_data(filename: str) -> pd.DataFrame:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -9,6 +9,7 @@ license = { text = "MIT" }
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"openpyxl==3.1.2",
|
"openpyxl==3.1.2",
|
||||||
"loguru==0.7.2",
|
"loguru==0.7.2",
|
||||||
|
"numpy==1.26.2",
|
||||||
"matplotlib==3.8.2",
|
"matplotlib==3.8.2",
|
||||||
"pandas==2.1.4",
|
"pandas==2.1.4",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
attrs>=23.1.0
|
|
||||||
loguru>=0.7.2
|
loguru>=0.7.2
|
||||||
matplotlib>=3.8.2
|
matplotlib>=3.8.2
|
||||||
|
numpy>=1.26.2
|
||||||
openpyxl>=3.1.2
|
openpyxl>=3.1.2
|
||||||
pandas>=2.1.4
|
pandas>=2.1.4
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user