| |
---|
| | "execution_count": 2, |
---|
| | "metadata": {}, |
---|
| | "outputs": [], |
---|
| | "source": [ |
---|
| | "with open('./dataset-structure.sparql', 'r') as query_file:\n", |
---|
| | "with open('./dataset-structure-geo.sparql', 'r') as query_file:\n", |
---|
| | " query_str = query_file.read()\n", |
---|
| | "\n", |
---|
| | "sparql.setQuery(query_str)\n", |
---|
| | "\n", |
---|
| |
---|
| | "source": [ |
---|
| | "dimension_counts = codelists_pivot.count('rows').sort_values(ascending=False)\n", |
---|
| | "codelists_pivot = codelists_pivot.reindex(columns=dimension_counts.index).fillna('')\n", |
---|
| | "pd.set_option('max_colwidth', -1) # don't truncate cells\n", |
---|
| | "with open(\"dataset-dimensions.html\", \"w\") as f:\n", |
---|
| | "with open(\"dataset-dimensions-geo.html\", \"w\") as f:\n", |
---|
| | " f.write(codelists_pivot.to_html(escape=False))\n", |
---|
| | "HTML(codelists_pivot.to_html(escape=True))" |
---|
| | ] |
---|
| | }, |
---|
| |
---|
| | |
|