Converting Solar Radiation Measurements from ASTI Weather Stations to a Monthly Average Shapefile using Python

5th Philippine Geomatics Symposium (PhilGEOS 2016)
April 20-22, 2016
University of the Philippines Diliman



Materials and Methods


About the Authors

Pintor, Sola, Teves

SOLAR Component
Philippine Renewable Energy Resource Mapping from LiDAR Surveys (REMap)
Nationwide Detailed Resources Assessment using LiDAR Program (Phil-LiDAR 2)

Weather Data

Source Data format Time Range of Daily Measurements
ASTI Weather API
.json 08:00H - 08:00H
BSWM Agro-Met site
.csv 08:00H - 08:00H
Philippine E-Science Grid Repository
.csv 00:00H - 24:00H


  1. Different data formatting
  2. No option to download averages
  3. Missing and incomplete readings

ASTI Weather API


Phil. E-Science Grid Repo


Daily Solar radiation (W/m2) readings from ASTI weather sensors

-- to --

Monthly Average solar radiation (W/m2) shapefile

Which Data Source?

Python Modules






Inputs: YYYY/MM/DD, Keyword/s

Output: Daily sensor readings (.csv)

Beautifulsoup is used to crawl the repository and search sensor measurements that match the keywords and the date provided.



Inputs: Directory of daily sensor readings, Sensor Type

Output: Average solar radiation (W/m2) readings per sensor per month per year (.csv)

Each daily sensor reading for a month is checked to determine if it will be included in the computation of the monthly average.


Inputs: Output of PART 1

Output: Monthly average solar radiation (W/m2) per sensor (.csv)

Pandas is used to compute for the weighted mean


Inputs: Output of COMPILE PART 2

Output: Monthly average solar radiation (W/m2) (.shp)

Pyshp converts the csv to a shapefile.

REMap-SOLAR logo

ASTI Solar Download, Compile, and Convert Tool

available at:

Demo (Download)

Demo (Compile Part 1)

Demo (Compile Part 2)

Demo (Convert)


  • Python is useful not just in the processing but also in the pre-processing of geospatial data because of its versatility and the variety of its libraries.
  • The developed tool significantly decreases the time needed to download and average ASTI solar radiation data.

Current Limitations and Future Improvements

  • The Download tool can be used to download all the weather sensor data in the repo but the Compile and Convert tools were specifically created for the purpose of computing the monthly average solar radiation values.
  • With a little editing of the code, the tool can be extended to compile and convert other weather data.
  • Use data from the ASTI Weather API instead of the Phil. E-Science Grid Repository
This research is an output of the Nationwide Detailed Resources Assessment using LiDAR Program (Phil-LiDAR 2), in particular, Project 5: Philippine Renewable Energy Resource Mapping from LiDAR Surveys (REMap). The Program is funded by the Department of Science and Technology (DOST) through its grants-in-aid program (GIA) and implemented by the Training Centre for Applied Geodesy and Photogrammetry of the University of the Philippines – Diliman.


This presentation is available at: