VickySteeves/Women-Leaders-Openness


A sortable list & map of women in open access/source/scholarship: https://fyoaw.vickysteeves.com


forthebadge forthebadge

About

A list of women leaders in openness! This website contains a searchable, sortable list of women who do work in the field of openness: open access, open science, open scholarship, open source code, open data, open education resources -- anything open. There is also a map available for folks who would like to look for women leaders nearest them -- the hope is that this map makes planning conferences, workshops, and events more convenient. The data comes from April Hathcock's Google Doc and merge requests to this repository.

Building Locally

You can view this website locally once you've cloned this repository by just double clicking the index.html file and navigating around. However, you won't be able to see the map this way. I used Python to start up a local server to see the map along with the rest of the website. You can download Python for free here.

Here's how to get started via the command line:

Open up an Internet browser, and go to localhost:8000. You should now be able to see and interact with the website, including the map, locally!

Tech I'm Using

Get Data

To start, I grab data from April Hathcock's Google Doc which contains a crowd-sourced list of women who work in openness, and throw it into a separate Google sheet. Google Sheets provides some basic functionality I use to get the right data in the right columns, such as splitting columns on different values (Data > Split text to columns), such as commas. There is some manual clean up required after this to make sure everything fits into the 3 desired columns (at this point), 'Name', 'Twitter Handles', and 'Affiliation'.

Clean Data

When that's finished, I download the data as a .csv file. I then start up OpenRefine to geocode people based on their institutional affiliation. I used the steps from OpenRefine's Geocoding wiki to do so, specifically the "Fetching" and "Parsing" functions.

Basically, in OpenRefine, I click the dropdown menu from the "Affiliation" column, and select Edit Column > Add Column by Fetching URLs. In the text box, I input the formula: http://maps.google.com/maps/api/geocode/json?sensor=false&address=" + escape(value, "url"). I name the new column to be created "geo" or something of that ilk, and hit ok. Depending on how much data is there (I don't do the whole spreadsheet everytime, just incremementally as new data comes in), it could take a while. It's also subject to Google Maps rate limiting, so if you have a ton of data, it will take a long while.

After it's finished, there's a new column called "geo" with a ton of JSON. Select Edit Column > Add Column based on This Column and input this formula in the text box: with(value.parseJson().results[0].geometry.location, pair, pair.lat +", " + pair.lng). I name the new column "latlog" since it'll contain both values, separated by a comma. This will generate a new column with just the lat/long values.

Once that's finished, you can Edit Column > Split Into Several Columns, and then accept the defaults (it splits on a comma). I then have two columns, latlong and latlong(1). I rename those to "lat" and "long" and delete the "geo" and "latlong" columns that still exist. The only remaining columns I have at that point are 'Name', 'Twitter Handles', 'Affiliation', 'Lat', and 'Long'. I export that as a .csv and put it into data/women-leaders-openness.csv.

Making the Website

General Tools for Website

I built the website using Bootstrap, the open source toolkit for developing with HTML, CSS, and JS. I modified the Flat theme from Bootswatch for the website's look. All customizations are available in css/custom.css however the main change is the color -- from the default dark blue to the current light purple. I didn't change any of the original Bootstrap javascript files (all in the js folder).

The code to render the searchable, sortable table on the home page was adapted from 'CSV to HTML table' by Derek Eder, available here: https://github.com/derekeder/csv-to-html-table. I also modified the CSS , found in css/dataTables.bootstrap.css. I did not modify the JavaScript files from this repository, which are js/csv_to_html_table.js and js/leaflet/dataTables.bootstrap.js.

I am also using the JQuery, which leaflet and other libraries depend on. I am just using the default, found in the js folder.

Map

The map was built using leaflet open source JavaScript library used to build interactive maps on the web. You can find the leaflet javascript files in the js/leaflet/ file folder, which was downloaded as is from the website. The actual script to build the map is at the bottom map.html and also here:

