librariesio / libraries.io

:books: The Open Source Discovery Service
https://libraries.io
GNU Affero General Public License v3.0
1.11k stars 202 forks source link

The impact of civic technology #1019

Closed BenJam closed 7 years ago

BenJam commented 7 years ago

I would like to present an idea for TICTec 2017 which looks at the impact of civic technology at a level below that of what is already established as 'impactful' civic tech. My goal here is to expose which projects — specifically those that lack financial support — should be the subject of more attention in 2017 and beyond.

For each of the projects below I would like to understand the libraries that are used by all/most of these applications:

FOI-related sites

Alaveteli https://github.com/mysociety/alaveteli MuckRock https://github.com/MuckRock/muckrock FragDenStaat https://github.com/okfde/fragdenstaat_de

Mapping

FMS https://github.com/mysociety/fixmystreet SeeClickFix https://github.com/SeeClickFix/dev.seeclickfix.com Melbourne Urban Forest https://carto.com/gallery/melbourne-urban-forest/ (https://github.com/CartoDB/cartodb) Ushahidi https://github.com/ushahidi/Ushahidi_Web LargeLots https://github.com/datamade/large-lots-staging

Parliamentary sites

TWFY https://github.com/mysociety/theyworkforyou GovTrack https://github.com/govtrack/govtrack.us-web PRS Legislative http://www.prsindia.org/ no idea about the code Democracy Club https://github.com/DemocracyClub/WhoCanIVoteFor

Others

Loomio https://github.com/loomio/loomio RecordTrac https://github.com/codeforamerica/recordtrac

andrew commented 7 years ago

@BenJam do you have a date that this needs to be done by?

BenJam commented 7 years ago

I am going to start writing the application to speak today, it is due in the 30th of Jan, I will pull the idea if nothing interesting pops out :)

andrew commented 7 years ago

Here's the list of repos as they are indexed by libraries.io:

Will make sure they are all synced up and have their dependencies properly parsed

andrew commented 7 years ago

Interestingly, these projects don't appear to have a license 😱

andrew commented 7 years ago

Three of those projects don't use any kind of files to list their dependencies, instead list them in the readmes

Libraires.io couldn't find any dependencies for https://libraries.io/github/DemocracyClub/WhoCanIVoteFord but it definitely has some in requirements/production.txt so there's a bug to investigate

andrew commented 7 years ago

Fixed dependencies on https://libraries.io/github/DemocracyClub/WhoCanIVoteFord so here's the ones we can analyse automatically:

Projects with ruby dependencies:

Projects with python dependencies:

Noticed that fixmystreet cpanfile and cpanfile.snapshot aren't being parsed (because I didn't know they were a thing!)

andrew commented 7 years ago

@BenJam I can't see there being a lot of crossover between the python and ruby projects, but we can definitely look for the most popular in the 5 rubygems ones and the 4 python ones.

I'm sure we can also manually find the javascript libraries that are used across most of those without any kind of package manager

andrew commented 7 years ago

Initial findings:

Ruby: https://gist.github.com/andrew/1aeda55731b6f4db899c3a6d0042047e

Rubygems/rake (4)
Rubygems/rack (4)
Rubygems/nokogiri (4)
Rubygems/builder (4)
Rubygems/multi_json (4)
Rubygems/sass (4)
Rubygems/ffi (4)

Python: https://gist.github.com/andrew/541e445b2377aecda0317330bc0d04b3

Pypi/psycopg2 (4)
Pypi/gunicorn (4)
Pypi/requests (4)
andrew commented 7 years ago

Working on https://github.com/librariesio/libraries.io/issues/909 so we can easily calculate the full dependency tree for a repository

BenJam commented 7 years ago

So it looks like the sample size is a little small. So how about we look at it from a organisational level? I think if we look at all FOSS code produced by known Civic Tech groups we might find something more interesting. Cross checking with the Knight Foundation's list https://twitter.com/CivicNinjas/lists/knight-civictech/members this means:

