-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add some docs * Docs tweaks
- Loading branch information
Showing
7 changed files
with
73 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
|
||
# Get the latest 90 key from https://basemaps.linz.govt.nz/ | ||
VITE_LINZ_API_KEY=<TODO> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
# Water Allocations Viewer | ||
|
||
The Water Allocations Viewer is a web app allowing water allocation and usage relating to the Natural Resources Plan areas to be viewed. | ||
|
||
It's built using React and [React Router](https://reactrouter.com/en/main) and bundled using [Vite](https://vitejs.dev). | ||
|
||
The app displays a map using [react-map-gl](https://visgl.github.io/react-map-gl) showing a base layer from LINZ. It fetches water allocation and usage data the [EOP Manager API](../Manager/) via [React Query](https://tanstack.com/query/latest) to display on this map, and alongside it. | ||
|
||
It makes use of [Nivo](https://nivo.rocks) for more advanced visualisation of the data. | ||
|
||
![Screenshot the App](./plan-limits-ui-screenshot.png) | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
* Node | ||
* The [EOP Manager API](../Manager/) and supporting services | ||
|
||
### Setup | ||
- Run `npm install` | ||
- Copy `.env.local.template` to `.env.local`, and populate with a valid [LINZ Basemap Api Key](https://basemaps.linz.govt.nz). | ||
|
||
### Running | ||
```bash | ||
npm run dev | ||
``` | ||
|
||
### Running tests | ||
```bash | ||
npm run test | ||
``` | ||
|
||
### Code Linting and Formatting | ||
```bash | ||
npm run check | ||
``` | ||
|
||
### Deployment | ||
Deployment is to AWS Amplify which is connected to specific git branches. | ||
|
||
- Pushing to the branch `deploy/plan-limits-ui/dev` will deploy to the development envrionment, [https://plan-limits.gw-eop-dev.tech](https://plan-limits.gw-eop-dev.tech). | ||
- Pushing to the branch `deploy/plan-limits-ui/stage` will deploy to the staging envrionment, [https://plan-limits.gw-eop-stage.tech](https://plan-limits.gw-eop-stage.tech). | ||
- Pushing to the branch `deploy/plan-limits-ui/prod` will deploy to the staging envrionment, [https://plan-limits.eop.gw.govt.nz](https://plan-limits.eop.gw.govt.nz). | ||
- Pushing to a branch prefixed with `deploy/plan-limits-ui/review/` will create a new Amplify review envrionment linked to the dev Manager API. This is accessible from a URL with the format `https://deploy-plan-limits-ui-{branch-suffix}.d2qauh5z55065f.amplifyapp.com/limits/gw/usage` |
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,2 @@ | ||
# Get the latest 90 key from https://basemaps.linz.govt.nz/ | ||
NEXT_PUBLIC_LINZ_API_KEY= |
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 |
---|---|---|
@@ -1,34 +1,35 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
# EOP Rainfall Viewer Prototype (AKA InterRain) | ||
|
||
## Getting Started | ||
InterRain is a prototype developed to illustratate the value in aggregating rainfall observations across council boundaries and presenting it in a user-friendly map-based UI. | ||
|
||
It's built using [Next.js](https://nextjs.org/) and bootstrapped with [create-next-app](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
First, run the development server: | ||
The app displays a map using [react-map-gl](https://visgl.github.io/react-map-gl) showing a base layer from LINZ. It fetches rainfall observation data from the [EOP Manager API](../Manager/) via [SWR](https://swr.vercel.app), and renders this using icons. It also allows the user to navigate to different areas and time periods, customise the display, and share the current view via the URL. | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
``` | ||
![Screenshot the InterRain](./rainfall-viewer-screenshot.png) | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
Local development depends on the EOP Manager and supporting services. The rest of this doc is the readme generated by create-next-app. | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
## Getting Started | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
### Prerequisites | ||
|
||
## Learn More | ||
* Node | ||
* The [EOP Manager API](../Manager/) and supporting services | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
### Setup | ||
- Run `npm install` | ||
- Copy `.env.local.template` to `.env.local`, and populate with a valid [LINZ Basemap Api Key](https://basemaps.linz.govt.nz). | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
### Running locally | ||
- Run `npm run dev` | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
### Code Linting and Formatting | ||
- Run `npm run lint` | ||
|
||
## Deploy on Vercel | ||
### Deployment | ||
Deployment is to AWS Amplify which is connected to specific git branches. | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
- Pushing to the branch `deploy/interrain-ui/dev` will deploy to the development envrionment, [https://interrain.gw-eop-dev.tech](https://interrain.gw-eop-dev.tech). | ||
- Pushing to the branch `deploy/interrain-ui/stage` will deploy to the staging envrionment, [https://interrain.gw-eop-stage.tech](https://interrain.gw-eop-stage.tech). | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.