Skip to content

Marchowes/hikinglists

Repository files navigation

Hiking List Generator

Because if we're going to have hiking lists, they might as well be accurate.

This repository reads in Truth Files as a batch, and produces hiking lists based on those truth files. This repository is designed to adhere to rigid files structures as a vehicle of consistency.

Core Concepts:

  • Lists are generated by way of a Python script which reads Source Of Truth files.
  • Source Of Truth files are YML formatted and reside in the source_of_truth directory.
  • Source Of Truth files can import other source of truth files. imported Source Of Truth files only import peaks from those Source Of Truth files. The head Source Of Truth file dictates list behavior
  • Source Of Truth files contain other metadata which dictate the behavior of the list.
  • The Python script can generate multiple list formats at once.
  • Lists generated will be placed in: /lists/{location}/(csv|xls)/(full|abridged)/{listname}

All Source Of Truth files must contain peaks which include at a mandatory minimum the following datapoints:

  • Name
  • Elevation
  • Latitude
  • Longitude

Source Of Truth (Meta)data

  • list_name (string) the prefix used for the generated list file name.
  • standalone: (true|false) dictates if this list is to be generated as a standalone when cascading is disabled
  • location: (string) indicates the location of this list. This is used for determining what output directory to place the final list into.
  • peaks: (list) list of peaks with required Name, Elevation, Latitude, and Longitude.
  • import: (list) list of yml files to import additional peaks from.
  • max: (int) truncate list to this number of peaks if the number of peaks exceeds that value.
  • forced_import: (list) when cascading is turned off, forcibly import peaks from this list of yml files
  • sortby: (string) forcibly sort this list by this column. The default is Elevation
  • ordered_columns: (list) control the ordering of columns. Any other columns discovered will be appended at the end of this list.
  • only_use_explicit_ordered_columns (true|false) To be used with ordered_columns this expressly forbids additional discovered columns from being added.
  • prominence_threshold (int) To be used on lists which have a col rule (or threshold). This value is that threshold in feet. This is used in Optimistic, Pessimistic, or regular lists.
  • lookaheads: (list) for numeric threshold lists, this will force an import of a lookahead file to draw in additional peaks in case the SOT can't fill the max threshold.

Command line options

optional arguments:
  -h, --help            show this help message and exit
  -s, --cascade         Generate full list
  -c, --csv             produce CSV list
  -x, --xls             produce XLS list
  -k, --kml             produce KML map
  -r, --ascendingsort   sort list by ascending
  -f SOTFILE, --file SOTFILE
                        single yaml file from source_of_truth dir to process.
                        ex: "blah.yml"
  -p PESSIMISM, --pessimism PESSIMISM
                        percentage of pessimism for lists with col rule
  -l, --pessimistic     generate threshold lists with pessimism
  -o OPTIMISM, --optimism OPTIMISM
                        percentage of optimism for lists with col rule
  -j, --optimistic      generate threshold lists with optimism

About

Peakbagging lists

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published