Code Monkey home page Code Monkey logo

hackforla / brigade-project-index-statusboard Goto Github PK

View Code? Open in Web Editor NEW
4.0 7.0 18.0 7.21 MB

A "statusboard" web app that is designed to display ongoing realtime information about each brigade's project-indexing opportunities.

Home Page: https://projects.brigade.network

License: Apache License 2.0

JavaScript 35.14% HTML 19.84% SCSS 11.40% CSS 3.56% TypeScript 30.03% Procfile 0.02%
code-for-america brigade react volunteer-opportunities hacktoberfest civic-tech civic-tech-projects-catalog civic-tech-projects-index civic-tech-index

brigade-project-index-statusboard's Introduction

Brigade Project Index Statusboard and API

This repo contains two things:

  1. A statusboard web app to display ongoing realtime information about Brigade projects
  2. An api to download data from the brigade-project-index and expose it via JSON API

The statusboard is running in production at https://projects.brigade.network and the API is accessible at https://statusboard.brigade.cloud.

The Project Index Working Group has bi-weekly video meetings and can be found in the Code for America #brigade-project-index Slack channel.

Running the Statusboard locally

The Statusboard is a Create-React-App, and supports their built-in commands, including yarn test and yarn build.

You can install the app and run it with,

cd statusboard
yarn install
yarn start

By default, the front-end will look for a local copy of the backend API for the React app to load data from, but you don't have to run the API locally. You can instead tell your local React app to use the online production API with an environment variable like this:

REACT_APP_API_URL=https://statusboard.brigade.cloud

or by using

yarn start-remote-api

instead of yarn start.

Running the API locally

If you choose to run the API locally (the default behaviour), you will need to use an older version of Node; install NVM and run:

cd api
nvm install 12
nvm use 12
yarn install
yarn start

Currently, the server fetches a new copy of the project index from Github every time (very expensive). If redis is running locally on port 6379, the API will use this to cache the results. We recommend installing and running Redis via Docker:

docker run --publish 6379:6379 redis:alpine

Other commands

npm run update-cache

This builds both the projectIndex cache and tags cache (data.json and tags.json respectively), and in deployment is run on a scheduler every 10 min.

To run the test suite, run:

yarn test

To access the server, use:

curl http://localhost:8080/api/data.json

brigade-project-index-statusboard's People

Contributors

c4lliope avatar dependabot[bot] avatar ethanstrominger avatar giosce avatar k3kaw8pnf7mkmdsmphz27 avatar kmooney avatar mmazanec22 avatar nihonjinrxs avatar nikolajbaer avatar rkaufman13 avatar rkiddy avatar tdooner avatar thadk avatar themightychris avatar wesleysalesberry avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

brigade-project-index-statusboard's Issues

Provide reasoning / explanation for utilizing Google Analytics for the Statusboard

As the statusboard is potentially getting more traffic, we might consider configuring an analytics platform such as Google. This decision can also extend to the brigade project index main page or final product as well.

That being said there are some considerations in adding 3rd party tracking. The goal of this issue / discussion is to understand the trade-offs, voice the concerns, and come to a group decision.

Reasons for Google Analytics:

  • Current site is a single page app (SPA), so request logs don't really tell us much about traffic
  • Google Analytics provides significant insight into user behavior, UI/UX breakdowns, sources of traffic, and feature usage
  • Effort to do non-Google analytics information is both time-consuming, potentially not free, and quite likely less informative

Concerns

  • Not everyone wants to be tracked, privacy concerns

Compromise solutions:

Please add your concerns / considerations on the trade-off!

Add GitHub action for unit tests

Is your feature request related to a problem? Please describe.

There should be a GitHub action checking if any commits/PRs break a unit test.

Allow projects to have co-owners/co-collaborators

Hopefully, by building this lovely thing, we will spark greater collaboration across the network. Already there are projects that are not "owned" by any particular brigade but have a more complex story-- like the Hurricane API that was started by Sketch City (Houston), forked, and is now led by members of Code for New Orleans and Open Data Delaware.

If there is already a way to represent this complexity, we should add it to the docs and indicate it in the UI somehow. If not, we should ask: how can we represent, both in the data model and the UI, cases like co-ownership and forks in different stages (i.e. just reskinned/redeployed vs forks that have taken on lives of their own)?

Topics Search is case sensitive

Not really a bug.
The Topics Search is case sensitive, so if I search for Edu I don't see topics that start with edu, similarly, "politcs" is different than "Politics".
I think this search should be case insensitive (like they are for project name, or brigade).

Make taxonomy table view

Overall goal is to show the categories from the taxonomy, whatever other detail there is

  • Use the table component that exists and is being used on the projects page
  • The API endpoint already exists
  • Add a route with React Router
  • Make a new "page" (take a look at the projects page)

Visual Design Updates

  • Change Link / Header color to Blue, not Red
  • make brigade topic listing green for the checkmark to be consistent
  • use pagespeed iconography - red triangle, yellow square, green dot (see google pagespeed insights for example)

Reset scroll on router change

Right now, when you click something that is farther down the page, it loads the new page in a scrolled-down position. The scroll should be reset to the top, unless we're intentionally navigating to a certain section.

Add suggested project meta data improvements to project listings

To provide actionable next steps for project owners / brigade captains coming to the status board, we need a way to provide suggested improvements to a project's meta data.

e.g. "Great you have a README, how about adding a CONTRIBUTING.md as well! Not sure where to start? Look here: .. "

An idea would be to pattern this after the Google Page Insights (also referenced in #2 ).

NOTE: this will be dependent the index itself capturing / broadcasting this meta data or the lack thereof.

Use mapbox, probably

Or find another mapping library that has better accessibility support and documentation.

Cleanup list of tags

Currently, the big list of tags (as found by the crawler) includes technology names, locations, events, brigade names and more.
Especially since currently the search is in "OR" of terms (so if I select food and javascript I get food projects and javascript projects) this is not very powerful (and in addition the quantity of tags is intimidating).
I suggest that the current large list contains only "topics" (issue being tackled) and probably to make another list for technologies.
Locations as listed by tags can be removed.
This cleanup activity can go along with the taxonomy definition and the filtering could leverage a taxonomy API.

Make it clearer that non-github projects are included, and can be included

Currently, the language of the statusboard implies that only GitHub projects are included. While that's the case for the majority of brigades, it is not inherently true, as any CSV or JSON file could be an organization's source of truth.

The statusboard should include some description about how the data is gathered so that people can understand where it's coming from, what its limitations are, and what they need to do if they want to see non-coding projects show up in the index. This might beg some questions about how we determine the last updated date of projects listed in a CSV or JSON file.

I wrote up a description for the general documentation push last spring that may be helpful to reference, but has perhaps been overwritten recently? This is the relevant PR where it was added.

Make table infinitely scroll rather than paginate

Right now you have to click "load more" at the bottom of the table to get the next 50 projects. Replace this with infinite scroll.

It would be ok if we had to replace the table library too-- the documentation for react-table is kind of awful. Whatever the replacement is, if there is one, should use native html elements (not just divs!) and the filtering/sorting/etc should be accessible.

Remove unused front end dependencies

I don't think we're actually using those d3 libraries anymore. Could also use a command line tool to check the rest of them and yarn remove anything that's unused.

Hack for LA is missing / Source of latitude and longitude values for brigades

Hack for LA projects are not appearing. The LA link was fixed in the source data on Feb 19, 2021.

Can the project list use the following json directly so changes occur immediately?
https://github.com/codeforamerica/brigade-information/blob/master/organizations.json

The following correctly includes Hack for LA:
https://github.com/codeforamerica/brigade-project-index/tree/index/v1/organizations

The map image on the API documentation page differs from the MapBox map. Does the MapBox map still pull from the API?
https://brigade.codeforamerica.org/

Here's a new map we created that pulls directly from the json API:
https://model.earth/apps/brigades/

Additional brigade lists:
Brigade contact list or this 2021 Brigade list sheet - source.

Improve user-friendliness of topics selection

  • Make the topics dropdown only show topic tags from the projects visible based on the time range filter (edit: see #67 )

  • Investigate making the dropdown smaller so it's not so visually overwhelming

  • Identify a small subset of topics which show off the ability of the project index to reveal projects in a particular area. Priority Action Area tags + other topics like "budget".

  • Add placeholder text to the tags list

Fix ESLinter/Pretty for TypeScript

Describe the bug

Some issues have crept into the eslint config when TypeScript was added to the project.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'src/components/PageContents/PageContents.js'
  2. View line 4 "import Projects from '../../pages/Projects/Projects';"
  3. See the incorrect eslint(import/extensions) warning and eslint(import/no-unresolved) error

Expected behavior

The code is correct -> no error/warning.

Desktop (please complete the following information):

VSCode with ESLinter and Pretty using the configurations in the statusboard directory.

Monitor code coverage

Is your feature request related to a problem? Please describe.

It would be nice to monitor the code coverage if we hope more volunteers will be contributing. E.g., how does a specific PR change the code coverage compared to the main branch?

Tweaks to status board UX

  • change title of brigades to "By Brigade" rather than leaders
  • change title of topics "Github Topic Tags By Use"
  • Show check for github description, and project count
  • Add legend to a map
  • make black dot bigger and gray
  • add zoom to map

Mega ticket to move taxonomy work forward

(Break up this ticket-- send via email, make tickets, etc)

  • Chris to move his modularization PR forward for project index
  • Ray to work on library that categorizes tags into taxonomy (using gitsheets)
  • Someone to use that library in the index so that indexed projects also have taxonomy tags
  • Use that library in this project for tag search
  • In parallel: work on taxonomy itself
  • Front end for anyone to make PRs to taxonomy-- see tags, make suggestions
  • Taxonomy repo needs documentation on all the ways to access the taxonomy-- backend free ways to use the data-- let front end devs use taxonomy directly

Add a Taxonomy page

While we keep working on the taxonomy (list and categorization of topics) it would be great to use the current api https://statusboard.brigade.cloud/api/taxonomy.json (or discuss if api needs to be different) to get the data to build an additional page (along side "Map" and "About").
First version of this page perhaps just being a three of folders and topics within, expandable folders, possibly with a search feature.

Fix failing unit test in Statusboard

Describe the bug

There is a failing unit test in the statusboard's test suite.

To Reproduce

Steps to reproduce the behavior:

  1. run the test suite in statusboard/package.json
  2. press "a" to run all
  3. Get Test Suites: 1 failed, 4 passed, 5 total due to Cannot find module './Projects' from 'Projects.test.js'

Expected behavior

There should never be failing unit tests in the main branch.

Add some fun data viz

Ideas about what this could be:

  • Histogram with brush selector for when projects were created/last updated/etc, maybe that also highlights by brigade or region or PAA
  • Making that histogram "playable" as an animation (sonify!)
  • Word cloud of topics that also responds to the time filtering
  • Adding stats about tag frequency by region to the map view
  • Show project lifecyles in contribution size and frequency
  • Network diagrams of contributors

Add state and regional map filtering

  • Make the brigade dropdown like the tag searchy one
  • Add regional and state buttons that are just shortcuts to a specific set of brigades
  • Change map to respond to scope of brigades selected

Add sorting to the project tables

Describe the bug

The order of the elements in the table changes when they are being filtered.

To Reproduce

At the time of writing, the default first two entries in the table are

a2downvoting
a2water

If we filter this column on a, the first two entries will be

ancElectionHistory
ACLU

i.e., the order of the elements changes when filtered. This shouldn't happen.

Expected behavior

The order of the elements shouldn't change based on the filter. This can be addressed by adding sorting.

Make query params and table filters play nice

Right now only the tags and time range use query params, and that filtering overrides the table filtering. Need to make sure that the table remains filtered even after query params change.

Add Puerto Rico and other US Territories to Map

The out-of-box US Albers projection used for the map does not include US Territories like Puerto Rico.

We should ideally have them included on the map, or at the very least have them listed under the map .

Improve about page content

Include:

  • how to contribute, include link to GH issues
  • a bit about the index/how the data works
  • how to tag your projects
  • links to all the documentation

Allow filtering / viewing of projects that have multiple topic tags

Add a way for users to look at projects that match multiple topic tags.

The simplest place to add this in the UI might be at the top of the topic detail listing with a call like "Add Topic Filter". The UI might also need to change to have a list of all "topics" at the top with little "X"s to clear them from the filter, as well as an input box that does a suggested/filtering list as you type in the topic tag.

Improve mobile UX

Spacing and line breaks are hilariously bad and need to be fixed.

Screenshot of project index on iPhone SE

Write up a product roadmap doc

Long term thought: we should maybe make a google drive folder for this project somewhere, and if possible make the settings default to public read only access. Alternately we could try discourse or just markdown files in this repo.

Better design for brigade page/map situation

It's a little awkward looking. Maybe the map should take up the full page and the project list should be some little sidebar drawer thing that pops out? Research accessible ways to implement whatever is the solution here.

Figure out the tag grouping issue

Ideas for how to keep the mapping somewhere:

  • Just keep it in a google sheet and use some npm library
  • Keep it in airtable and use their nice API
  • Keep in a google sheet and make some wee js library to make it easier to use in a project

Extra `Loading...` text in the table when no projects are matched

Describe the bug

There is Loading... text when nothing is loading in the table.

To Reproduce

Steps to reproduce the behavior:

  1. https://projects.brigade.network/
  2. Type in a filter that doesn't match any projects
  3. There is Loading... text despite nothing loading

Expected behavior

There should only be a Loading... text when something is actually loading.

Screenshots

Skärmavbild 2021-07-21 kl  17 01 07

Additional context

This is likely a good starting point

https://github.com/codeforamerica/brigade-project-index-statusboard/blob/a7069c8122f5feb98e9dac336dfdfc969c5e3118/statusboard/src/components/ProjectsTable/ProjectsTable.tsx#L48-L54

There might be a good unit test to add here.

Just "topics" and "description"

Currently underneath a project description that has topics and a description it says "[checkmark] Github Topics [checkmark] Github Description". However the statusboard is flexible and magical and allows for not-github-based projects to be included. It would perhaps therefore make sense to change this language.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.