Use filtered query in geo scope.
1 parent e58a349 commit ddcb4e14455f473692157007d59aba8fed43b793
@Alex Tucker Alex Tucker authored on 15 Feb 2019
Showing 1 changed file
View
4
family-scope/geo-scope.ipynb
"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))"
]
},