mapbox / osm-edit-report-deprecated

Report editing activity on OpenStreetMap
https://www.mapbox.com/osm-edit-report/
ISC License
5 stars 7 forks source link

JSON object returned by `osm-edit-report-service.mapbox.com` can have more information #44

Open arunasank opened 8 years ago

arunasank commented 8 years ago

Currently the object is in the form

[
     {
          "key": <editor's name>,
          "color": <data-color>,
          "iduser": <editor's OSM id>,
          "values": [
                         {
                              "x": <first-date-object-in-date-range>,
                              "y": <objects-modified>,
                              "change": <changesets-created>
                         },
                         {
                              "x": <second-date-object-in-date-range>,
                              "y": <objects-modified>,
                              "change": <changesets-created>
                         },
                         ....
                         ....
                         {
                              "x": <last-date-object-in-date-range>,
                              "y": <objects-modified>,
                              "change": <changesets-created>
                         }
                     ]
     }
   ...
   <more such objects>
   ..........
]

Besides renaming keys as suggested in https://github.com/mapbox/osm-edit-report/issues/31, each user object can include the following keys:

The color key in each user object can be removed since this is done in the front end.

The array of user objects can be nested in a parent object containing the following keys:

Adding the above three consolidated keys will also be useful to resolve https://github.com/mapbox/osm-edit-report/issues/35.

cc @Rub21, @geohacker, @batpad.