codeforamerica / OpenTrails

OpenTrails (Open Trail System Specification) Converter & Validator
http://open-trails.herokuapp.com/
39 stars 9 forks source link

"bike" identification/creation #29

Closed alanjosephwilliams closed 10 years ago

alanjosephwilliams commented 10 years ago

Goal

Identify whether or not there is an existing column that specifies biking as an appropriate use. In OpenTrails parlance, we refer to that field as "bike" (derived from OSM).

The appropriate value is a boolean "yes" or "no"

"biking" should be read as synonymous with road biking, but discrete from mountain biking.

Sample Data Use Case A: Discrete "Bike/RoadBike" Field Exists

In the majority of sample data we have on hand, a column specifying whether or not hiking is appropriate does exist. Most use the NRPA standard "Road Bike". However, there is heterogeneity in how the boolean values are expressed (y, yes, no, n, Yes, No).

Key strings for that column name include: "bike", "RoadBike", "ROADBIKE", "Bikes", "Road Bike"

  1. Identify whether or not a column with key strings exists.
  2. Assign "yes" or "no" value to "bike" attribute based on range of aforementioned boolean values found in sample data.

    Sample Data Use Case B: A "Combined" Use Field Exists

A significant portion of data contains all use attributes in a single field.

Key strings for that column name include: "use", "use_type", "PUBUSE"

  1. Identify the absence of a column specifically describing hiking/foot.
  2. Identify a column that matches the the above strings, suggesting a field of concatenated uses.
  3. Split the string found in the values of the general use column. In the sample data, we've found values concatenated with the string "and" as well as "/" and simple spaces (e.g. Hike Bike Equestrian).
  4. Assign a boolean value based on whether the string "bike" or "roadbike" is present.

    Sample Data Use Case C: No Use Data Exists

Among the sample data, two agency shapefiles contain no data about appropriate use of trails. In OpenTrails, "use" attributes are not required to exist or have a value.

  1. Identify that neither a specific "bike/RoadBike" column nor a "general use" column exists.
  2. Make it clear to the user that we will create an attribute in their OpenTrails output, as it is recommended.
  3. Leave that value null.
migurski commented 10 years ago

Implemented in find_segment_bicycle_use().