GithubHelp home page GithubHelp logo

keithpjolley / swsdvolcal Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.11 MB

an express/timeline/datatables visualization of volunteerlocal info

JavaScript 10.82% Shell 3.78% CSS 71.92% HTML 12.54% Python 0.94%

swsdvolcal's Introduction

Express Timeline Visualization for VolunteerLocal data

keith p jolley (c)
Sun Jul  1 11:37:59 PDT 2018
squalor heights, ca, usa

What's it?

It's a tool to complement what VolunteerLocal provides to an event organizer. I recently helped coordinate ~500 volunteers over a weeklong event and had a couple of needs that were not being met out of the box. In particular I needed an overview of when/where I had people signed up and where we still needed to recruit more folks. Then, as we got closer to the day of we needed a way of knowing exactly who was supposed to be where and when, plus a way of seeing where we still had holes in the schedule.

For the overview requirement I used the timeline javascript library.

timeline:

picture of the swsd volunteer calendar timeline site

For the detailed view I used DataTables. DataTables has a JQuery dependency so I used it a bit on formatting and what-not.

table:

picture of the swsd volunteer calendar table site

Setup

This is a node express joint. It runs on port 9004 and I use nginx to proxy the connection:

    #
    location /swsdvolcal {
      proxy_pass http://localhost:9004; # swsd startup week san diego volunteerl calendar
    }

When debugging I like to run it as:

$ DEBUG=swsdvolcal:*;find app.js bin package.json routes credentials.js \( -type l -o -type f \) \! -name \.\* | entr -r npm start

which causes npm to restart everytime I save a file. Handy.

To use on your own project, download your data from: https://app.volunteerlocal.com/manage/?go=volunteer_export and "select all" on custom and standard fields.

Don't check "Group by...".

Do check "Show empty rows...".

Move the downloaded xxx.csv into data/ and run bin/import.sh.

The header on the downloaded file isn't quite what we want. It comes with some garbage chars in it. (?) Fix by running:

% bin/import.sh

To create 10(or fewer) random entries to help with debug:

$ n=10;(head -1 ./data/data.tsv;(while [ $n -gt 0 ];do let n=$n-1;awk 'NR>1' ./data/data.tsv|randomfile;done)|sort -u) > ./data/data-$n.tsv

To run as a service:

$ cp bin/swsdvolcal /etc/init.d/
$ sudo /etc/init.d/swsdvolcal start

The init script relies on the handy [forever](https://www.npmjs.com/package/forever) npm module (and I know the init script is ugly).

I included the script bin/anon.py, which uses bin/names.txt to remove the contact info of our volunteers. In 'production' I used the npm [express-basic-auth](https://www.npmjs.com/package/express-basic-auth) module to read credentials.js. Auth is commented out now but use credentials.example.js as a template. Your volunteers would probably not like their contact info going out into the wild.

swsdvolcal's People

Contributors

keithpjolley avatar

Watchers

James Cloos avatar

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.