-
Notifications
You must be signed in to change notification settings - Fork 26
Dev environmental exposure #1455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jc2341
wants to merge
159
commits into
main
Choose a base branch
from
dev-Environmental-Exposure
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
159 commits
Select commit
Hold shift + click to select a range
cf59df2
dev-Environmental-Exposure: add buffer creater for test purpose
jc2341 fce3b37
dev-Environmental-Exposure: add consolidated env_features obda
jc2341 c3dbfed
dev-Environmental-Exposure: add food hygiene rating query template fo…
jc2341 9c2556f
dev-Environmental-Exposure: add greenspace query template for env_fea…
jc2341 ad6eea0
devEnvironmental-Exposure: correct the naming typo
jc2341 5f38521
devEnvironmental-Exposure: tested OBDA and sparql to extract attribut…
jc2341 a714893
dev-Environmental-Exposure: optimise query efficiency for greenspace …
jc2341 adb9191
dev-Environmental-Exposure: add food hygiene extrator
jc2341 3fcbdb6
dev-Environmental-Exposure: create food hygiene rating extractor func…
jc2341 2c3f3bd
dev-Environmental-Exposure: create greenspace extractor function for …
jc2341 c3d84f8
dev-Environmental-Exposure: add exposure calculator
jc2341 2587533
dev-Environmental-Exposure: add a robust tool to extract trajectory m…
jc2341 d2e3392
dev-Environmental-Exposure: add config-properties file, summarise env…
jc2341 30381f2
dev-Environmental-Exposure: route file for exposure goal-based agent
jc2341 bc92f41
dev-Environmental-Exposure: tested http request with generic dataIRI
jc2341 50bce42
dev-Environmental-Exposure: correct typos or http filensme
jc2341 83cd8ba
dev-Environmental-Exposure: consolidate featuretype and domain name q…
jc2341 67dc338
dev-Environmental-Exposure: add feature type query templates
jc2341 ba1294f
dev-Environmental-Exposure: add function to fetch trajectory metedata…
jc2341 1ef3877
dev-Environmental-Exposure: update db connection function
jc2341 b80589f
dev-Environmental-Exposure: update package import info
jc2341 039cf0d
dev-Environmental-Exposure: update table name fetch function
jc2341 4c56e4d
dev-Environmental-Exposure: get time series data function
jc2341 d50b8ee
dev-Environmental-Exposure: add typing package and execute_query func…
jc2341 84cc9c8
dev-Environmental-Exposure: consolidate OBDA mapping for test purpose
jc2341 bf35330
dev-Environmental-Exposure: tested version of OBDA, support feature t…
jc2341 0735d1d
dev-Environmental-Exposure: add CORS package in deployment process
jc2341 06578dc
dev-Environmental-Exposure: add SPARQLWrapper package in deployment p…
jc2341 9f6d216
dev-Environmental-Exposure: app.py under testing
jc2341 65d8114
dev-Environmental-Exposure: generic query for env_feature type and do…
jc2341 2cebc10
dev-Environmental-Exposure: add AREA type of feature in http request …
jc2341 f1b6b3a
dev-Environmental-Exposure: tested version for generic query of Point…
jc2341 f374c4c
dev-Environmental-Exposure: generic query command use geosparql
jc2341 2b7fca9
dev-Environmental-Exposure: successful version: query feature type ge…
jc2341 59305a8
dev-Environmental-Exposure: debug settings(tasks.json) for vscode deb…
jc2341 99cdd0e
dev-Environmental-Exposure: debug settings(launch.json)
jc2341 f432d77
dev-Environmental-Exposure: remove comments in json file
jc2341 5b8cecb
dev-Environmental-Exposure: successful app: query feature type generi…
jc2341 4cd8d3f
dev-Environmental-Exposure: add geopandas package in docker settings
jc2341 3d1b841
dev-Environmental-Exposure: successful case for updating to db
jc2341 49bc202
dev-Environmental-Exposure: add fallbacks for env_extractor, increase…
jc2341 bf98694
dev-Environmental-Exposure: staticbuffer and greenpace query, source sql
jc2341 8a20389
dev-Environmental-Exposure: CumulativeTrajectoryQuery, source sql
jc2341 dacf35a
dev-Environmental-Exposure: optimised version by cache
jc2341 1c8ee45
dev-Environmental-Exposure: add equivalent sql command for trajectory…
jc2341 399d267
dev-Environmental-Exposure: placeholder explanation of equivalent sql…
jc2341 b94e3b3
dev-Environmental-Exposure: add equivalent sql command for trajectory…
jc2341 e57ad42
dev-Environmental-Exposure: link source table name to env feature nam…
jc2341 3e0fc5b
dev-Environmental-Exposure: sparql query for dataSourceName extraction
jc2341 0053cb5
dev-Environmental-Exposure: tested equivalent sql for instantiated gp…
jc2341 f04e405
dev-Environmental-Exposure: tested equivalent sql for greenspace and …
jc2341 dc653dd
dev-Environmental-Exposure: basic version for adding simplified expos…
jc2341 bd6c99e
dev-Environmental-Exposure: add fetch source table name function
jc2341 75f489d
dev-Environmental-Exposure: testing route for simplified exposure cal…
jc2341 3899a60
dev-Environmental-Exposure: add List and Dict pack for parameter tran…
jc2341 140133b
dev-Environmental-Exposure: recorded point: valid dataSourceName fetch
jc2341 f42930d
dev-Environmental-Exposure: tested route for environmental exposure c…
jc2341 c5cccab
dev-Environmental-Exposure: add time count for each critical step
jc2341 44afd37
dev-Environmental-Exposure: old version remove execute_qury function
jc2341 ec9f501
dev-Environmental-Exposure: new http request template for exposure ca…
jc2341 9ec6b1b
dev-Environmental-Exposure: add multiple trajectory IRI in example ht…
jc2341 9c19ce4
dev-Environmental-Exposure: rename template to exposure_count for bet…
jc2341 57c983f
dev-Environmental-Exposure: tested curl file for launch exposure count
jc2341 58edf14
dev-Environmental-Exposure: add curl command for exposure_count route
jc2341 bc75cb4
dev-Environmental-Exposure: amend the description section of agent ma…
jc2341 62c9045
dev-Environmental-Exposure: create hyperlink for tools mentioned in r…
jc2341 775824e
dev-Environmental-Exposure: create count-based exposure module, revis…
jc2341 b50809d
dev-Environmental-Exposure: add guildance for executing exposure_coun…
jc2341 c6e848a
dev-Environmental-Exposure: create hyperlink for config.properties
jc2341 3ed7656
dev-Environmental-Exposure: test the exposure route with remote servi…
jc2341 77abeda
dev-Environmental-Exposure: import tested route files
jc2341 4a9a53d
dev-Environmental-Exposure: correct the url_prefix for register_bluep…
jc2341 135c9eb
dev-Environmental-Exposure: correct the url in route.py
jc2341 5d6dae9
dev-Environmental-Exposure: Clean up the project history files and ke…
jc2341 4c73c92
dev-Environmental-Exposure: Corrected indexing of config.properties file
jc2341 baf62af
dev-Environmental-Exposure: Simplified OBDA statement in resources fo…
jc2341 5e7d093
dev-Environmental-Exposure: Create link for CURL and HTTP POST
jc2341 2694be3
dev-Environmental-Exposure: Adjust the logical order of the narrative…
jc2341 f8a63ea
dev-Environmental-Exposure: remove old-version config file placed und…
jc2341 3ca8108
dev-Environmental-Exposure: Enhance the explanation of ENV_DATA_ENDPO…
jc2341 69efbed
dev-Environmental-Exposure: Manage query commands by exposure type
jc2341 991771c
dev-Environmental-Exposure: add and test area query adapted to trajec…
jc2341 55b2c82
dev-Environmental-Exposure: add connect db function with try-execept …
jc2341 c162738
dev-Environmental-Exposure: remove outdated buffer creator
jc2341 bace66b
dev-Environmental-Exposure: remove area folder that stores tested que…
jc2341 9bf4912
dev-Environmental-Exposure: reset the Post url to localhost
jc2341 7df2488
dev-Environmental-Exposure: reset the Post url to localhost for prepr…
jc2341 d2f725e
dev-Environmental-Exposure: hide sensitive info in config property fi…
jc2341 9da73d4
dev-Environmental-Exposure: remove duplicated config.properties file
jc2341 ddba2a3
dev-Environmental-Exposure: remove test case, use sql template for be…
jc2341 73192f4
dev-Environmental-Exposure: remove test case, employ sparql template,…
jc2341 a5c6da1
dev-Environmental-Exposure: create exposure_utilities, use class to m…
jc2341 da67fc4
dev-Environmental-Exposure: reduce duplicated function syntax, import…
jc2341 5c3bcf5
dev-Environmental-Exposure: create SQL templates which are impoted in…
jc2341 c5b3747
dev-Environmental-Exposure: polish exposure utilities, employ the que…
jc2341 abb46d5
dev-Environmental-Exposure: sparql twmplate for food hygiene, greensp…
jc2341 acbee28
dev-Environmental-Exposure: remove outdated test_and_debug.py
jc2341 bcffed7
dev-Environmental-Exposure: correct the route url, remove unnecessary…
jc2341 fa87c5f
dev-Environmental-Exposure: tested version with modularised sql/sparq…
jc2341 729e4ec
dev-Environmental-Exposure: clean resource folder, remove outdated ob…
jc2341 75c576c
dev-Environmental-Exposure: import DB_URL, DB_USER and DATABASE Name …
jc2341 942974b
dev-Environmental-Exposure: remove redundant list of config.properties
jc2341 f74f1e1
dev-Environmental-Exposure: Upgrade numpy version to >=1.22 to meet r…
jc2341 71ec883
dev-Environmental-Exposure: sync pandas version to >=1.4.0 used on l…
jc2341 2b65963
dev-Environmental-Exposure: Adjust config file pointer
jc2341 5325049
dev-Environmental-Exposure: Fix Dockerfile casing warning: change 'as…
jc2341 c600db5
dev-Environmental-Exposure: Remove version field from Docker Compose …
jc2341 23cea9b
dev-Environmental-Exposure: Remove version field from Docker Compose …
jc2341 d81cf59
dev-Environmental-Exposure: resolve f-string warning mainly in sparql…
jc2341 a1a2f09
dev-Environmental-Exposure: add digital ocean stack url
jc2341 06bbaa2
dev-Environmental-Exposure: add digital ocean stack url in curl for r…
jc2341 d9c9726
dev-Environmental-Exposure: added executeable permission for all .sh …
jc2341 73b2296
dev-Environmental-Exposure: change git executable bit, make .sh scrip…
jc2341 51f0d7d
dev-Environmental-Exposure: create cleanning tool for raw gps data
jc2341 ecc5219
dev-Environmental-Exposure: add cleaedning tool in gps route, test ve…
jc2341 edad8b0
dev-Environmental-Exposure: remove outdated config file and unused se…
jc2341 1525e15
dev-Environmental-Exposure:benchmark, successful code for processing …
jc2341 359b4bb
dev-Environmental-Exposure: create .env for targetfolder path, create…
jc2341 5c49184
dev-Environmental-Exposure: benchmark: successful code for bind mount…
jc2341 758fb85
dev-Environmental-Exposure:replace absoulte path of input folder with…
jc2341 c6996e3
dev-Environmental-Exposure:replac remove inaccurate http url in 4.2 s…
jc2341 8efa673
dev-Environmental-Exposure: consolidate the description in data inges…
jc2341 f9a38e2
dev-Environmental-Exposure: polish the json files used in docker swarm
jc2341 5f07829
dev-Environmental-Exposure: add functionality description for bind mount
jc2341 82b35f8
dev-Environmental-Exposure: new bind mount method learnt from Feature…
jc2341 e5991dc
dev-Environmental-Exposure: remove unnecessary operation that copy xu…
jc2341 4122f78
dev-Environmental-Exposure: use localhost as url examples
jc2341 addedc5
dev-Environmental-Exposure: correct config,properties file, use local…
jc2341 a4ba55a
dev-Environmental-Exposure: correct config,properties file, revise re…
jc2341 abdf030
dev-Environmental-Exposure: use prepraring instead of placing to get …
jc2341 b1e253a
dev-Environmental-Exposure: update route file and http request templa…
jc2341 c3759c1
dev-Environmental-Exposure: upgrade cleaning tool, includes flipping …
jc2341 ec4b0f8
dev-Environmental-Exposure: add treatment for abnormal spacing of col…
jc2341 f82c071
dev-Environmental-Exposure: improve the direction determination logic…
jc2341 7fcac81
dev-Environmental-Exposure: add time slicing filter, modify count exp…
jc2341 3aedcac
dev-Environmental-Exposure: remove duplicated cleaning operation for …
jc2341 2536ae0
dev-Environmental-Exposure: add def update_unix_time to create a Unix…
jc2341 1b85cb8
dev-Environmental-Exposure: merge unix crator function into gps task …
jc2341 a9879ea
dev-Environmental-Exposure: add absolute time filter sparql template
jc2341 1a98df1
dev-Environmental-Exposure: update greenspace query template used in …
jc2341 f9ee3cb
dev-Environmental-Exposure: update opening hours extractor based on o…
jc2341 00d93cc
dev-Environmental-Exposure: clean the code for absolute filter templa…
jc2341 6ea5eb9
dev-Environmental-Exposure: new route to absorb absolute time filter
jc2341 ba2b9fe
dev-Environmental-Exposure: update gps_client.py, remove duplicated l…
jc2341 5c07cdc
dev-Environmental-Exposure: update relative time filter basic lib
jc2341 4b0e07a
dev-Environmental-Exposure: function lib for solution a and b, will b…
jc2341 f2a4b35
dev-Environmental-Exposure: change notation for placeholder function,…
jc2341 fda8bc3
dev-Environmental-Exposure: add an aotumatic srid extraction query, …
jc2341 958dd70
dev-Environmental-Exposure: add flexible process function for area ty…
jc2341 03c0f3b
dev-Environmental-Exposure: benchmark: tested version for agent with …
jc2341 5af28ef
dev-Environmental-Exposure: benchmark: temporarily include trip detec…
jc2341 4810713
dev-Environmental-Exposure: add guidance for setting config file andp…
jc2341 7d6ee72
dev-Environmental-Exposure: remove unnecessary comments from gps client
jc2341 0382e34
dev-Environmental-Exposure: get_timeseries_fallback table name has an…
jc2341 11eb3a8
dev-Environmental-Exposure: resolved an issue with trajectory-iri han…
jc2341 b217165
dev-Environmental-Exposure: add exposure at time module for point fea…
jc2341 917efe2
dev-Environmental-Exposure: fix the write-back problem for exposure-a…
jc2341 e0f4617
dev-Environmental-Exposure: update new module for area-at-time exposu…
jc2341 04d2e44
dev-Environmental-Exposure: add initial value (-1) for result columns…
jc2341 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
24 changes: 24 additions & 0 deletions
24
Agents/FenlandTrajectoryAgent/agent/exposure_calculator/count/absolute_time_filter.sparql
This file contains hidden or 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,24 @@ | ||
PREFIX fh: <http://www.theworldavatar.com/ontology/OntoFHRS/> | ||
PREFIX ies4: <http://ies.data.gov.uk/ontology/ies4#> | ||
PREFIX geo: <http://www.opengis.net/ont/geosparql#> | ||
PREFIX wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#> | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
|
||
SELECT DISTINCT ?be ?geometry ?wkt ?lat ?long | ||
WHERE {{ | ||
BIND("{given_time}"^^xsd:dateTimeStamp AS ?givenTime) | ||
BIND(SUBSTR(STR(?givenTime), 1, 4) AS ?timeYear) | ||
?be a fh:BusinessEstablishment ; | ||
geo:hasGeometry ?geometry . | ||
FILTER(CONTAINS(STR(?geometry), CONCAT("/", ?timeYear))) | ||
?geometry geo:asWKT ?wkt . | ||
OPTIONAL {{ ?geometry wgs:lat ?lat . }} | ||
OPTIONAL {{ ?geometry wgs:long ?long . }} | ||
?startEvent ies4:isStartOf ?be ; | ||
ies4:inPeriod ?startPeriod . | ||
?startPeriod ies4:iso8601PeriodRepresentation ?startTime . | ||
?endEvent ies4:isEndOf ?be ; | ||
ies4:inPeriod ?endPeriod . | ||
?endPeriod ies4:iso8601PeriodRepresentation ?endTime . | ||
FILTER(?startTime <= ?givenTime && ?endTime >= ?givenTime) | ||
}} |
6 changes: 6 additions & 0 deletions
6
Agents/FenlandTrajectoryAgent/agent/exposure_calculator/count/get_crs_for_env_data.sparql
This file contains hidden or 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,6 @@ | ||
PREFIX geo: <http://www.opengis.net/ont/geosparql#> | ||
|
||
SELECT DISTINCT ?crs WHERE {{ | ||
?feature a <{env_data_iri}> ; | ||
geo:hasGeometry/geo:crs ?crs . | ||
}} |
15 changes: 9 additions & 6 deletions
15
Agents/FenlandTrajectoryAgent/agent/exposure_calculator/count/get_greenspace_area.sparql
This file contains hidden or 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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
PREFIX gs: <https://www.theworldavatar.com/kg/ontogreenspace/> | ||
PREFIX geo: <http://www.opengis.net/ont/geosparql#> | ||
SELECT ?feature ?function ?geometry | ||
PREFIX ex: <http://example.org/ns#> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Surely this is not an appropriate namespace for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. refer #1455 (comment) |
||
|
||
SELECT DISTINCT ?feature ?function ?geometry | ||
WHERE {{ | ||
?feature gs:isPartOfDomain <{env_data_iri}> ; | ||
gs:hasFunction ?function . | ||
?geoPoint gs:isPartOf ?feature ; | ||
geo:hasGeometry ?geometry . | ||
}} | ||
?feature a gs:Greenspace ; | ||
a geo:Feature ; | ||
gs:hasFunction ?function ; | ||
geo:hasGeometry ?geomNode . | ||
?geomNode ex:hasWKB ?geometry . | ||
}} |
13 changes: 11 additions & 2 deletions
13
Agents/FenlandTrajectoryAgent/agent/exposure_calculator/count/get_timeseries_data.sql
This file contains hidden or 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 |
---|---|---|
@@ -1,2 +1,11 @@ | ||
SELECT "time", "column1", "column2", "column3", "column4", "column5", "column6", "column7" | ||
FROM "{table_name}"; | ||
SELECT | ||
to_timestamp("UNIX_time" / 1000.0) AT TIME ZONE 'UTC' AS "time", | ||
"column1", | ||
"column2", | ||
"column3", | ||
"column4", | ||
"column5", | ||
"column6", | ||
"column7" | ||
FROM "{table_name}" | ||
ORDER BY "UNIX_time" ASC; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the name of this file misleading? How about
get_greenspace_geometry.sparql
?