Building your own EPW file



I need to evaluate some historical weather data of a little village at Haiti. The only format I can get is XML, JSON or HTML. Is there a way how to feed that data to Ladybug and use it’s tools to evaluate it?

For now I can only read weather API and get data to Grasshopper using gHowl.

I also found it’s possible to create custom epw data file using this SW but have no idea if it works.

Any suggestions? Thanks…



EPW files at their core are really just specialized forms of CSV files. So your best bet might be to just open an existing EPW in Excel and replace the data in the columns with the data that you have in your XML. I don’t know how your XML is structured or even if the weather data is hourly so it’s hard to know whether this method would work. If you upload the XML, we might be able to help you more.

Alternatively, if you download your historical data from the National Climatic Data Center (NCDC):

… I’ve written a small component to format the downloaded data into an EPW (assuming that you have an existing nearby EPW to start with).

The component is under the Dragonfly beta and you can download it here:…



Hello Chris

Thanks for response. I finally got .csv data and edited them in Excel, but there are some issues with third-party weather data records (many records are missing, but they are working to fix it). The whole file is attached.

Let’s say I wanna evaluate that data with Ladybug. So the EPW file contains only one year data, right? What is the best idea to get some relevant data if I have hourly records from 2012 to 2017? My idea was to create an average of every hour of each year to have average year data.

Anse Rouge Weather Data.csv (3.99 MB)



Glad that you’re getting closer to having something that works.

I would not recommend averaging each hour over the 5 years as this will create a flat line data set that misses the peak conditions that occur in a typical year. The real EPWs in the DOE database are made by statistically analyzing each month over the collection period. They then determine the most “typical” January, the most “typical” February, etc. This is done by looking at both average monthly temperature and standard deviation. Then, they string these months together to make a full year. Finally, they take the “transition” days between each month and interpolate them so that you don’t have a sharp jump in the data.

I would recommend doing something like this with your data set. Alternatively, you could just pick which of the 5 years is most typical (instead of a monthly analysis). Whatever you do, just don’t average each hour over the 5 years (for the reason stated earlier).



Also, if you wouldn’t mind changing the title of this discussion to something more appropriate like “Building your own EPW file,” that will make it easier for others in your situation to search for this issue.