<commit_before># Django Cal-Access parser

**django-calacces-parser** is a simple Django app to download, extract and load the [CAL-ACCESS](http://www.sos.ca.gov/prd/cal-access/) campaign finance and lobbying activity database into MySQL.

Detailed documentation is in the "docs" directory. *(coming soon)*

## Requirements
- Django 1.6
- MySQL 5.5
- Patience

## Installation
- Install django-calaccess-parser with pip
```bash
$ pip install https://github.com/california-civic-data-coalition/django-calaccess-parser/archive/0.1-alpha.tar.gz
```

- Add `calaccess` to your INSTALLED_APPS setting like this:
```python<commit_msg>Update README.md with database instructions<commit_after># Django Cal-Access parser

**django-calacces-parser** is a simple Django app to download, extract and load the [CAL-ACCESS](http://www.sos.ca.gov/prd/cal-access/) campaign finance and lobbying activity database into MySQL.

Detailed documentation is in the "docs" directory. *(coming soon)*

## Requirements
- Django 1.6
- MySQL 5.5
- Patience

## Installation
- Install django-calaccess-parser with pip
```bash
$ pip install https://github.com/california-civic-data-coalition/django-calaccess-parser/archive/0.1-alpha.tar.gz
```

- Configure the `DATABASE` dictionary in `settings.py`
```python
DEBUG = False
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'local_calaccess_db',
        'USER': 'calaccessuser',
        'PASSWORD': 'password',
        'HOST': 'localhost',
        'PORT': '3306',
        'OPTIONS': {
            'local_infile': 1,
        }
    }
}
```

- Add `calaccess` to your INSTALLED_APPS setting like this:
```python
{'fraction_non_alphanumeric': 0.13508667065152422, 'fraction_numerical': 0.010161386730424387, 'mean_word_length': 3.7288135593220337, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6552741', 'n_tokens_mistral': 556, 'n_tokens_neox': 522, 'n_words': 145}