Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chris Jewell
covid19uk
Commits
4c0e7240
Commit
4c0e7240
authored
Mar 06, 2021
by
Chris Jewell
Browse files
Merge branch 'add_inferencedata_format' into 'master'
Fix geopackage geometry joining issue See merge request
!31
parents
da9aa2d7
cb23b18a
Changes
1
Hide whitespace changes
Inline
Side-by-side
covid/tasks/summary_geopackage.py
View file @
4c0e7240
"""Summarises posterior distribution into a geopackage"""
import
pickle
as
pkl
import
numpy
as
np
import
xarray
import
pandas
as
pd
import
geopandas
as
gp
...
...
@@ -31,7 +32,7 @@ def summary_geopackage(input_files, output_file, config):
# Load and filter geopackage
geo
=
gp
.
read_file
(
config
[
"base_geopackage"
],
layer
=
config
[
"base_layer"
])
geo
=
geo
[
geo
[
"lad19cd"
].
isin
(
data
.
coords
[
"location"
])]
geo
=
geo
[
geo
[
"lad19cd"
].
isin
(
np
.
array
(
data
.
coords
[
"location"
])
)
]
geo
=
geo
.
sort_values
(
by
=
"lad19cd"
)
# Dump data into the geopackage
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment