Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Accuracy and Existence of Lot Data #36

Open
JohnnyD1 opened this issue Sep 21, 2019 · 0 comments
Open

Testing Accuracy and Existence of Lot Data #36

JohnnyD1 opened this issue Sep 21, 2019 · 0 comments
Assignees
Milestone

Comments

@JohnnyD1
Copy link
Collaborator

JohnnyD1 commented Sep 21, 2019

Tests should:

  1. check that all UB North parking lot names and buildings should exist
  2. check that perimeter coordinates of each parking lot and building are within half a mile from the center of that parking lot or building

Task Tests:
Initially, there is data in tests/test_data/parking_lots.txt and tests/test_data/buildings.txt. parking_lots.txt contains all parking lots in UB North, manually taken from http://www.buffalo.edu/parking/parking-places.html. Similarly, buildings.txt has all UB North buildings taken from http://www.buffalo.edu/administrative-services/managing-facilities/planning-designing-and-construction/building-profiles.html.
You can run 4 different tests:

  1. testing all UB North parking lots exist
  2. testing all UB North Buildings exist
  3. testing that each UB North parking lot is within .5 miles of the center of its lot
  4. testing that each UB North building is within .5 miles of the center of its building.

Test 1: Checking Names of Parking Lot

  1. access tests/ directory
  2. run: python osm_tests -lot_names
  3. should see Found and Missing columns printed to the monitor with a list of lot names under either one depending if the lot names in the lot_data.json or lot_building_data.json file are also in parking_lots.txt. At the end of the test, a list of lot names are printed if there are lot names in parking_lots.txt but not in lot_data.json or lot_building_data.json.

Test 2: Checking Names of Buildings

  1. access tests/ directory
  2. run: python osm_tests -building_names
  3. should see Found and Missing columns printed to the monitor with a list of building names under either one depending if the building names in the building_data.json or lot_building_data.json file are also in buildings.txt. At the end of the test, a list of building names are printed if there are building names in buildings.txt but not in building_data.json or lot_building_data.json.

Test 3: Checking Coordinate accuracy

    1. access tests/ directory
  1. run: python osm_tests -lot_coords
  2. Should see Accurate, Inaccurate, and Missing columns printed to the monitor with a list of lot names under either column depending if the coordinates of each parking lot in lot_data.json or lot_building_data.json are within a half a mile from the center of the parking lot.
    If you have the google maps key, this will increase accuracy. Create a file called google_api_key.txt and store your api key in the first line. It will query using the google maps api only when the python library Nominatim cannot find the parking lot.

Test 4: Checking Coordinate accuracy

    1. access tests/ directory
  1. run: python osm_tests -bulding_coords
  2. Should see Accurate, Inaccurate, and Missing columns printed to the monitor with a list of building names under either column depending if the coordinates of each building in building_data.json or lot_building_data.json are within a half a mile from the center of the building.
    If you have the google maps key, this will increase accuracy.
    3.a) In tests/, create a file called google_api_key.txt and store your api key in the first line. It will query using the google maps api only when the python library Nominatim cannot find the building.

You can also run multiple tests in a single run, or run all of the tests using the -all argument.
Example 1: python osm_tests.py -lot_names -building_coords
Example 1: python osm_tests.py -all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant