ONSdigital / dp-find-insights-poc-api

Find Insights Proof of Concept
MIT License
1 stars 0 forks source link

Feature/query by short nomis code #106

Closed VivianAllen closed 2 years ago

VivianAllen commented 2 years ago

commit 0163ced5fdba2a3bf957207d054bb6baa527df27 (HEAD -> feature/query-by-short-nomis-code, origin/feature/query-by-short-nomis-code) Author: Vivian Allen vivian.allen@methods.co.uk Date: Thu Dec 16 15:42:03 2021 +0000

add censustable parameter to api and geodata entrypoints

Include censustable (string) parameter in args parsed from
url query parameters (in api.go) and CLI args
(in cmd/geodata/main.go).

swagger.yml updated.

commit 1a8c850f7b7ba7b37f03c5ebc305288562b152db Author: Vivian Allen vivian.allen@methods.co.uk Date: Wed Dec 15 14:02:39 2021 +0000

add censustable param to geodata

Add new parameter 'censustable' (string) to
geodata.App. This represents a short nomis code /
nomis table, e.g. a grouping of census data categories,
e.g. QS101EW. When used in a query, it will be expanded
to all cateogories that are part of that table.
This change needed to simplify API querying for all
categories within a table.

Tests added in geodata_test.go.

commit b557cb4e03faf2bbe32a8a617699e1da79abb518 Author: Vivian Allen vivian.allen@methods.co.uk Date: Tue Dec 14 17:21:08 2021 +0000

refactor geodata.censusQuery for testing

Refactor out GetCensusQuerySQL from app.censusQuery
in pkg/geodata/geodata.do as public func to assemble
census query SQL - this is called by app.censusQuery.
This change needed to make testing easier.

Add geodata_test.go with simple row query test for
geodata.GetCensusQuerySQL.