-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update hexbin and dsra source (#129)
* Updates to new DSRA source repo and hex processing * changs to DSRA repo references * Update to same ES/Kibana version as FGP env * remove hexbin centroid aggregations * modularize data loading from postgres to ES * PSRA results for national model & add bld agg * load national psra instead of p/t subset * switch from P/T to national layer * update Kibana space and hexgrid * add index prefix * update social_fab loading and add hex * add global fabric * Kibana: update index patterns and logs * Kibana logs & patterns * add retry on ES timeout * ES/Kibana updates * lint style fixes * lint style fixes 2 * lint style fixes 3 * lint style fixes 4 * lint style fixes 5 * Update lintly-flake8.yml ignore E501, line too long. Adds undue burden trying to shorten long SQL queries * lint style fixes 6 Co-authored-by: William Chow <[email protected]>
- Loading branch information
Showing
27 changed files
with
1,185 additions
and
982 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# ================================================================= | ||
# !/bin/bash | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# Copyright (C) 2020-2021 Government of Canada | ||
# | ||
# Main Authors: Drew Rotheram <[email protected]> | ||
# Joost van Ulden <[email protected]> | ||
# ================================================================= | ||
|
||
|
||
import utils | ||
|
||
|
||
def main(): | ||
table = utils.PostGISdataset( | ||
utils.PostGISConnection(), | ||
utils.ESConnection(settings={ | ||
'settings': { | ||
'number_of_shards': 1, | ||
'number_of_replicas': 0 | ||
}, | ||
'mappings': { | ||
'properties': { | ||
'geometry': { | ||
'type': 'geo_shape' | ||
} | ||
} | ||
} | ||
}), | ||
view="opendrr_dsra_all_scenarios_cduid", | ||
sqlquerystring='SELECT *, ST_AsGeoJSON(geom) \ | ||
FROM dsra.dsra_all_scenarios_cduid \ | ||
ORDER BY dsra_all_scenarios_cduid."cduid" \ | ||
LIMIT {limit} \ | ||
OFFSET {offset}' | ||
) | ||
|
||
table.postgis2es() | ||
|
||
return | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# ================================================================= | ||
# !/bin/bash | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# Copyright (C) 2020-2021 Government of Canada | ||
# | ||
# Main Authors: Drew Rotheram <[email protected]> | ||
# Joost van Ulden <[email protected]> | ||
# ================================================================= | ||
|
||
|
||
import utils | ||
|
||
|
||
def main(): | ||
table = utils.PostGISdataset( | ||
utils.PostGISConnection(), | ||
utils.ESConnection(settings={ | ||
'settings': { | ||
'number_of_shards': 1, | ||
'number_of_replicas': 0 | ||
}, | ||
'mappings': { | ||
'properties': { | ||
'geometry': { | ||
'type': 'geo_shape' | ||
} | ||
} | ||
} | ||
}), | ||
view="opendrr_dsra_all_scenarios_csduid", | ||
sqlquerystring='SELECT *, ST_AsGeoJSON(geom) \ | ||
FROM dsra.dsra_all_scenarios_csduid \ | ||
ORDER BY dsra_all_scenarios_csduid."csduid" \ | ||
LIMIT {limit} \ | ||
OFFSET {offset}' | ||
) | ||
|
||
table.postgis2es() | ||
|
||
return | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ================================================================= | ||
# !/bin/bash | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# Copyright (C) 2020-2021 Government of Canada | ||
# | ||
# Main Authors: Drew Rotheram <[email protected]> | ||
# Joost van Ulden <[email protected]> | ||
# ================================================================= | ||
|
||
|
||
from utils import ESConnection | ||
from utils import PostGISdataset | ||
from utils import PostGISConnection | ||
|
||
|
||
def main(): | ||
table = PostGISdataset( | ||
PostGISConnection(), | ||
ESConnection(settings={ | ||
'settings': { | ||
'number_of_shards': 1, | ||
'number_of_replicas': 0 | ||
}, | ||
'mappings': { | ||
'properties': { | ||
'geometry': { | ||
'type': 'geo_shape' | ||
} | ||
} | ||
} | ||
}), | ||
view="opendrr_dsra_all_scenarios_dauid", | ||
sqlquerystring='SELECT *, ST_AsGeoJSON(geom) \ | ||
FROM dsra.dsra_all_scenarios_dauid \ | ||
ORDER BY dsra_all_scenarios_dauid."dauid" \ | ||
LIMIT {limit} \ | ||
OFFSET {offset}' | ||
) | ||
|
||
table.postgis2es() | ||
|
||
return | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# ================================================================= | ||
# !/bin/bash | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# Copyright (C) 2020-2021 Government of Canada | ||
# | ||
# Main Authors: Drew Rotheram <[email protected]> | ||
# Joost van Ulden <[email protected]> | ||
# ================================================================= | ||
|
||
|
||
import utils | ||
|
||
|
||
def main(): | ||
eruidTable = utils.PostGISdataset( | ||
utils.PostGISConnection(), | ||
utils.ESConnection(settings={ | ||
'settings': { | ||
'number_of_shards': 1, | ||
'number_of_replicas': 0 | ||
}, | ||
'mappings': { | ||
'properties': { | ||
'geometry': { | ||
'type': 'geo_shape' | ||
} | ||
} | ||
} | ||
}), | ||
view="opendrr_dsra_all_scenarios_eruid", | ||
sqlquerystring='SELECT *, ST_AsGeoJSON(geom) \ | ||
FROM dsra.dsra_all_scenarios_eruid \ | ||
ORDER BY dsra_all_scenarios_eruid."eruid" \ | ||
LIMIT {limit} \ | ||
OFFSET {offset}' | ||
) | ||
|
||
eruidTable.postgis2es() | ||
|
||
return | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ================================================================= | ||
# !/bin/bash | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# Copyright (C) 2020-2021 Government of Canada | ||
# | ||
# Main Authors: Drew Rotheram <[email protected]> | ||
# Joost van Ulden <[email protected]> | ||
# ================================================================= | ||
|
||
|
||
from utils import ESConnection | ||
from utils import PostGISdataset | ||
from utils import PostGISConnection | ||
|
||
|
||
def main(): | ||
table = PostGISdataset( | ||
PostGISConnection(), | ||
ESConnection(settings={ | ||
'settings': { | ||
'number_of_shards': 1, | ||
'number_of_replicas': 0 | ||
}, | ||
'mappings': { | ||
'properties': { | ||
'geometry': { | ||
'type': 'geo_shape' | ||
} | ||
} | ||
} | ||
}), | ||
view="opendrr_dsra_all_scenarios_sauid", | ||
sqlquerystring='SELECT *, ST_AsGeoJSON(geom) \ | ||
FROM dsra.dsra_all_scenarios_sauid \ | ||
ORDER BY dsra_all_scenarios_sauid."sauid" \ | ||
LIMIT {limit} \ | ||
OFFSET {offset}' | ||
) | ||
|
||
table.postgis2es() | ||
|
||
return | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.