<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Spatial Knowledge and Information Canada</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Exploring GitHub Data for Geospatial Government Research: Understanding the Limitations of Inadequate Quality Control</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>JAYDEEP MISTRY</string-name>
          <email>jaydeep.mistry@uwaterloo.ca</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Geography University of Waterloo</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <volume>7</volume>
      <issue>4</issue>
      <abstract>
        <p>GitHub is an online platform that allows for open collaboration between government members and public contributors. Over the past few years, there was an increase in the number of governments who were adopting the use of GitHub to host their own software projects publically because of the nature of GitHub being friendly to open source projects. This brings a need to research how governments are using the platform, for what projects, and how their use differs spatially. To perform geospatial government research of their use of GitHub, there is need for the data to be complete and not missing information. It is found that the data that is automatically generated from the GitHub platform tends to be complete and accurate, while the voluntarily provided data by the governments is often missing some information that is geospatial or contextual.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Over the past decade, there have been
significant advancements in the realm of
Open Data
        <xref ref-type="bibr" rid="ref2">(Janssen et al., 2012)</xref>
        , spatial
analysis
        <xref ref-type="bibr" rid="ref1">(Anselin, 2012)</xref>
        , and collaboration
        <xref ref-type="bibr" rid="ref6">(Palomino et al., 2017)</xref>
        for solving issues in
various fields such as policy planning
        <xref ref-type="bibr" rid="ref8">(Taeihagh, 2017)</xref>
        , ecology
        <xref ref-type="bibr" rid="ref7">(Steiniger &amp;
Geoffrey, 2009)</xref>
        , web mapping
        <xref ref-type="bibr" rid="ref5">(Neset et al.,
2016)</xref>
        , CyberGIS
        <xref ref-type="bibr" rid="ref9">(Wang, et al., 2013)</xref>
        , and
more. Research has been conducted on the
use case of existing tools, or the
examination of emerging tools in the
industry that can support multi-scale,
multitemporal, and multi-dimensional geospatial
data management or analysis
        <xref ref-type="bibr" rid="ref6">(Palomino et
al., 2017)</xref>
        . Although working together on a
software project is not immediately taken
into consideration for being a geospatial and
temporal problem, any team developing a
software solution needs to face these issues
if they want to work together on a project
without being bound by any team member’s
location or time of day. Open collaboration
has brought new platforms that can allow
collaboration from members inside and
outside an organization to develop software
that can be shared from the web
        <xref ref-type="bibr" rid="ref4">(Mergel,
2015)</xref>
        . However, due to barriers in
individual expertise of software use, or
organization-level adoption of the platform
from IT constraints, only select platforms
are adopted by governments
        <xref ref-type="bibr" rid="ref3">(Longo &amp; Kelly,
2016)</xref>
        .
      </p>
      <p>
        A platform that was adopted by
governments in the recent years is called
GitHub. It is a web-based and version
control software project repository hosting
service that allows users within and outside
an organization to work together on
projects, review changes, comment on
issues, and more. Although it is possible to
make GitHub accounts and projects be
private and only visible to approved users, it
has been mostly used to host open-source
projects where all of the data is copyrighted
under a public license, but anyone can
contribute their changes to the project or
use the code themselves. Due to it being
very friendly to open-source projects, it has
become a very useful and powerful tool for
governments to use because it allows them
to work together on projects while having it
be accessible to the public, and still control
who gets to make changes
        <xref ref-type="bibr" rid="ref3">(Longo &amp; Kelly,
2016)</xref>
        .
      </p>
      <p>With the rise in the adoption of GitHub by
governments for government related uses,
there is a need to research how those
governments are using it, for what projects,
and if their use of the platform is differs
between governments of different regions;
i.e. its use in North America versus Europe.
Although there have been previous studies
that have tried to analyze GitHub use by
governments, there have only been some
that have tried to analyze the quantitative
data available from GitHub. Thus, the
research goal of this paper is to use the
GitHub data to explore how many
governments are using the platform, and
also analyze its completeness of spatial and
contextual information for use in future
Geospatial Research. It will do so by
answering the following research objectives:
1. How many governments are using</p>
      <p>GitHub accounts?
2. How many government GitHub
accounts are geo-locatable?
3. What is the completeness of the
contextual government GitHub
data?</p>
    </sec>
    <sec id="sec-2">
      <title>2. Methods</title>
      <p>All of the data was gathered using Python
