Home

David Megginson edited this page Dec 7, 2016 · 16 revisions

libhxl-python is a Python library and collection of command-line tools that support the Humanitarian Exchange Language (HXL) standard. These tools allow users to load, analyze, transform, and perform quality control on HXL data.

The library uses a coding style familiar from JavaScript libraries like JQuery. For example, the following code loads a HXL dataset, creates a report of the number of rows for each district, and adds a new column with a fixed value for the country:

import hxl

url = 'http://example.org/3w-data.csv'

output = hxl.data(url).count('#adm1').add_columns('#country=Malaysia')