Skip to content

JamesLMilner/github-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

:octocat: GitHub Mapping 🌐

A map showing the estimated percentage of people in each city with a GitHub account.

Cities and Population Data

The original populations and cities were derived from the 2015 estimates of this data set:

The results were massaged into a format for use with the Python GitHub scraper (github-api.py).

Tech

The application uses:

Contribution

Please feel free to contribute your city to the project. To add your city of choice, please edit the github-cities.geojson file, with a sourced city population and the total number of GitHub users. For example, lets say we want to add Austin, Texas. We could add this to the geojson file:

{
  "type": "Feature",
  "geometry": {
      "type": "Point",
      "coordinates":  [ -97.74,30.27 ]
  },
  "properties": {
  "City":"Austin",
  "Country":"United States of America",
  "Population": 2056405,
  "Total":"12318",
  "Rate":0.731472684
  }
},

It's probably easiest to check this manually for one off cities using the Advanced Search functionality, using the location search. Unfortunately, you may have to aggregate multiple search values, i.e. "Austin, Texas", "Austin, USA" to get a true representation of the values, as GitHub location field is a string of which you can input anything. We get the population value from Wikipedia.

You can also use the github_api_one.py script in the scraping folder. You will need a GitHub API Token to make the requests. It is probably advisable to use an environment variable for the token, as GITHUB_MAP_TOKEN.

Please ensure the the GeoJSON is valid, for example using a tool like GeoJSON Lint.

Acknowledgements

Thanks to Esri for the basemaps! This is based on an open source project I did whilst at Esri UK. Many thanks for the awesome Octocats from the Octodex https://octodex.github.com/ !

About

A map showing the estimates of GitHub users in cities worldwide

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published