Changes between Version 3 and Version 4 of CPTMS


Ignore:
Timestamp:
02/22/2019 11:48:25 AM (7 years ago)
Author:
jdalbey
Comment:

add mv command

Legend:

Unmodified
Added
Removed
Modified
  • CPTMS

    v3 v4  
    1515In the selection boxes at the top specify "Type: Station Metadata" and desired district number, then click Submit. 
    1616 
    17 The report page which appears shows two columns, Field Specification and Available Files.  The former describes what is in each field of the data file. In the Available Files column select the most recently dated file. Download and save to your local computer as `d05_pm_vds_all.csv` (changing the extension from ".txt" to ".csv").  (For this exercise we'll pretend to be working with District 5 and name the files accordingly). 
     17The report page which appears shows two columns, Field Specification and Available Files.  The former describes what is in each field of the data file. In the Available Files column select the most recently dated file. Download and save to your local computer as `d05_pm_vds_all.csv` (changing the extension from ".txt" to ".csv").  (For this exercise we'll pretend to be working with District 5 and name the files accordingly). 
    1818 
    1919Open the file in Libre Office Calc (or other spreadsheet).  Delete unneeded columns, retaining: Fwy, Dir, State_PM, Latitude, Longitude, and Name.  Save as .csv.  Open in a text editor and remove the first row containing column headers.  Also remove quotation marks. 
     
    3030Open "`prep_postmiles.py`" in a text editor and modify the name of the postmileFile string to be the name of your file. 
    3131 
    32 Run it:  
     32Run it: 
    3333 
    3434{{{ 
    3535python prep_postmiles.py 
    3636}}} 
    37  
    3837Observe output, correct any bad data in the file that causes the program to crash. 
    3938 
    40 When done, run it and redirect output to a new file:   
     39When done, run it and redirect output to a new file: 
    4140 
    4241{{{ 
    4342python prep_postmiles.py > d12_postmile_prepped.csv 
    4443}}} 
     44Run the csv to json converter: 
    4545 
    46 Run the csv to json converter:  
    4746{{{ 
    4847./convertCSVtoJSON.bash d12_postmile_prepped.csv > highways.json 
    4948}}} 
    50  
    51 Edit the json file to remove an extraneous comma after the last feature. The last three lines should appear as:  
     49Edit the json file to remove an extraneous comma after the last feature. The last three lines should appear as: 
    5250 
    5351{{{ 
     
    5654} 
    5755}}} 
    58  
    59  
    6056Make a copy the STMS html file, and open it in a text editor. Specify the correct center location for the target district. 
    6157 
     
    6359    var centerPoint = {lat: 33.687228, lng: -117.872148}; 
    6460}}} 
    65  
    6661Load the STMS html file into a browser and observe the results. 
    6762 
    68 Use unix "cut" to remove the last column of the csv file and copy it to TMC config folder. 
     63Use unix "cut" to remove the last column of the csv file. 
     64 
    6965{{{ 
    7066cut -f1-6 -d"," d12_postmile_prepped.csv > postmile_coords.txt 
    7167}}} 
     68 
     69Move postmile_coords.txt to the TMC config folder. 
     70 
     71{{{ 
     72mv postmile_coords.txt trunk/config/vds_data 
     73}}} 
     74