<commit_before>Virginia Circuit Court Search
=======================

Virginia Courts Case Information - Statewide Searches ARE Possible

http://VACircuitCourtSearch.com

Developed at the 2014 [Virginia Coalition for Open Government](http://www.opengovva.org) Annual Conference in Roanoke, VA for journalists who need to run statewide searches on the [Virginia Circuit Court site](http://wasdmz2.courts.state.va.us/CJISWeb/circuit.jsp), but don't have the time to search each district individually.

## Running Locally

* Make sure you have Python and Pip installed. On OS X, you can use brew to install Python and you get Pip as well.
```
brew install python
```

* Install the requirements
```
pip install -r requirements.txt
```

* Set MongoDB instance
```
$ export MONGO_URI=mongodb://<dbuser>:<dbpassword>@ds<EMAIL>.<EMAIL>ab.com:27761/va-circuit-court-search
```
-OR-  for Windows
```
$ set MONGO_URI=mongodb://<dbuser>:<dbpassword>@ds<EMAIL>1.mongolab.com:27761/va-circuit-court-search
```

* Run the server
```
python courts.py
```

* Browse to `http://0.0.0.0:5000/`

## Courts without normal case numbers
AmherstCircuitCourt - case number doesn't reset every year
BedfordCircuitCourt - case number doesn't reset every year
BristolCircuitCourt - case number doesn't reset every year (resets at 9,999)
CharlotteCircuitCourt - case number has F/M after year (i.e. F00001)
ChesterfieldCircuitCourt - case number has F/M after year (i.e. F00001)
ClarkeCircuitCourt - case number doesn't reset every year
CliftonForgeCircuitCourt - independent city until 2001, now part of Alleghany County
FranklinCircuitCourt - case number doesn't reset every year, but there seem to be two different counters
GoochlandCircuitCourt - case number has F/M before case number (i.e. 0000F1)
LeeCircuitCourt - case number has F/M after year and one 0 (i.e. 0F0001)
LoudounCircuitCourt - case number doesn't start with year (first filed in 2014 is CR00026174-00)
MadisonCircuitCourt - case number doesn't reset every year
PageCircuitCourt - case number has F/M after year (i.e. F00001)
RadfordCircuitCourt - case number doesn't reset every year
RichmondCityCircuitCourt - case number has F/M after year (i.e. F00001)
RussellCircuitCourt - case number doesn't reset every year
VirginiaBeachCircuitCourt - cases from 2014 on different website
WilliamsburgJamesCityCountyCircuitCourt - case number doesn't reset every year
WiseCircuitCourt - case number has F/M after year (i.e. F00001)
YorkCountyPoquosonCircuitCourt - case number doesn't reset every year, cases commenced by reinstatement have different numbering <commit_msg>Clarify how case numbers are generated<commit_after>Virginia Circuit Court Search
=======================

Virginia Courts Case Information - Statewide Searches ARE Possible

http://VACircuitCourtSearch.com

Developed at the 2014 [Virginia Coalition for Open Government](http://www.opengovva.org) Annual Conference in Roanoke, VA for journalists who need to run statewide searches on the [Virginia Circuit Court site](http://wasdmz2.courts.state.va.us/CJISWeb/circuit.jsp), but don't have the time to search each district individually.

## Running Locally

* Make sure you have Python and Pip installed. On OS X, you can use brew to install Python and you get Pip as well.
```
brew install python
```

* Install the requirements
```
pip install -r requirements.txt
```

* Set MongoDB instance
```
$ export MONGO_URI=mongodb://<dbuser>:<db<EMAIL>>@<EMAIL>:27761/va-circuit-court-search
```
-OR-  for Windows
```
$ set MONGO_URI=mongodb://<dbuser>:<db<EMAIL>>@<EMAIL>:27761/va-circuit-court-search
```

* Run the server
```
python courts.py
```

* Browse to `http://0.0.0.0:5000/`

## Courts that denote felony or misdemeanor in case number
CharlotteCircuitCourt - case number has F/M after year (i.e. F00001)
ChesterfieldCircuitCourt - case number has F/M after year (i.e. F00001)
GoochlandCircuitCourt - case number has F/M before case number (i.e. 0000F1)
LeeCircuitCourt - case number has F/M after year and one 0 (i.e. 0F0001)
PageCircuitCourt - case number has F/M after year (i.e. F00001)
RichmondCityCircuitCourt - case number has F/M after year (i.e. F00001)
WiseCircuitCourt - case number has F/M after year (i.e. F00001)

## Court with case numbers that don't reset each year
AmherstCircuitCourt - (2014: 14890 - 15204)
BedfordCircuitCourt - (2014: 11169 - 11554)
BristolCircuitCourt - (2014: 1018 - 1483)
ClarkeCircuitCourt - (2014: 7390 - 7675)
FranklinCircuitCourt - (2014: 19481 - 19850, 56075 - 56757)
LoudounCircuitCourt - (2014: 26174 - 27371) (CR00)
MadisonCircuitCourt - 
RadfordCircuitCourt - 
RussellCircuitCourt - 
WilliamsburgJamesCityCountyCircuitCourt - 
YorkCountyPoquosonCircuitCourt -

## Courts without normal case numbers
AmherstCircuitCourt - cases commenced by reinstatement use original case number with letter (A, B, ...) after CRYY
BristolCircuitCourt - probation violations have same case number with a V after CRYY
CliftonForgeCircuitCourt - independent city until 2001, now part of Alleghany County
VirginiaBeachCircuitCourt - cases from 2014 on different website
YorkCountyPoquosonCircuitCourt - cases commenced by reinstatement have different numbering 
{'fraction_non_alphanumeric': 0.09346153846153846, 'fraction_numerical': 0.047115384615384615, 'mean_word_length': 4.850393700787402, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, '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': '6283792', 'n_tokens_mistral': 1962, 'n_tokens_neox': 1545, 'n_words': 579}