libraries in a Jupyter Notebook. Figure 1
illustrates the process of gathering the data.
The first step involved using GitHub’s Rest
API to make hundreds of web request for
data on specific GitHub accounts which are
listed as official government accounts on
GitHub’s own website
(government.github.com/community). As
the GitHub API would answer the request
with the data on the GitHub accounts, they
were stored as a table using a Python library
called Pandas. For each account, there was a
field which listed the geographic location of
where the account was in the world. Since
the location data on these accounts was just
in plain text, it had to be geocoded, meaning
that it has to be converted to a
latitude/longitude pair which could be
placed accurately on a world map. Using
Google Maps API to geocode each account,
the geospatial dataset was ready and stored
into a Microsoft Excel for further data
visualization.</p>
      <sec id="sec-2-1">
        <title>GitHub Rest API</title>
        <p>• Web scraping
• api.github.com</p>
      </sec>
      <sec id="sec-2-2">
        <title>Pandas Data Structures</title>
        <p>• Data frames
• Data manipulation</p>
      </sec>
      <sec id="sec-2-3">
        <title>Google Maps API</title>
        <p>• Geocoding addresses</p>
      </sec>
      <sec id="sec-2-4">
        <title>Microsoft Excel</title>
        <p>• Storing as Spreadsheets
• Data Visualization</p>
        <sec id="sec-2-4-1">
          <title>3. Results</title>
          <p>3.1 Research Objective 1
The first objective is to see how many
governments are using GitHub accounts.
After web scraping all 770 GitHub accounts
listed as official government accounts on
GitHub’s own webpage, they were plotted
based on their date of creation. Figure 2
shows the plot of those accounts from the
early days of using GitHub in 2009, and up
to the end of 2018. Since the creation of
GitHub, its adoption in governments was
increasing year over year until 2014 where
that increase plateaued. It is also important
to note that a single government
organization could own multiple GitHub
accounts.
50.00%
40.00%
However, ownership of the GitHub accounts
to their real world government organization
is often not listed and rather implied by the
name of the account. For example the
account @thecityofcalgary is owned by the
City of Calgary in Canada, but the
@webboew account is owned by the federal
Government of Canada.
Figure 3 shows that at least 60% of the
accounts have been updated since the
beginning of 2017, whereas a sum of 40% of
the accounts have not been updated since
2016. Although an account could have been
created a while ago, it is possible that it
could have genuinely not needed to be
updated in any way, thus the date of
creation and update are not the best
indicators of account activity. It is possible
to look at the performance of individual
repositories of each government account,
but that would require analyzing over
27,000 repositories which is beyond the
scope of this paper.
3.2 Research Objective 2
72%
28%</p>
          <p>Missing
Location Data
Provided
Location Data
The second objective was to determine how
many government accounts are
geolocatable. Figure 4 illustrates that 28% (217)
of the government GitHub accounts were
completely missing location data. The only
way to tell what country those accounts
belong to would be from further
webscraping the GitHub webpage which lists
these official government accounts and
recording what country the account was
listed under.</p>
          <p>s
t
n
u
o
c
c
A
f
o
#
300
250
200
150
100
50
0
IGnecoorcroedcetldy 12 3 4 1
# of Words Used to Describe Location
One of the biggest issues with the location
data, other than being empty, is that some
are geo-located to the incorrect country
because their GitHub data only listed a few
word which were generic enough to be
places in other countries. Figure 5 shows
that there were 12 accounts who were
geocoded incorrectly because there was only
one word used to describe their location. An
example is the account for the Canterbury
Regional Council which only used the word
‘Canterbury’ in the location field. Since
there are various places called Canterbury
across the world, the Google Maps API
geocoded the account to a place in the
United States instead of New Zealand,
which is where the account is actually from.
3.3 Research Objective 3
The third objective was to determine the
completeness of the contextual information
of the government GitHub data. For this
paper, the contextual information being
assessed was limited to four aspects of the
government GitHub data available about the
organization: name, description, email, and
location. Figure 6 illustrates that only about
32% of the accounts have given all 4 of the
contextual information items. Almost 40%
of the accounts are completely missing at
least one item, and over 28% are missing
more than one item.</p>
          <p>50.00%
