Version 0.2.1 August 18 2014
The Script-to-Extract-Objects-and-Calculate-Statistics-from-OsmContributorStats-Module.py Python script is an example of instructions to extract objects and calculate statistics using the OsmContributorStats Class Module.
CSV Output files show the statistics [Prefix] of files contains the prefix provided by the user + the date range ex. oef-togo-2013-06-26--2013-06-27 )
Users statistics : [prefix].csv ( ex. oef-togo-2013-06-26--2013-06-27.csv )
Teams statistics : [prefix]-team.csv ( ex. oef-togo-2013-06-26--2013-06-27-team.csv )
Changesets statistics : [prefix]-changeset.csv ( ex. oef-togo-2013-06-26--2013-06-27-changeset.csv )
File format 1 and two are obsolete and might be deleted in other versions of the script. File format 3 (by CSV) can be analysed in a spreadsheet and produce statistics with the various variables such as day, user, team. Statistics by date show the progression of an activity. Statistics by user let's see how many contributors up to date. In general, we filter and eliminate changesets with flag=1 since these changesets often correspond to mechanical edits covering continents.
You need to import and instantiate both OsmApi and OsmContributorStats. You should also indicate the directory where the Modules are stored and where the files produced will be stored.
OsmContributorStats class module from Pierre Béland, is en enhancement of a first script written by Sebastien Pierrel. From our experience in 2013 in Haiti (60 trainees in six teams) and with various French african projects we supported, various flexibilities were added to the script.
Statistics for each contributor and teams are compiled and saved in csv files.
Statistic type | variable names |
---|---|
number of changesets | changeset |
objects created | object_c, node_c, way_c, relation_c |
objects modified | object_m, node_m, way_m, relation_m |
objects deleted | object_d, node_d, way_d, relation_d |
POI nodes | poi_total_nodes, node_amenity, node_shop, node_office, node_power, node_place, node_man_made, node_history, node_tourism, node_leisure |
ways | way_highway, way_waterway, way_building, way_landuse, way_man_made |