You can find the deployed project at Planet Data.
Westley Feller | Stephen Freeman |
---|---|
A realtime real world dashboard to teach middle school students the fundamentals of data visualization using real world / realtime earth data pulled and refreshed from a variety of sources.
- Tutorial to show a user the basics on how to properly use the app.
- Multiple lessons for different aspects of planet earth that are interesting and important.
- Interactive data visualization within each lesson that users can manipulate themselves to see the direct changes in the visualizations.
Back end built by DS using Flask and AWS lambda functions
In order for the app to function correctly, the user must set up their own environment variables. There should be a .env file containing the following:
* REACT_APP_CONFIRMED_CASES_MAPBOX_STYLE - pulls in styling from a saved mapbox
map
* REACT_APP_CONFIRMED_CASES_MAPBOX_STYLE_DARK - Alternative map style
used in dark mode
* REACT_APP_CONFIRMED_CASES_MAPBOX_TOKEN - needed to access mapbox api to serve
maps
* REACT_APP_TRACKING_ID - ID for Google Analytics
- React Testing Library (Integration)
- Jest(Unit)
yarn install
yarn start
- Add .env file to local project. See environment variables above. Variables are stored in 1password.
This repo uses git-secrets to prevent to prevent commiting secrets. After installing packages, install and configure git-secrets:
git clone https://github.com/awslabs/git-secrets.git
cd git-secrets
make install
git clone https://github.com/awslabs/git-secrets.git
cd git-secrets
PS > ./install.ps1
brew install git-secrets
cd /path/to/your/repo
git secrets --install
git secrets --register-aws
git secrets --add '^.*pk\..*$'
git secrets --add '^.*postgres://.*$'
AWS tokens will be found by default.
'^.pk..$' is a regex that matches whole strings that start with 'pk .'. This is the basic format of mapbox tokens so those will be found if saved anywhere in the repo.
'^.postgres://.$' is a regex that matches whole strings that start with 'postgres://' which should take care of Postgres URLs. If you're using separate variables for host, user, password, and database, then those variables will not be detected. Use a URL connection where possible.
cd /path/to/your/repo
git secrets --install -f
git secrets --register-aws
git secrets --add '^.*pk\..*$'
git secrets --add '^.*postgres://.*$'
AWS tokens will be found by default.
'^.pk..$' is a regex that matches whole strings that start with 'pk .'. This is the basic format of mapbox tokens so those will be found if saved anywhere in the repo.
'^.postgres://.$' is a regex that matches whole strings that start with 'postgres://' which should take care of Postgres URLs. If you're using separate variables for host, user, password, and database, then those variables will not be detected. Use a URL connection where possible.
Installing the git-secrets hooks will overwrite those installed by husky so we need to add those back in.
Open /path/to/repo/.git/hooks/pre-commit and add the following line at the
bottom of the file:
. "$(dirname "$0")/husky.sh"
* analyze - generate a visualization of the app's bundles and dependencies
* build - creates a build of the application
* eject - copy the configuration files and dependencies into the project so you have full control over them
* format - runs prettier against all files not in .gitignore
* lint - checks for errors in .js files
* lint:fix - checks for errors in .js files and fixs those that can be
auto-fixed
* prettier: runs prettier
* start - starts the production server after a build is created
* test - runs tests in watch mode
* test:CI - test script that runs on Github action for each push and pull
request
* test:coverage - runs tests and generates coverage report
* validate - runs format, lint, build, and test:coverage. Should be run
prior to submitting pull requests to ensure code adheres to project
style guidelines, tests pass, and src builds.
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct. Please follow it in all your interactions with the project.
If you are having an issue with the existing project code, please submit a bug report under the following guidelines:
- Check first to see if your issue has already been reported.
- Check to see if the issue has recently been fixed by attempting to reproduce the issue using the latest master branch in the repository.
- Create a live example of the problem.
- Submit a detailed bug report including your environment & browser, steps to reproduce the issue, actual and expected outcomes, where you believe the issue is originating from, and any potential solutions you have considered.
We would love to hear from you about new features which would improve this app and further the aims of our project. Please provide as much detail and information as possible to show us why you think your new feature should be implemented.
If you have developed a patch, bug fix, or new feature that would improve this app, please submit a pull request. It is best to communicate your ideas with the developers first before investing a great deal of time into a pull request to ensure that it will mesh smoothly with the project.
Remember that this project is licensed under the MIT license, and by submitting a pull request, you agree that your work will be, too.
- Ensure any install or build dependencies are removed before the end of the layer when doing a build.
- Update the README.md with details of changes to the interface, including new plist variables, exposed ports, useful file locations and container parameters.
- Ensure that your code conforms to our existing code conventions and test coverage.
- Include the relevant issue number, if applicable.
- You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you
These contribution guidelines have been adapted from this good-Contributing.md-template.
See [Backend Documentation](https://github.com/Lambda-School-Labs/earth -dashboard-ds) for details on the backend of our project.