Skip to content

Commit

Permalink
Merge pull request #226 from pph-collective/feat-documentation
Browse files Browse the repository at this point in the history
feat: documentation and github link
  • Loading branch information
eldu authored Nov 2, 2023
2 parents 8ffdfe1 + 424e659 commit e1ed20a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 37 deletions.
69 changes: 32 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
# SIGNAL
# [SIGNAL](https://signal-ri.org/)

A dashboard for COVID-19 data in RI
## About
All Rhode Islanders have the right to live a healthy and happy life. We all need resources to help us and our families
thrive at home, work, or school. But we don't all get these same opportunities because of where we live. This means that
some communities are affected by COVID-19 more than others.

## Project Setup
At Project SIGNAL, we use data to show how COVID-19 has impacted the hardest-hit neighborhoods. We make this data
available to support policies that protect the most vulnerable Rhode Islanders.

## Technical Details

This is a web-based project built on the [Vue Framework](https://vuejs.org/), a progressive javascript framework. It is
hosted on [Firebase](https://firebase.google.com/), Google's mobile and web app development platform. It uses
[Firestore](https://firebase.google.com/docs/firestore), a flexible and scalable NoSQL cloud database build on Google
Cloud infrastructure, to store and sync data.

We use [Mapbox](https://www.mapbox.com/), customizable maps, along side [Vega](https://vega.github.io/vega/), a
visualization grammar, to visualize data on our dashboard maps.

## Getting Started with SIGNAL

:exclamation: For in depth details on project set up, navigate to the `README.md` in the `scripts` folder. Located
[here](https://github.com/pph-collective/signal-app/tree/main/scripts).

### Requirements

Node version: 18+

For the map to work, you'll need a `.env` file in your project root directory with the following key for a
[mapbox access token](https://docs.mapbox.com/help/getting-started/access-tokens/).

For the map to work, you'll need a `.env` file in your project root directory with the following keys.
```
VITE_MAPBOX_ACCESS_TOKEN=
```

Node version: 18+
### Installation

```bash
# install dependencies
Expand All @@ -35,35 +60,5 @@ $ npm run serve

### Admin Setup

*Needed to upload files*

#### Set up Firebase
```
$ firebase login
```

#### Create a Service Account

1. Navigate to the Firebase console to generate a private key (Settings > Service Accounts).
2. Click **Generate New Private Key** and save the JSON file as `serviceAccount.json`
3. Add that JSON file to the project root directory. This file is listed in the `.gitignore`. Do not share this private key.

## Geojson
The `ri.json` file in the `assets/geojson` folder was generated by editing the `shp2topo.sh` script in the
[profound-app](https://github.com/pph-collective/profound-app) repo to create a geojson rather than a topojson.
Unfortunately, the county subdivisions shapefiles for the census doesn't have clean borders. The script in profound
creates the town borders by merging the block groups.

## Recommended IDE Setup (very optional)

- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)

## Troubleshooting

### Caching

When fetching dataset data, we first check the local cache for the dataset before querying the server. If you updated data and aren't seeing the change, try clearing your cache. **NOTE**: because of this, also try really hard not to need to update data once in production as the original data might have a longer shelf life than you anticipate.

### Analytics in development

If you have an adblocker, it might try to block the loading of the firebase analytics package. Have it trust the site.
In order to upload data, see the `README.md` file in the `scripts` folder for more detailed instructions on setup and
required scripts. Located [here](https://github.com/pph-collective/signal-app/tree/main/scripts).
11 changes: 11 additions & 0 deletions src/components/base/BaseFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,22 @@
<i class="far fa-copyright" />
<span class="copyright-span">{{ year }}{{ " " }}</span>
<span class="copyright-span">People, Place and Health Collective</span>
<ExternalLink
class="pl-4"
href="https://github.com/pph-collective/signal-app"
:show-icon="false"
>
<i class="fab fa-github has-text-white"></i>
<VisuallyHidden>GitHub</VisuallyHidden>
</ExternalLink>
</section>
</footer>
</template>

<script setup lang="ts">
import ExternalLink from "@/components/base/ExternalLink.vue";
import VisuallyHidden from "@/components/base/VisuallyHidden.vue";
const year = new Date().getFullYear();
</script>

Expand Down

0 comments on commit e1ed20a

Please sign in to comment.