-
Notifications
You must be signed in to change notification settings - Fork 0
Docs/geojson data #14
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
40 changes: 31 additions & 9 deletions
40
app/deployment/new-deployment/page.mdx → app/deployment/01-new-country/page.mdx
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,33 +1,55 @@ | ||
| # Create Deployment | ||
| import { Callout } from 'nextra/components' | ||
|
|
||
| # Add Country | ||
|
|
||
| ## Database updates | ||
|
|
||
| ### Country code | ||
| Register [ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) for the country within the database schema. | ||
| Add reference to `geo.countries` table using the [ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) for country code. | ||
|
|
||
| E.g., if adding the country "Zimbabwe", should use code `zw` | ||
| E.g., if adding the country "Zimbabwe", should use code `ZW`. Use the `local_name` column to add non-english name variant if popular | ||
|
|
||
| ```sql | ||
| ALTER TYPE country_code ADD VALUE 'zw'; | ||
| INSERT INTO geo.countries (code, name, local_name) | ||
| VALUES ('ZW', 'Zimbabwe', null); | ||
| ``` | ||
|
|
||
| Once the country has been added register available languages, e.g. | ||
|
|
||
|
|
||
| ### Languages | ||
| Additionally register any language codes using the [ISO 639 Set 1 standard](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) | ||
| Once the country has been added register any language codes using the [ISO 639 Set 1 standard](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) | ||
|
|
||
| Include an `en` variant for localised updates to English language variables, e.g. adding `shona` and `ndebele` languages | ||
|
|
||
| Update database | ||
| ```sql | ||
| ALTER TYPE locale_code ADD VALUE 'zw_en'; | ||
| ALTER TYPE locale_code ADD VALUE 'zw_sn'; | ||
| ALTER TYPE locale_code ADD VALUE 'zw_nd'; | ||
| INSERT INTO geo.locales (language_code, name, local_name, country_code) | ||
| VALUES | ||
| -- Zimbabwe | ||
| ('en', 'English', NULL, 'ZW'), | ||
| ('sn', 'Shona', 'ChiShona', 'ZW'), | ||
| ('nd', 'Ndebele', 'isiNdebele', 'ZW'), | ||
| ``` | ||
|
|
||
| Additionally update the `public.translations` table to include the columns | ||
|
|
||
| ```sql | ||
| ALTER table public.translations ADD en-ZW text; | ||
| ALTER table public.translations ADD sn-ZW text; | ||
| ALTER table public.translations ADD nd-ZW text; | ||
| ``` | ||
|
|
||
| ### Export Definitions | ||
|
|
||
| When all database updates are complete export the new type-definitions via | ||
| ```bash | ||
| yarn nx run picsa-server:gen-types | ||
| ``` | ||
|
|
||
| --- | ||
| ## TODO - Review and tidy | ||
|
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. |
||
|
|
||
|
|
||
| ### Data updates | ||
| Finally provide mappings in the hardcoded app data mappings | ||
|
|
||
|
|
||
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Map Data | ||
|
|
||
| A combination of map tile base images and topojson data are used within the app to show map geographic areas and administrative boundaries. | ||
|
|
||
| A standalone repository has been setup for managing these processes, and integrated into the dashboard | ||
| https://github.com/e-picsa/geo-boundaries-topojson | ||
|
|
||
| ## Dashboard Management | ||
| Dashboard users with `app.admin` privileges can access the Geo administration pages and interact with the function via dashboard Api | ||
|
|
||
| (TODO - examples) | ||
|
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. |
||
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,4 +1,5 @@ | ||
| export default { | ||
| "new-deployment":"Add New Deployment", | ||
| "map-tiles":"Map Tiles" | ||
| "01-new-country":"Add New Country", | ||
| "02-map-geo-data":"Map Data", | ||
| "02-map-geo-data--legacy":"Map Data (legacy)" | ||
| }; | ||
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.
The SQL statements for adding columns to
public.translationsare invalid. Column names containing hyphens, likeen-ZW, must be enclosed in double quotes in PostgreSQL to be valid identifiers. Without quoting, theseALTER TABLEcommands will fail.