Awesome
<p align="center"> <a href="https://corona.rickkln.com"> <img alt="corona" src="https://github.com/rickkln/corona/blob/master/src/images/coronavirus.png?raw=true" width="180" /> </a> </p> <h1 align="center"> Covid-19 Pandemic Status </h1>There are various great Covid-19 tracking and information websites. EndCoronavirus.org, which is backed by the NECSI, being the best one I have found.
This one aims to provide a simple tool to track global progress in defeating Covid-19, by focusing on the rate of change in death count globally. Though it is mainly a venue for me to play around with and learn GraphQL and React-Table among other things. All data is pulled from the COVID-19 data repository provided by Johns Hopkins University. Which in turn pulls data from various government sources, and tracking projects such as WorldoMeters.
All code for this site is open source. It is built with Gatsby and consumes the Johns Hopkins data via a GraphQl API which in turn wraps a another parser.
π Differences in this repo with standard Gatsby
-
TypeScript is used for a better developer experience.
-
ESLint and the AirBnB TypeScript style guide help you avoid, and fix, simple issues in your code.
-
The default Gatsby formating tool, Prettier, has been removed in order to avoid conflicts with the ESLint + AirBnB TypeScript tools described above.
π Quick start
-
Clone this repository.
# Clone the repo git clone https://github.com/rickkln/corona
-
Navigate into the cloned folder.
Navigate into your new siteβs directory, install node modules and start it up:
cd corona/ npm install gatsby develop
-
Open the source code and start editing.
Your site is now running at
http://localhost:8000
!Note: You'll also see a second link:
http://localhost:8000/___graphql
. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.Open the
corona
directory in your code editor of choice and edit away. Save your changes and the browser will update in real time! -
Submit your changes!
Once you are ready to submit your changes you can simply submit a Pull Request to this repo.
π§ What's inside?
A quick look at the top-level files and directories you'll see in this project.
.
βββ node_modules
βββ src
βββ .eslintrc.js
βββ .gitignore
βββ firebase.json
βββ gatsby-config.js
βββ LICENSE.md
βββ package-lock.json
βββ package.json
βββ README.md
βββ tsconfig.json
-
/node_modules
: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed. -
/src
: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template.src
is a convention for βsource codeβ. -
.eslintrc.js
: This is a configuration file for ESLint. ESLint is a tool to help you avoid and fix simple issues in your code. -
.gitignore
: This file tells git which files it should not track / not maintain a version history for. -
firebase.json
: This is a configuration file that lists your Firebase project configuration. Learn more about this file in the Firebase docs. -
gatsby-config.js
: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins youβd like to include, etc. (Check out the config docs for more detail). -
LICENSE.md
: Gatsby itself, the primary dependency of this project is licensed under the MIT license, however the original code in this project is licensed under the Mozilla Public License 2.0. -
package-lock.json
(Seepackage.json
below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. (You wonβt change this file directly). -
package.json
: A manifest file for Node.js projects, which includes things like metadata (the projectβs name, author, etc). This manifest is how npm knows which packages to install for your project. -
README.md
: This text file, which contains useful reference information about your project. -
tsconfig.json
: This is a configuration file for TypeScript. The tsconfig.json file specifies the root files and the compiler options required for the TypeScript compiler to compile the project. More details are available in the TypeScript docs.
π Need some help with Gatsby?
If you are looking for more guidance on Gatsby which this project is built in you can use the official documentation for Gatsby. Here are some useful places to start:
-
The official in-depth tutorial for creating a site with Gatsby. It starts with zero assumptions about your level of ability and walks through every step of the process.
-
The Gatsby code samples. In particular, check out the Guides, API Reference, and Advanced Tutorials sections in the sidebar.
-
The documentation on the TypeScript Plugin. This is specifically useful if you are forking this project, as it uses TypeScript.
π License
The original code in this repo is licensed under the GNU General Public License v3.0. For more information view the LICENSE file.