Tuesday, December 28, 2021

Importing JSON files into GAMS

JSON (JavaScript Object Notation) files [1] provide a flexible and simple way to store and exchange data. It is text, so we can easily look at it. JSON files typically have the extension .json. (using it may help syntax coloring in editors). JSON can represent rather complex tree-like data structures that may require some work to convert into simpler formats such as tabular data. 

EIA (U.S. Energy Information Administration) provides bulk data in JSON format [2]. These files are not strictly JSON. They have a .txt extension. Basically, each line is a JSON object. 


To make it a proper JSON file one would have to wrap this into an array.

Sunday, December 26, 2021

MacMahon Squares

Percy Alexander MacMahon [1]


This post is about a puzzle designed by Percy Alexander MacMahon [1] and described in a book published in 1921 [2].