<commit_before>### OSM-Gamification Workers

Contains the data processing workers used to calculate metrics tracked by the [OSM-Gamification site](https://github.com/developmentseed/osm-gamification) from OSM changeset JSON. Calculations are stored in a database to be accessed via an API connected to the front end site.

Each metric which requires calculation rather than a simple lookup should be saved as a function in src/metrics, with common components in src/common. Each function should be given a test in the test directory.

The database ORM is Bookshelf.js. To initialize the database schema, first install knex with cli
```
npm install knex -g -s
```

then run
```
knex migrate:latest
```

from the src/db/migrations directory.

Additional timestamped migration templates can be generated using
```
knex migrate:make migration_name
```

The database includes seed data which is necessary for proper operation of the workers. To seed the database, run
```
knex migrate:latest
```

from the src/db/migrations directory.


For testing purposes, the database can be completely removed, rebuilt and reseeded by running
```
npm run dbinit
```

from the project's root directory.<commit_msg>corrected readme for seeding database<commit_after>### OSM-Gamification Workers

Contains the data processing workers used to calculate metrics tracked by the [OSM-Gamification site](https://github.com/developmentseed/osm-gamification) from OSM changeset JSON. Calculations are stored in a database to be accessed via an API connected to the front end site.

Each metric which requires calculation rather than a simple lookup should be saved as a function in src/metrics, with common components in src/common. Each function should be given a test in the test directory.

The database ORM is Bookshelf.js. To initialize the database schema, first install knex with cli
```
npm install knex -g -s
```

then run
```
knex migrate:latest
```

from the src/db/migrations directory.

Additional timestamped migration templates can be generated using
```
knex migrate:make migration_name
```

The database includes seed data which is necessary for proper operation of the workers. To seed the database, run
```
knex seed:run
```

from the src/db/migrations directory.


For testing purposes, the database can be completely removed, rebuilt and reseeded by running
```
npm run dbinit
```

from the project's root directory.
{'fraction_non_alphanumeric': 0.06307053941908713, 'fraction_numerical': 0.0, 'mean_word_length': 4.809638554216868, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '158304', 'n_tokens_mistral': 647, 'n_tokens_neox': 601, 'n_words': 321}