Skip to content

PoliceRewired/cvth-groups-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COVID-19 support communities map

This map is featured at: helpisavailable.org.uk

This is the source code for the COVID-19 local support community map, developed by volunteers from Police Rewired and other communities operating through the London College of Political Technologists.

screenshot of the map

Developers

To modify this site:

  • First, fork it on GitHub.
  • Make modifications.
  • Once ready, stage, commit and push to GitHub.
  • Submit a pull request with your commit.

You can test by serving the site to yourself on localhost:8000. (The Google Maps referer is set up to allow this.)

Forking

  • Fork using the github site - there's a fork button.
  • Clone your own fork - you can get the url from the clone button on your fork's page.
    git clone https://github.com/YOU/YOUR-REPO.git
  • Now you can edit the code in your local repo.

Making changes

NB. This short guide does not include help around using different branches. Branches are an easy way to work on individual features and keep them separate until they're ready to merge. You should read up on them if you'd like to use them. They're not necessary for the simplest work on small repositories.

  • Once you've made a change, stage the changes:
    git add --all
  • Now you can create a commit on your fork:
    git commit -m "your message about what changed in this commit"
  • You can accumulate any number of commits.
  • Periodically pull if there's a chance your repository has updated and is ahead of you.
    git pull
  • When ready, push all the commits you have to your repository.
    git push
  • Your repository now has all your changes.

Submitting a pull request

  • Visit your github repository's page.
  • There you'll see a New pull request button.
  • Use that to submit a pull request of all your changes.
  • Add some comments explaining what you've done and why.

Keeping in sync

Set up your local repo to have an additional upstream remote...

See: configuring a remote for a fork

  • To view the current remotes for your repository:
    git remote -v
  • Add ours as an extra remote called upstream with:
    git remote add upstream https://github.com/policerewired/cvth-groups-map.git

To sync, you'll first fetch the upstream remote, and then merge it into your own repository by branch.

See: syncing a fork

These instructions assume you're on the master branch.

  • Fetch the upstream:
    git fetch upstream
  • Merge the upstream master with your local master:
    git merge upstream/master

OS X localhost server

Under OS X, to serve the site to yourself, you can use:

python -m SimpleHTTPServer 8000

If you have Anaconda Python installed, instead use:

python3 -m http.server 8000

Libraries

The map uses the Google Maps javascript API, with data sourced from this crowdsourced sheet of communities.

jQuery is used to facilitate a quick and dirty call to retrieve the sheet as CSV. The jQuery-csv plugin is then used to construct objects from the CSV data, which are then plotted to the map as markers.

Releases

No releases published

Packages

No packages published