dataset update draft + setup script
This commit is contained in:
1 parent
670cd0aebc
commit
8524c81410
3 files changed
+403
No files matched your search
@@ -0,0 +1,45 @@
|
||||
# setup_tensorflow.ps1
|
||||
|
||||
#!!!!!!!!!!!!!!!
|
||||
# NOTICE
|
||||
# if cant run run this first:
|
||||
|
||||
# Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
|
||||
|
||||
|
||||
# Ensure script runs from its own directory
|
||||
Set-Location -Path $PSScriptRoot
|
||||
|
||||
# Check Python version
|
||||
$pythonVersion = & python --version
|
||||
Write-Host "Detected Python version: $pythonVersion"
|
||||
|
||||
# Create virtual environment
|
||||
python -m venv .venv
|
||||
|
||||
# Activate virtual environment
|
||||
. .\.venv\Scripts\Activate.ps1
|
||||
|
||||
# Upgrade pip
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
# Install TensorFlow (CPU version)
|
||||
pip install tensorflow
|
||||
|
||||
# Install additional dependencies
|
||||
pip install numpy pandas matplotlib scikit-learn jupyter statsmodels requests
|
||||
|
||||
|
||||
# Verify TensorFlow installation
|
||||
python -c "import tensorflow as tf; print('TensorFlow version:', tf.__version__)"
|
||||
|
||||
# Optional: Check for GPU availability
|
||||
python -c "import tensorflow as tf; print('GPUs available:', tf.config.list_physical_devices('GPU'))"
|
||||
|
||||
|
||||
# Verify installations
|
||||
python -c "import sklearn; print('scikit-learn version:', sklearn.__version__)"
|
||||
python -c "import matplotlib; print('matplotlib version:', matplotlib.__version__)"
|
||||
python -c "import pandas as pd; print('pandas version:', pd.__version__)"
|
||||
python -c "import statsmodels.api as sm; print('statsmodels version:', sm.__version__)"
|
||||
python -c "import requests; print('requests exists:', requests.__version__)"
|
||||
@@ -0,0 +1,31 @@
|
||||
import requests
|
||||
import pandas as pd
|
||||
from datetime import datetime
|
||||
|
||||
# Define parameters
|
||||
latitude = 21.0305
|
||||
longitude = 105.8458
|
||||
start_date = "2024-06-24"
|
||||
end_date = datetime.now().strftime("%Y-%m-%d") # Today's date
|
||||
|
||||
# Construct the API URL
|
||||
url = (
|
||||
f"https://power.larc.nasa.gov/api/temporal/daily/point"
|
||||
f"?parameters=QV2M"
|
||||
f"&community=RE"
|
||||
f"&longitude={longitude}"
|
||||
f"&latitude={latitude}"
|
||||
f"&start={start_date.replace('-', '')}"
|
||||
f"&end={end_date.replace('-', '')}"
|
||||
f"&format=CSV"
|
||||
)
|
||||
|
||||
# Make the API request
|
||||
response = requests.get(url)
|
||||
if response.status_code == 200:
|
||||
# Save the CSV content to a file
|
||||
with open("hanoi_qv2m_latest.csv", "w") as file:
|
||||
file.write(response.text)
|
||||
print("Data successfully downloaded and saved to 'hanoi_qv2m_latest.csv'.")
|
||||
else:
|
||||
print(f"Failed to retrieve data: {response.status_code}")
|
||||
@@ -0,0 +1,327 @@
|
||||
-BEGIN HEADER-␍
|
||||
NASA/POWER Source Native Resolution Daily Data ␍
|
||||
Dates (month/day/year): 06/24/2024 through 05/06/2025 in LST␍
|
||||
Location: latitude 21.0305 longitude 105.8458 ␍
|
||||
elevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 87.73 meters␍
|
||||
The value for missing source data that cannot be computed or is outside of the sources availability range: -999 ␍
|
||||
parameter(s): ␍
|
||||
QV2M MERRA-2 Specific Humidity at 2 Meters (g/kg) ␍
|
||||
-END HEADER-␍
|
||||
YEAR,MO,DY,QV2M
|
||||
2024,6,24,21.04
|
||||
2024,6,25,21.36
|
||||
2024,6,26,21.37
|
||||
2024,6,27,21.11
|
||||
2024,6,28,21.8
|
||||
2024,6,29,22.21
|
||||
2024,6,30,22.17
|
||||
2024,7,1,21.63
|
||||
2024,7,2,20.98
|
||||
2024,7,3,22.14
|
||||
2024,7,4,21.59
|
||||
2024,7,5,20.86
|
||||
2024,7,6,21.47
|
||||
2024,7,7,21.74
|
||||
2024,7,8,21.68
|
||||
2024,7,9,22.06
|
||||
2024,7,10,22.5
|
||||
2024,7,11,21.78
|
||||
2024,7,12,21.37
|
||||
2024,7,13,22.14
|
||||
2024,7,14,22.12
|
||||
2024,7,15,21.48
|
||||
2024,7,16,21.72
|
||||
2024,7,17,21.14
|
||||
2024,7,18,21.13
|
||||
2024,7,19,21.64
|
||||
2024,7,20,22.11
|
||||
2024,7,21,21.34
|
||||
2024,7,22,20.41
|
||||
2024,7,23,20.64
|
||||
2024,7,24,21.53
|
||||
2024,7,25,21.82
|
||||
2024,7,26,21.71
|
||||
2024,7,27,22.0
|
||||
2024,7,28,22.89
|
||||
2024,7,29,21.96
|
||||
2024,7,30,21.48
|
||||
2024,7,31,20.91
|
||||
2024,8,1,20.39
|
||||
2024,8,2,20.53
|
||||
2024,8,3,20.64
|
||||
2024,8,4,21.31
|
||||
2024,8,5,21.56
|
||||
2024,8,6,21.37
|
||||
2024,8,7,21.23
|
||||
2024,8,8,21.89
|
||||
2024,8,9,22.17
|
||||
2024,8,10,22.02
|
||||
2024,8,11,23.39
|
||||
2024,8,12,22.19
|
||||
2024,8,13,20.99
|
||||
2024,8,14,21.01
|
||||
2024,8,15,21.5
|
||||
2024,8,16,21.26
|
||||
2024,8,17,21.08
|
||||
2024,8,18,21.37
|
||||
2024,8,19,21.67
|
||||
2024,8,20,21.85
|
||||
2024,8,21,22.18
|
||||
2024,8,22,22.34
|
||||
2024,8,23,21.49
|
||||
2024,8,24,20.78
|
||||
2024,8,25,20.74
|
||||
2024,8,26,21.03
|
||||
2024,8,27,20.4
|
||||
2024,8,28,20.83
|
||||
2024,8,29,21.7
|
||||
2024,8,30,21.69
|
||||
2024,8,31,21.21
|
||||
2024,9,1,21.04
|
||||
2024,9,2,21.23
|
||||
2024,9,3,20.95
|
||||
2024,9,4,20.91
|
||||
2024,9,5,21.87
|
||||
2024,9,6,22.46
|
||||
2024,9,7,20.38
|
||||
2024,9,8,22.21
|
||||
2024,9,9,22.59
|
||||
2024,9,10,19.73
|
||||
2024,9,11,18.93
|
||||
2024,9,12,19.58
|
||||
2024,9,13,20.13
|
||||
2024,9,14,20.97
|
||||
2024,9,15,19.92
|
||||
2024,9,16,20.7
|
||||
2024,9,17,20.91
|
||||
2024,9,18,20.88
|
||||
2024,9,19,21.2
|
||||
2024,9,20,21.49
|
||||
2024,9,21,21.34
|
||||
2024,9,22,18.08
|
||||
2024,9,23,15.67
|
||||
2024,9,24,15.72
|
||||
2024,9,25,17.01
|
||||
2024,9,26,18.15
|
||||
2024,9,27,20.34
|
||||
2024,9,28,21.82
|
||||
2024,9,29,22.5
|
||||
2024,9,30,22.59
|
||||
2024,10,1,17.75
|
||||
2024,10,2,13.32
|
||||
2024,10,3,12.16
|
||||
2024,10,4,12.46
|
||||
2024,10,5,12.75
|
||||
2024,10,6,14.79
|
||||
2024,10,7,15.56
|
||||
2024,10,8,14.75
|
||||
2024,10,9,15.01
|
||||
2024,10,10,14.92
|
||||
2024,10,11,14.56
|
||||
2024,10,12,16.09
|
||||
2024,10,13,17.78
|
||||
2024,10,14,18.31
|
||||
2024,10,15,18.89
|
||||
2024,10,16,17.75
|
||||
2024,10,17,18.73
|
||||
2024,10,18,19.35
|
||||
2024,10,19,19.14
|
||||
2024,10,20,18.75
|
||||
2024,10,21,18.82
|
||||
2024,10,22,18.3
|
||||
2024,10,23,13.04
|
||||
2024,10,24,12.12
|
||||
2024,10,25,11.88
|
||||
2024,10,26,12.38
|
||||
2024,10,27,13.23
|
||||
2024,10,28,11.89
|
||||
2024,10,29,12.62
|
||||
2024,10,30,14.27
|
||||
2024,10,31,14.25
|
||||
2024,11,1,12.54
|
||||
2024,11,2,10.86
|
||||
2024,11,3,12.62
|
||||
2024,11,4,14.28
|
||||
2024,11,5,13.31
|
||||
2024,11,6,12.96
|
||||
2024,11,7,12.3
|
||||
2024,11,8,10.86
|
||||
2024,11,9,10.56
|
||||
2024,11,10,11.53
|
||||
2024,11,11,13.48
|
||||
2024,11,12,15.48
|
||||
2024,11,13,16.0
|
||||
2024,11,14,16.8
|
||||
2024,11,15,17.69
|
||||
2024,11,16,17.32
|
||||
2024,11,17,15.78
|
||||
2024,11,18,13.79
|
||||
2024,11,19,12.67
|
||||
2024,11,20,11.13
|
||||
2024,11,21,10.25
|
||||
2024,11,22,10.07
|
||||
2024,11,23,11.01
|
||||
2024,11,24,13.13
|
||||
2024,11,25,14.48
|
||||
2024,11,26,10.12
|
||||
2024,11,27,8.89
|
||||
2024,11,28,8.4
|
||||
2024,11,29,7.89
|
||||
2024,11,30,8.23
|
||||
2024,12,1,10.56
|
||||
2024,12,2,12.95
|
||||
2024,12,3,14.32
|
||||
2024,12,4,13.74
|
||||
2024,12,5,13.33
|
||||
2024,12,6,13.49
|
||||
2024,12,7,10.27
|
||||
2024,12,8,8.06
|
||||
2024,12,9,9.51
|
||||
2024,12,10,12.57
|
||||
2024,12,11,11.36
|
||||
2024,12,12,8.62
|
||||
2024,12,13,7.53
|
||||
2024,12,14,6.2
|
||||
2024,12,15,5.72
|
||||
2024,12,16,5.88
|
||||
2024,12,17,7.43
|
||||
2024,12,18,7.79
|
||||
2024,12,19,6.57
|
||||
2024,12,20,6.94
|
||||
2024,12,21,7.41
|
||||
2024,12,22,6.65
|
||||
2024,12,23,7.08
|
||||
2024,12,24,6.82
|
||||
2024,12,25,8.07
|
||||
2024,12,26,9.09
|
||||
2024,12,27,8.88
|
||||
2024,12,28,6.77
|
||||
2024,12,29,7.18
|
||||
2024,12,30,9.45
|
||||
2024,12,31,8.77
|
||||
2025,1,1,9.01
|
||||
2025,1,2,9.48
|
||||
2025,1,3,8.9
|
||||
2025,1,4,9.04
|
||||
2025,1,5,8.48
|
||||
2025,1,6,8.38
|
||||
2025,1,7,10.05
|
||||
2025,1,8,10.79
|
||||
2025,1,9,8.49
|
||||
2025,1,10,6.25
|
||||
2025,1,11,5.25
|
||||
2025,1,12,4.88
|
||||
2025,1,13,6.18
|
||||
2025,1,14,8.71
|
||||
2025,1,15,7.92
|
||||
2025,1,16,6.61
|
||||
2025,1,17,7.2
|
||||
2025,1,18,9.15
|
||||
2025,1,19,9.57
|
||||
2025,1,20,9.25
|
||||
2025,1,21,9.1
|
||||
2025,1,22,10.87
|
||||
2025,1,23,11.66
|
||||
2025,1,24,12.4
|
||||
2025,1,25,13.38
|
||||
2025,1,26,6.73
|
||||
2025,1,27,4.98
|
||||
2025,1,28,5.08
|
||||
2025,1,29,6.57
|
||||
2025,1,30,9.55
|
||||
2025,1,31,12.04
|
||||
2025,2,1,12.62
|
||||
2025,2,2,11.92
|
||||
2025,2,3,7.08
|
||||
2025,2,4,6.33
|
||||
2025,2,5,8.68
|
||||
2025,2,6,10.71
|
||||
2025,2,7,7.47
|
||||
2025,2,8,5.87
|
||||
2025,2,9,5.76
|
||||
2025,2,10,7.78
|
||||
2025,2,11,10.23
|
||||
2025,2,12,11.98
|
||||
2025,2,13,9.21
|
||||
2025,2,14,11.81
|
||||
2025,2,15,13.55
|
||||
2025,2,16,12.12
|
||||
2025,2,17,11.73
|
||||
2025,2,18,10.42
|
||||
2025,2,19,11.56
|
||||
2025,2,20,12.26
|
||||
2025,2,21,12.02
|
||||
2025,2,22,12.23
|
||||
2025,2,23,9.44
|
||||
2025,2,24,7.47
|
||||
2025,2,25,9.16
|
||||
2025,2,26,9.68
|
||||
2025,2,27,11.47
|
||||
2025,2,28,13.32
|
||||
2025,3,1,14.55
|
||||
2025,3,2,15.38
|
||||
2025,3,3,15.63
|
||||
2025,3,4,15.82
|
||||
2025,3,5,13.52
|
||||
2025,3,6,7.54
|
||||
2025,3,7,7.35
|
||||
2025,3,8,9.21
|
||||
2025,3,9,11.06
|
||||
2025,3,10,12.61
|
||||
2025,3,11,14.01
|
||||
2025,3,12,15.53
|
||||
2025,3,13,16.46
|
||||
2025,3,14,16.73
|
||||
2025,3,15,15.55
|
||||
2025,3,16,8.23
|
||||
2025,3,17,8.28
|
||||
2025,3,18,8.03
|
||||
2025,3,19,7.61
|
||||
2025,3,20,7.59
|
||||
2025,3,21,8.26
|
||||
2025,3,22,9.52
|
||||
2025,3,23,11.31
|
||||
2025,3,24,12.96
|
||||
2025,3,25,14.77
|
||||
2025,3,26,15.56
|
||||
2025,3,27,16.38
|
||||
2025,3,28,16.95
|
||||
2025,3,29,9.29
|
||||
2025,3,30,7.54
|
||||
2025,3,31,7.78
|
||||
2025,4,1,8.88
|
||||
2025,4,2,9.74
|
||||
2025,4,3,10.32
|
||||
2025,4,4,12.76
|
||||
2025,4,5,13.94
|
||||
2025,4,6,14.16
|
||||
2025,4,7,14.74
|
||||
2025,4,8,15.99
|
||||
2025,4,9,16.53
|
||||
2025,4,10,16.99
|
||||
2025,4,11,18.25
|
||||
2025,4,12,17.02
|
||||
2025,4,13,11.06
|
||||
2025,4,14,11.39
|
||||
2025,4,15,12.32
|
||||
2025,4,16,13.41
|
||||
2025,4,17,17.43
|
||||
2025,4,18,19.03
|
||||
2025,4,19,18.94
|
||||
2025,4,20,19.42
|
||||
2025,4,21,20.04
|
||||
2025,4,22,20.53
|
||||
2025,4,23,20.75
|
||||
2025,4,24,20.22
|
||||
2025,4,25,18.37
|
||||
2025,4,26,18.09
|
||||
2025,4,27,19.44
|
||||
2025,4,28,18.48
|
||||
2025,4,29,16.88
|
||||
2025,4,30,17.44
|
||||
2025,5,1,17.31
|
||||
2025,5,2,17.37
|
||||
2025,5,3,19.26
|
||||
2025,5,4,-999.0
|
||||
2025,5,5,-999.0
|
||||
2025,5,6,-999.0
|
||||
|
Reference in new issue
Block a user