Skip to content
Get information and analytics about GitHub organizations
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Github has a good API for some things, but there are many queries that the Github API does not natively support in one easy call. Organization-level queries are a particular pain point. Getorg is a project (very much in beta) to make it easy to get many different kinds of information and analytics about Github repositories and organizations.

Getorg uses the pygithub library for querying the Github API. It is built for python 3 (python 2.6 does not work, python 2.7 currently works, but is not guaranteed to be supported in the future).


Basic functionality

pip install getorg

Mapping functionality in Jupyter notebooks (assuming Jupyter is installed)

pip install getorg ipyleaflet
jupyter nbextension enable --py ipyleaflet


Required (installed by pip)

  • githubPy library for querying the Github API.
  • geopy (specifically Nominatim) for geolocating locations.
  • retrying for dealing with timeouts and API rate limits

Recommended (not installed by pip)

  • Jupyter notebook, ipywidgets, and ipyleaflets for plotting maps.


(See also the Jupyter notebooks in the examples folder)


from github import Github
import getorg

# A file named, containing my login key in the variable gh_key
# Get an API key (for just querying, give it no write permissions) at
import ghlogin

# You can leave login_or_token blank, but then you only get 60 queries an hour
gh = Github(login_or_token=ghlogin.gh_key)

If you're in a Jupyter notebook with IPyleaflet support

In [4]: org_leaflet_map, org_location_dict, org_metadata_dict = getorg.orgmap.map_orgs(gh, "getorg")

In [5]: org_leaflet_map
Out[5]: [a map should be displayed]

In [6]: org_location_dict
Out[6]: {'': Location(Berkeley, Alameda County, California, United States of America, (37.8708393, -122.2728638, 0.0))}

In [7]: org_metadata_dict
{'duplicate_count': 0,
 'error_count': 0,
 'no_loc_count': 0,
 'user_loc_count': 1}
In [8]: getorg.orgmap.output_html_cluster_map(org_location_dict,"cluster_map")
Out[8]: "Written map to cluster_map/map.html"

Or if you are not in a Jupyter notebook

In [4]: map, org_location_dict, org_metadata_dict = getorg.orgmap.map_orgs(gh,"getorg")

In [5]: org_location_dict
{'': Location(Berkeley, Alameda County, California, United States of America, (37.8708393, -122.2728638, 0.0))}

In [6]: getorg.orgmap.output_html_cluster_map(org_location_dict,"cluster_map")
Out[6]: "Written map to cluster_map/map.html"


Getorg is a package based on work originally done in some Jupyter notebooks with JamiesHQ, Carreau and namisaghaei.

You can’t perform that action at this time.