40.00%
tsn30.00%
u
o
c
c
A
fo20.00%
%
10.00%
0.00%</p>
          <p>0
Total 0.00%</p>
          <p>1 2 3 4
4.84% 23.34% 39.43% 32.39%
# of Contextual Items Provided</p>
        </sec>
        <sec id="sec-2-4-2">
          <title>4. Conclusion</title>
          <p>In conclusion, only after having adequate
information is it possible to use the
government GitHub account data for
geospatial research that might investigate
who, when, and where these accounts are
coming from. Data such as the date of
account creation and last update are
accurate to perform analysis because they
are automatically recorded by the platform
as the changes happened. However, data
such as the contextual information that the
governments can voluntarily add to their
accounts is often missing some information,
for example the geographic location of the
organization.</p>
          <p>There is a need for better quality control of
the voluntarily provided government data
because it is often incomplete or lacking
some parts which should not be the case for
a public facing government resource that
citizens of their community may want to
view or interact with. Having complete
geospatial and contextual GitHub data on
these government accounts can not only
benefit the public, but also allow for future
geospatial government research into various
fields of GIScience, open collaboration,
open source software, and much more.</p>
        </sec>
        <sec id="sec-2-4-3">
          <title>Acknowledgements</title>
          <p>I would like to acknowledge my graduate
supervisor Dr. Peter A. Johnson for
supporting me in my own Masters studies. I
would also like to thank him for funding me
through scholarships awarded by the Social
Sciences and Humanities Research Council
of Canada (SSHRC).</p>
        </sec>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Anselin</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          (
          <year>2012</year>
          ). Anselin,
          <string-name>
            <surname>L.</surname>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>From SpaceStat to CyberGIS: Twenty years of spatial data analysis software</article-title>
          .
          <source>International Regional Science Review</source>
          ,
          <fpage>131</fpage>
          -
          <lpage>157</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Janssen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Charalabidis</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Zuiderwijk</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>Benefits, adoption barriers and myths of open data and open government</article-title>
          .
          <source>Information systems management</source>
          ,
          <fpage>258</fpage>
          -
          <lpage>268</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Longo</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Kelly</surname>
            ,
            <given-names>T. M.</given-names>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>GitHub use in public administration in Canada: Early experience with a new collaboration tool</article-title>
          . Canadian Public Administration,
          <fpage>598</fpage>
          -
          <lpage>623</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Mergel</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          (
          <year>2015</year>
          ).
          <article-title>Open collaboration in the public sector: The case of social coding on GitHub</article-title>
          .
          <source>Government Information Quarterly</source>
          ,
          <volume>32</volume>
          (
          <issue>4</issue>
          ),
          <fpage>464</fpage>
          -
          <lpage>472</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Neset</surname>
            ,
            <given-names>T. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Opach</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lion</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lilja</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Johansson</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Map-based web tools supporting climate change adaptation</article-title>
          .
          <source>The Professional Geographer</source>
          ,
          <fpage>103</fpage>
          -
          <lpage>114</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Palomino</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Muellerklein</surname>
            ,
            <given-names>O. C.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Kelly</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>A review of the emergent ecosystem of collaborative geospatial tools for addressing environmental challenges</article-title>
          .
          <source>Computers, Environment and Urban Systems</source>
          ,
          <volume>79</volume>
          -
          <fpage>92</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Steiniger</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Geoffrey</surname>
            ,
            <given-names>H. J.</given-names>
          </string-name>
          (
          <year>2009</year>
          ).
          <article-title>Free and open source geographic information tools for landscape ecology</article-title>
          .
          <source>Ecological Informatics</source>
          ,
          <fpage>183</fpage>
          -
          <lpage>195</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Taeihagh</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2017</year>
          ). Taeihagh,
          <string-name>
            <surname>A.</surname>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>Crowdsourcing: a new tool for policy-making?</article-title>
          <source>Policy Sciences</source>
          ,
          <fpage>629</fpage>
          -
          <lpage>647</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Anselin</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bhaduri</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Crosby</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goodchild</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Nyerges</surname>
            ,
            <given-names>T. L.</given-names>
          </string-name>
          (
          <year>2013</year>
          ).
          <article-title>CyberGIS software: a synthetic review and integration roadmap</article-title>
          .
          <source>International Journal of Geographical Information Science</source>
          ,
          <volume>2122</volume>
          -
          <fpage>2145</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>