Giter Club home page Giter Club logo

osm-edit-report-deprecated's Introduction

Data Team Report

Reports editing activity for a number of users on OpenStreetMap.

Installation

For installing and running the Data Team Report, you need to:

  1. Install data server
  2. Configure users
  3. Load data
  4. Run data server
  5. Configure and serve web UI

System requirements:

  • Node 0.10.x
  • PostGreSQL

1. Set up data server

## Install data server
npm install

# Set up database
createdb dbstatistic
psql dbstatistic -f query/tables.sql

2. Configure users

Add each user whose OpenStreetMap edits you'd like to track to the osm_user table like so:

SELECT add_user(589596,'lxbarth','FFFF00',true);
  • 589596 : user id on OpenStreetMap
  • lxbarth : name of user
  • FFFF00: color of user for to show in line graph
  • true : state of user: if you don’t want to show one user on line graph , just update the user using state as false

Or use Mapbox data team users included in the project:

psql dbstatistic -f query/add_user.sql

3. Load data

You can start loading data starting with any replication file found in http://planet.openstreetmap.org/replication/hour/

For instance, to start loading with 2015-03-22 run:

node load/load.js --num_file=117 --num_directory=22 --user=<dbuser> --password=<dbpassword> --database=dbstatistic

Or to start loading with 2016-01-26 run:

node load/load.js --num_file=551 --num_directory=29 --user=<dbuser> --password=<dbpassword> --database=dbstatistic

4. Run data server

node server/server.js --user=<dbuser> --password=<dbpassword> --database=dbstatistic

This will run the server at port 3021. Use forever to run as a daemon.

5. Configure and serve web UI

Copy settings-example.js to settings.js and enter the host information under which you started the data server.

For instance run serve from project root:

serve

osm-edit-report-deprecated's People

Contributors

bsrinivasa avatar geochetan avatar geohacker avatar lxbarth avatar pratikyadav avatar rub21 avatar shravan91 avatar tmcw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osm-edit-report-deprecated's Issues

node-waf not found

arun@arun-ghoomakad:~/Documents/Work/mapbox/report-dt/get_data$ cd ../get_data && npm install
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No README data
\
> [email protected] preinstall /home/arun/Documents/Work/mapbox/report-dt/get_data/node_modules/zlib
> node-waf clean || true; node-waf configure build

sh: 1: node-waf: not found
sh: 1: node-waf: not found

