Skip to main content
GitHub Actions Unit Tests codecov Codacy Badge pylint Score Python Versions Supported CodeQL security: bandit Code style: black

GitGeo

Discover the geography of open-source software. Explore the geographic locations of software developers associated with a GitHub repository or a Python (PyPI) package.

See, for instance, the geography of the contributors to the Python package requests.

map_image

Why use GitGeo?

  • Curiosity

  • Open source software community management

  • Research on open source software ecosystems

  • IT security compliance

Installation

pip install gitgeo

Or:

git clone https://github.com/IQTLabs/GitGeo

Usage

(requires internet connection)

  • First, create one or more GitHub personal access tokens.

  • Second, run these commands in the command line to set environmental variables:

    export GITHUB_USERNAME='[github_username]'
    export GITHUB_TOKEN='[github_token]'
  • Alternatively, to use multiple tokens, create a file called tokens.txt in the code’s directory and enter a GitHub personal access token on each line.

  • Third, run these commands in the command line:

gitgeo --package [package_name]

gitgeo --repo [github_repo_url]

For example:

>>> gitgeo --package requests

-----------------
PACKAGE: requests
-----------------
CONTRIBUTOR, LOCATION
* indicates PyPI maintainer
---------------------
kennethreitz42 | Virginia, USA
Lukasa * | London, England
sigmavirus24 | Madison, WI
nateprewitt * | None
slingamn | None
BraulioVM | Malaga & Granada, Spain
dpursehouse | Kawasaki
jgorset | Oslo, Norway
...

Or:

>>> gitgeo --repo www.github.com/psf/requests

-----------------
GITHUB REPO: psf/requests
-----------------
CONTRIBUTOR, LOCATION
---------------------
kennethreitz42 | Virginia, USA | United States
Lukasa | London, England | United Kingdom
sigmavirus24 | Madison, WI | United States
nateprewitt | None | None
...

There are other command line options too:

Add --summary to get the results summarized by country. e.g.

>>> gitgeo --package requests --summary

-----------------
PACKAGE: requests
GITHUB REPO: psf/requests
-----------------
COUNTRY | # OF CONTRIBUTORS
---------------------------
United States 37
None 23
United Kingdom 4
Canada 4
Germany 4
Switzerland 4
Spain 2
Russia 2
...

Add --map when using the --repo option to create an html map saved in the results folder. See image above for static example. Real map includes zooming and tooltip capability.

Add --ouput_csv to output csv of results to results folder.

To create a csv of contributors from many repositories, enter repositories on separate lines in the repos.txt file. Then use the --multirepo flag.

Add multirepo_map and then a filename to create a map of csv ouput. csv output must be located in the results folder.

Add --num and specify a multiple of 100 from 100 (default) to 500 to specify the number of contributors analyzed per repo.

Run tests:

pytest

Want to contribute?

  • Open a PR. We are glad to accept pull requests. We use black and pylint and pydocstyle, though we are glad to help if you haven’t used those tools before.

  • Open an issue. Tell us your problem or a functionality you want.

  • Want to help build a community related to GitGeo and similar open source software ecosystem exploration tools? Please send an email to jmeyers@iqt.org.

Metadata

Release files for gitgeo 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitgeo 1.0.2
File Size Uploaded
gitgeo-1.0.2.tar.gz 490.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gitgeo 1.0.2
File Interpreter ABI Platform
gitgeo-1.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 997.0 kB

Release files / gitgeo-1.0.2.tar.gz

Download URL gitgeo-1.0.2.tar.gz
Size 490.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c8790d89a00a6fa4227cc85bf1835dd50a154199a8c21190a39edc7438376bcb
BLAKE2b-256 checksum
How to use checksums
3ed3c193f4e3c8076c04b83392167721dd21442212f742aeda3f2a9b2f92722f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / gitgeo-1.0.2-py2.py3-none-any.whl

Download URL gitgeo-1.0.2-py2.py3-none-any.whl
Size 506.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6115e4853f8127528b0130f2ac9962d001314e257de77684540188efc00881c5
BLAKE2b-256 checksum
How to use checksums
a3634b692464dcd015e6d2e77f489444ccc4cec25cf0add6520100525719124f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page