mySociety https://github.com/mysociety DemoClub https://github.com/DemocracyClub OpenNorth https://github.com/opennorth Gov.uk https://github.com/alphagov https://github.com/gds-operations/ 18F https://github.com/18F FCI https://github.com/ciudadanointeligente Code for America https://github.com/codeforamerica Open Knowledge https://github.com/okfn MuckRock https://github.com/MuckRock Ushahidi https://github.com/ushahidi DataMade https://github.com/datamade Loomio https://github.com/loomio Wikimedia https://github.com/wikimedia The World Bank https://github.com/WorldBank-Transport https://github.com/open-contracting

Are there any that we’re missing or should look into @rebeccarumbul ?

andrew commented 7 years ago

Sounds good, just need to dig out the github orgs for each of those groups

BenJam commented 7 years ago

I can do that!

BenJam commented 7 years ago

Updated with links to GH repos.

andrew commented 7 years ago

Just running the rake task now, there's 4000+ repos across all those orgs, might take a little while, will dump the result to a gist

BenJam commented 7 years ago

Tak!

andrew commented 7 years ago

~5600 unique dependencies across all those repos, most popular 25:

Rubygems/rake (276)
NPM/grunt (236)
Rubygems/json (195)
Rubygems/sass (189)
NPM/grunt-cli (184)
Rubygems/nokogiri (176)
NPM/grunt-jsonlint (175)
Rubygems/multi_json (171)
Rubygems/rails (171)
NPM/grunt-banana-checker (170)
Rubygems/i18n (162)
Rubygems/minitest (161)
Rubygems/rack (161)
Rubygems/safe_yaml (156)
Rubygems/activesupport (151)
Rubygems/mime-types (149)
Rubygems/thor (148)
Rubygems/tzinfo (142)
Rubygems/uglifier (141)
Rubygems/addressable (141)
Rubygems/execjs (140)
Rubygems/diff-lcs (135)
Rubygems/ffi (135)
Rubygems/builder (132)
Rubygems/rspec (132)

https://gist.github.com/andrew/b055fe66ca7c0c6e3eab17a0cb5f1198

n.b. that doesn't resolve transitive dependencies itself but they'll be in the lockfiles for ruby and php projects, that means there's probably some transitive node projects that are lurking behind the surface, can dig them out but it'll take a day or so of work.

BenJam commented 7 years ago

very interesting, thanks.

BenJam commented 7 years ago

Should know by 23rd Feb whether accepted.

BenJam commented 7 years ago

Talk accepted hoping that we can put together a paper alongside a talk.

andrew commented 7 years ago

cc @camillem

BenJam commented 7 years ago

Definitions

Which projects do we currently consider 'digital infrastructure'?

If we define 'digital infrastructure' as the top 1,000 most depended upon projects amongst the 22m repositories that Libraries.io tracks. 38,262 people have contributed 1,061,393 commits to these projects.

How many of these projects underpin civic tech?

910 of the digital infrastructure projects are part of a civic tech project.

Were any of these projects created within the civic tech community?

No

How much value is extracted from these projects by the civic tech community?

In total 81,187 people have contributed 2,682,407 commits to civic tech dependencies.

How much value is injected back to these projects from within the civic tech community?

2,977 members of the civic tech community have contributed 410,625 commits to dependencies 15% of total. 1177 members have contributed 151,415 commits to a 'digital infrastructure' project, 5.6% of total, 129 commits per person.

Are there particular projects that lack attention that this community could support? (i.e. where are the risks)

Of the 910 digital infrastructure projects:

207 are considered "unseen infrastructure" with less than 100 stars, 144 have a low bus factor, with only 5 or less people ever having committed to the project and 165 currently have more than 100 open issues. Interestingly the intersection of these things is zero, most projects with a high number of issues have them because they are well known. However most low bus factor things are also unseen (127 projects).

How best can the civic tech community support these projects?

How best can these projects support themselves?

andrew commented 7 years ago

CII projects without repos to be updated: https://github.com/librariesio/libraries.io/issues/1370

BenJam commented 7 years ago

closing this ticket for now, I'll link through to a follow up blog post.