In this case, I am using the same .csv file to build the searchable table on the home page and the map by including all the data there. This script loops through the CSV, looks for any information that would go in the popup (row[0] = Name, row[1] = Twitter Handle, row[2]=Affiliation) and places the marker on the map based on the lat (row[3]) and long (row[4]) on the sheet.

Building & Deploying Website

I am also using GitLab for version control, building the site (using the native Continuous Integration), and serving the website. To do this via GitLab, I need to add a .gitlab-ci.yml file to my repository (here), which looks like this:

This builds the website in two stages: test and deploy. During the "test" phase, GitLab deploys a script checkcsv.py (found here in the repo) to basically check I didn't mess up the CSV when I updated it. If that passes, then it'll go onto the "deploy" phase. This actually builds and serves the website to the public.

Contribute!

If you'd like to contribute, that would be amazing! I will try my best to be on top of merge requests and issues. If you aren't comfortable with coding or git, you can email me (vicky dot steeves at nyu dot edu) changes you'd like to see and I will open an issue for you or, if it's quick enough, make the change and give you attribution on this README.

Here are some general instructions to help -- the following was adapted from ProjectPorcupine's's CONTRIBUTING.md.

Pease follow the Contributor Covenant in all your interactions with the project. If you would like to contribute to this project by modifying/adding to the code or data, please feel free to follow the standard GitLab workflow:

  1. Fork the project (the second button to the left under the title of the repo)
  2. Clone your fork to your computer.
  • From the command line: git clone https://gitlab.com/<USERNAME>/Women-Leaders-Openness.git
  1. Change into your new project folder.
  • From the command line: cd Women-Leaders-Openness
  1. [optional] Add the upstream repository to your list of remotes.
  • From the command line: git remote add upstream https://@gitlab.com:VickySteeves/Women-Leaders-Openness.git
  1. Create a branch for your new feature.
  • From the command line: git checkout -b my-feature-branch-name
  1. Make your changes.
  • Avoid making changes to more files than necessary for your feature (i.e. refrain from combining your "real" pull request with incidental bug fixes). This will simplify the merging process and make your changes clearer.
  1. Commit your changes. From the command line:
  • git add <FILE-NAMES>
  • git commit -m "A descriptive commit message"
  1. While you were working some other changes might have gone in and break your stuff or vice versa. This can be a merge conflict but also conflicting behavior or code. Before you test, merge with master.
  • git fetch upstream
  • git merge upstream/master
  1. Test. Run the program and do something related to your feature/fix.
  2. Push the branch, uploading it to GitLab.
  • git push origin my-feature-branch-name
  1. Make a "Merge Request" from your branch here on GitLab.

Best Practices for Contributing

  • Before you start coding, open an issue so that the community can discuss your change to ensure it is in line with the goals of the project and not being worked on by someone else. This allows for discussion and fine tuning of your feature and results in a more succent and focused additions.

    • If you are fixing a small glitch or bug, you may make a MR without opening an issue.
    • If you are adding a large feature, create an issue so that we may give you feedback and agree on what makes the most sense for the project before making your change and submitting a MR (this will make sure you don't have to do major changes down the line).
  • Merge Requests are eventually merged into the codebase. Please ensure they are:

    • Well tested by the author. It is the author's job to ensure their code works as expected.
  • If your code is untested, log heavy, or incomplete, you can use GitLab's Work In Progress (WIP) feature on your merge request so others know it is still being tested and shouldn't be considered for merging yet. This way we can still give you feedback or help finalize the feature even if it's not ready for prime time.

That's it! Thanks for your contribution!

Contact info

You are welcome to email me at vicky dot steeves at nyu dot edu if you have questions or concerns, or raise an issue on this repository and I will do my best to respond quickly!

Project Statistics

Sourcerank 2
Stars 1
Forks 6
Open issues 3
Dependencies 0
Tags 0
Created
Last updated

Something wrong with this page? Make a suggestion

Last synced: 2019-09-13 22:13:01 UTC

Login to resync this repository