npm ERR! [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the zlib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf clean || true; node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls zlib
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.13.0-45-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/arun/Documents/Work/mapbox/report-dt/get_data
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

From stackoverflow, node has inbuilt support for zlib.

Everything still seems to work, but we can probably remove zlib from package.json.

errors loading older data

When using the num_file and num_directory parameters from the readme it gave errors.
For --num_file=1 --num_directory=0
No file found url:https://s3.amazonaws.com/osm-changesets/hour/000/000/001.osc.gz
For --num_file=177 --num_directory=20
No file found url:https://s3.amazonaws.com/osm-changesets/hour/000/020/177.osc.gz

Was checking parameters for more recent files and at least with --num_file=1 --num_directory=25 it began running:

Start download : https://s3.amazonaws.com/osm-changesets/hour/000/025/003.osc.gz ---> /tmp/003.osc
Process file :/tmp/003.osc
Remove file :/tmp/003.osc
fin
Start download : https://s3.amazonaws.com/osm-changesets/hour/000/025/004.osc.gz ---> /tmp/004.osc
Process file :/tmp/004.osc
Remove file :/tmp/004.osc
fin

On another note, is this same load process used to keep database up-to-date after the initial load?

`values` array can have objects with more readable key names.

The JSON object returned by osm-edit-report-service.mapbox.com contains a values array for each user. This array contains objects in the form

{ 
  "x":<date-object>,
  "y":<no-of-objects-modified>,
  "change":<no-of-changesets>
}

To make this more readable, osm-edit-report-service.mapbox.com, the values array could contain objects in the form

{ 
  "date":<date-object>,
  "objects":<no-of-objects-modified>,
  "changesets":<no-of-changesets>
}

Removing har777

@Rub21 -

I have removed user har777 from the query/add_user.sql table.

screen shot 2015-04-30 at 10 47 57 am

Next Actions
  • @Rub21 to run the the production server and close this ticket

Host data on https

@Rub21 - the app is hosted now under https://www.mapbox.com hence it won't be able to pull content from a non-SSL connection. Let's move the server under a Mapbox domain, too.

Rename?

It's not clear what report-dt means. What about osm-user-report or something like that? cc @lxbarth @Rub21

Counting all data-team editions

Last week I've spent some hours doing some counter for the team, basically, this will count w/ high detail the progres of each of the data-team member. right now this si alive https://osm-edit-report-production.mapbox.com/json/m&1483833600&1484524800, running with osm-edit-report on the same server, and it is assets the number of roads which touched by the data-team.

I think this could help the number of edition and objects made by data-team, along with osm-metrics, I this case, we don't need to run any query. just add in the s3 file tags.json the tags.

What is missing here?

  • A front-end and a good way to display all the numbers.

cc. @ramyaragupathy @arunasank @planemad @maning

Use default value

Problem:

  • Right now, when visiting the report for the first time, the page does not show any data

Solution:

  • By default, show daily edits for last week

Use parameterized queries

add filter by "type" of edit

Certain kinds of edits are fast (like building tracing), and others can become more involved (complex turn restrictions). It would be useful to see team edits filtered by "fast" vs "complicated" editing tasks.

Implementing this is more complicated. Requires architectural changes to access actual changeset feature geometries, and rules/algorithms to segment edits by type.

Progress Data - Date Mismatch.

@Rub21 - We are facing a concern while we spool the data for our daily Mapping scrum report.

  • Dates mismatched - If we need to spool a report from 2nd - 6th of Feburary 2015,we need to select dates from 1st -7th Febuary 2015 and the dates do not match with the edits done for the previous day/week.

Please check the below screenshot - Edits done on the 2nd of Febuary 2015 are showing for the 3rd of Feburary.

screen shot 2015-02-09 at 9 53 37 am

cc: @lxbarth @shvrm @shravan91 @srividyacb @geohacker

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

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 mapbox/osm-edit-report#31, each user object can include the following keys:

  • total-objects which contains the total number of objects modified by that user in the requested time range.
  • total-changesets which contains the total number of changesets created by that user in the requested time range.

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:

  • total-objects which contains the total number of objects modified by all users in the requested time range.
  • total-changesets which contains the total number of changesets created by all users in the requested time range.
  • active-users which is an array of names of all active users (or a key active in each user object set to either true or false.)

Adding the above three consolidated keys will also be useful to resolve mapbox/osm-edit-report#35.

cc @Rub21, @geohacker, @batpad.

OSM Bright 2 - Characters Not Loading (in/for Shanghai)

Trying to use OSM Bright 2 tile layer in and of a section of Shanghai and when I am at 15 + zoom layer, the characters for street names and locations are breaking.

STR

  1. Go to this url: http://bit.ly/1R6GkTV (uploaded MapBox layer to CartoDB)
  2. Zoom in to a 15 level

Expected Behavior: To see english characters as labels on streets and buildings
Actual Behavior: English characters as labels for some locations, [][][] for other locations

Error found in MapBox Studio

screen shot 2015-10-12 at 4 56 21 pm

screen shot 2015-10-12 at 4 56 30 pm

I suspect it has something to do with the unicode, any suggestions on how to fix this issue and reproduce the proper tiles?

[please let me know if I should report this issue in a different issues repo]

Change README a little bit

OSM edit report needs node version >= 0.6.13 < 0.11.0 for the npm install to work. This needs to be mentioned in the README. More information - such as installing ’n’ as opposed to ‘nvm’, to use the required node version.

Specific instructions for OSX - you need essentials, wget and n before being able to install osm-edit-report.

"$postgres createdb dbstatic" -> Was simply "$createdb dbstatic". Also a note to install postgres from http://postgresapp.com/ instead of the graphical installer, for OSX or the many other versions would be useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.