Skip to content

Instantly share code, notes, and snippets.

@nf-s
Created January 13, 2021 12:07
Show Gist options
  • Save nf-s/1c0db642314fc2ce76753d5bb9ad083c to your computer and use it in GitHub Desktop.
Save nf-s/1c0db642314fc2ce76753d5bb9ad083c to your computer and use it in GitHub Desktop.
{
"workbench": [],
"catalog": [
{
"type": "csv",
"name": "Average Hourly Weekday Traffic Volume",
"info": [
{
"name": "Data Description",
"content": "<p>This is a NSW map of average hourly weekday traffic volumes at different monitoring stations, recorded in average number of vehicles per hour on all weekdays of the year (i.e. excluding weekends but not holidays). Data displayed is for the primary direction of travel specified (east-west or north-south). Data presented is for the most recent available year.</p> <p>In the context of Electric Vehicle charging infrastructure planning, this is a critical variable that indicates potential volume and timing of charging needs, dictated by passing road traffic.</p> <p>Click on a monitoring station to reveal the following information:</p> <ul> <li><strong>Station name</strong></li> <li><strong>Station ID: </strong>Code used to identify specific monitoring station</li> <li><strong>LGA; Suburb:</strong> Local Government Area and suburb in which the monitoring station is located</li> <li><strong>Road type:</strong> Motorway, Arterial road, Sub-Arterial Road, Distributor Road, Primary Road</li> <li><strong>Primary direction captured:</strong> Direction of travel presented in the data</li> <li><strong>Average hourly weekday table:</strong> All 24hrs presented separately chart is provided for the daily variations underpinning the average figures.</li> <li><strong>Average hourly weekday graph:</strong> <u>Click &ldquo;Expand&rdquo; to add to a larger chart to compare monitoring stations and download </u><u>graphed data.</u></li> </ul>"
},
{
"name": "Data Updates",
"content": "<p>Continually updated from API.</p>"
},
{
"name": "Data Supplier and processing",
"content": "<p>The data is served directly from the Transport NSW API. Data processing for visualisation is managed by the Institute of Sustainable Futures at the University of Technology Sydney (UTS).</p>"
},
{
"name": "Disclaimer",
"content": "<p>Although every effort has been made to ensure the quality of the data, neither the Institute for Sustainable Futures nor the NSW Roads and Maritime Services can guarantee the accuracy of the data and does not accept responsibility for any consequences arising from its use.</p>"
}
],
"infoSectionOrder": [
"Data Description",
"Data Updates",
"Data Supplier and Processing",
"Disclaimer"
],
"url": "https://api.transport.nsw.gov.au/v1/roads/spatial?format=csv&q=%0A%20%20%20%20%20%20%20%20SELECT%0A%20%20%20%20%20%20%20%20%20%20REF.STATION_ID%2C%0A%20%20%20%20%20%20%20%20%20%20NAME%2C%0A%20%20%20%20%20%20%20%20%20%20LGA%2C%0A%20%20%20%20%20%20%20%20%20%20SUBURB%2C%0A%20%20%20%20%20%20%20%20%20%20ROAD_FUNCTIONAL_HIERARCHY%20AS%20ROAD_TYPE%2C%0A%20%20%20%20%20%20%20%20%20%20CASE%0A%20%20%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'0'%20THEN%20'BOTH'%0A%20%20%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'1'%20THEN%20'NORTH'%0A%20%20%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'3'%20THEN%20'EAST'%0A%20%20%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'5'%20THEN%20'SOUTH'%0A%20%20%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'7'%20THEN%20'WEST'%0A%20%20%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'9'%20THEN%20'NORTHBOUND-SOUTHBOUND'%0A%20%20%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'10'%20THEN%20'EASTBOUND-WESTBOUND'%0A%20%20%20%20%20%20%20%20%20%20%20%20ELSE%20''%0A%20%20%20%20%20%20%20%20%20%20END%20AS%20DIRECTION_SEQ_NAME%2C%0A%20%20%20%20%20%20%20%20%20%20WGS84_LATITUDE%20AS%20LATITUDE%2C%0A%20%20%20%20%20%20%20%20%20%20WGS84_LONGITUDE%20AS%20LONGITUDE%2C%0A%20%20%20%20%20%20%20%20%20%20ROUND(AVG(HOUR_00_SUM))%20AS%20HOUR_00%2CROUND(AVG(HOUR_01_SUM))%20AS%20HOUR_01%2CROUND(AVG(HOUR_02_SUM))%20AS%20HOUR_02%2CROUND(AVG(HOUR_03_SUM))%20AS%20HOUR_03%2CROUND(AVG(HOUR_04_SUM))%20AS%20HOUR_04%2CROUND(AVG(HOUR_05_SUM))%20AS%20HOUR_05%2CROUND(AVG(HOUR_06_SUM))%20AS%20HOUR_06%2CROUND(AVG(HOUR_07_SUM))%20AS%20HOUR_07%2CROUND(AVG(HOUR_08_SUM))%20AS%20HOUR_08%2CROUND(AVG(HOUR_09_SUM))%20AS%20HOUR_09%2CROUND(AVG(HOUR_10_SUM))%20AS%20HOUR_10%2CROUND(AVG(HOUR_11_SUM))%20AS%20HOUR_11%2CROUND(AVG(HOUR_12_SUM))%20AS%20HOUR_12%2CROUND(AVG(HOUR_13_SUM))%20AS%20HOUR_13%2CROUND(AVG(HOUR_14_SUM))%20AS%20HOUR_14%2CROUND(AVG(HOUR_15_SUM))%20AS%20HOUR_15%2CROUND(AVG(HOUR_16_SUM))%20AS%20HOUR_16%2CROUND(AVG(HOUR_17_SUM))%20AS%20HOUR_17%2CROUND(AVG(HOUR_18_SUM))%20AS%20HOUR_18%2CROUND(AVG(HOUR_19_SUM))%20AS%20HOUR_19%2CROUND(AVG(HOUR_20_SUM))%20AS%20HOUR_20%2CROUND(AVG(HOUR_21_SUM))%20AS%20HOUR_21%2CROUND(AVG(HOUR_22_SUM))%20AS%20HOUR_22%2CROUND(AVG(HOUR_23_SUM))%20AS%20HOUR_23%0A%20%20%20%20%20%20%20%20FROM%0A%20%20%20%20%20%20%20%20%20%20%20%20road_traffic_counts_station_reference%20as%20REF%0A%20%20%20%20%20%20%20%20%20%20%20%20INNER%20JOIN%20LATERAL%20(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20SELECT%20STATION_KEY%2CDATE%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20SUM(HOUR_00)%20AS%20HOUR_00_SUM%2CSUM(HOUR_01)%20AS%20HOUR_01_SUM%2CSUM(HOUR_02)%20AS%20HOUR_02_SUM%2CSUM(HOUR_03)%20AS%20HOUR_03_SUM%2CSUM(HOUR_04)%20AS%20HOUR_04_SUM%2CSUM(HOUR_05)%20AS%20HOUR_05_SUM%2CSUM(HOUR_06)%20AS%20HOUR_06_SUM%2CSUM(HOUR_07)%20AS%20HOUR_07_SUM%2CSUM(HOUR_08)%20AS%20HOUR_08_SUM%2CSUM(HOUR_09)%20AS%20HOUR_09_SUM%2CSUM(HOUR_10)%20AS%20HOUR_10_SUM%2CSUM(HOUR_11)%20AS%20HOUR_11_SUM%2CSUM(HOUR_12)%20AS%20HOUR_12_SUM%2CSUM(HOUR_13)%20AS%20HOUR_13_SUM%2CSUM(HOUR_14)%20AS%20HOUR_14_SUM%2CSUM(HOUR_15)%20AS%20HOUR_15_SUM%2CSUM(HOUR_16)%20AS%20HOUR_16_SUM%2CSUM(HOUR_17)%20AS%20HOUR_17_SUM%2CSUM(HOUR_18)%20AS%20HOUR_18_SUM%2CSUM(HOUR_19)%20AS%20HOUR_19_SUM%2CSUM(HOUR_20)%20AS%20HOUR_20_SUM%2CSUM(HOUR_21)%20AS%20HOUR_21_SUM%2CSUM(HOUR_22)%20AS%20HOUR_22_SUM%2CSUM(HOUR_23)%20AS%20HOUR_23_SUM%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20FROM%20road_traffic_counts_hourly_permanent%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20WHERE%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20YEAR%3D'2019'%20AND%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20DAY_OF_WEEK%20IN%20('1'%2C'2'%2C'3'%2C'4'%2C'5')%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20GROUP%20BY%20STATION_KEY%2CDATE%0A%20%20%20%20%20%20%20%20%20%20%20%20)%20as%20SB%20ON%20REF.STATION_KEY%3DSB.STATION_KEY%0A%20%20%20%20%20%20%20%20GROUP%20BY%0A%20%20%20%20%20%20%20%20%20%20%20%20REF.STATION_ID%2CNAME%2CLGA%2CSUBURB%2CWGS84_LATITUDE%2CWGS84_LONGITUDE%2CROAD_FUNCTIONAL_HIERARCHY%2CDIRECTION_SEQ%0A%20%20",
"columns": [
{
"name": "direction_seq_name",
"title": "Direction Sequence"
},
{
"name": "station_id",
"type": "hidden"
},
{
"name": "name",
"type": "hidden"
},
{
"name": "lga",
"type": "hidden"
},
{
"name": "suburb",
"type": "hidden"
},
{
"name": "road_type",
"title": "Road Type"
},
{
"name": "hour_00",
"title": "12 AM"
},
{
"name": "hour_01",
"title": "1 AM"
},
{
"name": "hour_02",
"title": "2 AM"
},
{
"name": "hour_03",
"title": "3 AM"
},
{
"name": "hour_04",
"title": "4 AM"
},
{
"name": "hour_05",
"title": "5 AM"
},
{
"name": "hour_06",
"title": "6 AM"
},
{
"name": "hour_07",
"title": "7 AM"
},
{
"name": "hour_08",
"title": "8 AM"
},
{
"name": "hour_09",
"title": "9 AM"
},
{
"name": "hour_10",
"title": "10 AM"
},
{
"name": "hour_11",
"title": "11 AM"
},
{
"name": "hour_12",
"title": "12 PM"
},
{
"name": "hour_13",
"title": "1 PM"
},
{
"name": "hour_14",
"title": "2 PM"
},
{
"name": "hour_15",
"title": "3 PM"
},
{
"name": "hour_16",
"title": "4 PM"
},
{
"name": "hour_17",
"title": "5 PM"
},
{
"name": "hour_18",
"title": "6 PM"
},
{
"name": "hour_19",
"title": "7 PM"
},
{
"name": "hour_20",
"title": "8 PM"
},
{
"name": "hour_21",
"title": "9 PM"
},
{
"name": "hour_22",
"title": "10 PM"
},
{
"name": "hour_23",
"title": "11 PM"
}
],
"styles": [],
"defaultStyle": {
"color": {
"colorPalette": "GnBu",
"numberOfBins": 8
}
},
"featureInfoTemplate": {
"template": "<h4 style='margin-top:10px;margin-bottom:5px;'>{{name}}</h4> Station ID: {{station_id}}<br/> LGA: {{lga}}<br/> SUBURB: {{suburb}}<br/> ROAD TYPE: {{road_type}}<br/> PRIMARY DIRECTION CAPTURED: {{direction_seq_name}}<br/> <h5 style='margin-top:5px;margin-bottom:5px;'>Average Hourly Weekday Volume - 2019</h5> <chart id='{{name}}' title='{{name}}' y-column='Avg Volume' x-column='Hour'>Hour,Avg Volume \n00,{{hour_00}} \n01,{{hour_01}} \n02,{{hour_02}} \n03,{{hour_03}} \n04,{{hour_04}} \n05,{{hour_05}} \n06,{{hour_06}} \n07,{{hour_07}} \n08,{{hour_08}} \n09,{{hour_09}} \n10,{{hour_10}} \n11,{{hour_11}} \n12,{{hour_12}} \n13,{{hour_13}} \n14,{{hour_14}} \n15,{{hour_15}} \n16,{{hour_16}} \n17,{{hour_17}} \n18,{{hour_18}} \n19,{{hour_19}} \n20,{{hour_20}} \n21,{{hour_21}} \n22,{{hour_22}} \n23,{{hour_23}} </chart> <h4 style='margin-top:10px;margin-bottom:5px;'>{{year}} Average Hourly Weekday Traffic Volume - 2019</h4> <table style='width:100%;'> <tr> <th>AM</th> <th>PM</th> </tr><tr> <td>00:00AM - {{hour_00}}</td> <td>12:00PM - {{hour_12}}</td> </tr><tr> <td>01:00AM - {{hour_01}}</td> <td>13:00PM - {{hour_13}}</td> </tr><tr> <td>02:00AM - {{hour_02}}</td> <td>14:00PM - {{hour_14}}</td> </tr><tr> <td>03:00AM - {{hour_03}}</td> <td>15:00PM - {{hour_15}}</td> </tr><tr> <td>04:00AM - {{hour_04}}</td> <td>16:00PM - {{hour_16}}</td> </tr><tr> <td>05:00AM - {{hour_05}}</td> <td>17:00PM - {{hour_17}}</td> </tr><tr> <td>06:00AM - {{hour_06}}</td> <td>18:00PM - {{hour_18}}</td> </tr><tr> <td>07:00AM - {{hour_07}}</td> <td>19:00PM - {{hour_19}}</td> </tr><tr> <td>08:00AM - {{hour_08}}</td> <td>20:00PM - {{hour_20}}</td> </tr><tr> <td>09:00AM - {{hour_09}}</td> <td>21:00PM - {{hour_21}}</td> </tr><tr> <td>10:00AM - {{hour_10}}</td> <td>22:00PM - {{hour_22}}</td> </tr><tr> <td>11:00AM - {{hour_11}}</td> <td>23:00PM - {{hour_23}}</td> </tr></table> <br/><br/>"
},
"id": "HMgEvU",
"shareKeys": [
"Root Group/Average Hourly Weekday Traffic Volume"
]
},
{
"type": "csv",
"name": "Average Daily Traffic Volume",
"info": [
{
"name": "Data Description",
"content": "<p>This is a NSW map of average daily traffic volumes at different monitoring stations, recorded in average number of vehicles per day across each reported year. Data displayed is for the primary direction of travel specified (east-west or north-south) and is in annual timesteps from 2015 onwards.</p> <p>Use the time slider bar at the bottom to explore how traffic volumes and the location of traffic monitoring stations change over time. A number of different display variables can also be selected in the legend panel: road type, all vehicles, heavy vehicles, light vehicles or unclassified vehicles.</p> <p>In the context of Electric Vehicle charging infrastructure planning, this is a critical variable that indicates potential demand for charging services, dictated by passing road traffic.</p> <p>Click on a monitoring station to reveal the following information:</p> <ul> <li><strong>Station name</strong></li> <li><strong>Station ID: </strong>Code used to identify specific monitoring station</li> <li><strong>LGA; Suburb:</strong> Local Government Area and suburb in which the monitoring station is located</li> <li><strong>Road type:</strong> Motorway, Arterial road, Sub-Arterial Road, Distributor Road, Primary Road</li> <li><strong>Primary direction captured:</strong> Direction of travel presented in the data</li> <li><strong>Vehicle counts:</strong></li> <ul> <li><strong>All vehicles: </strong>Total number of vehicles of any type</li> <li><strong>Light vehicles:</strong> This tends to be passenger vehicles.</li> <li><strong>Heavy vehicles:</strong> This tends to be commercial vehicles.</li> <li><strong>Unclassified vehicles:</strong> Some stations do not classify vehicles by weight and thus this is generally the same as &ldquo;All vehicles&rdquo; for these stations.</li> </ul> <li><strong>Daily History:</strong> A chart is provided for the daily variations underpinning the average figures. <u>Click &ldquo;Expand&rdquo; to add to a larger chart to compare monitoring stations and download graphed data.</u> Select in the legend which directions of travel are graphed (primary direction and/or opposite direction).</li> </ul>"
},
{
"name": "Data Updates",
"content": "<p>Continually updated from API.</p>"
},
{
"name": "Data Supplier and processing",
"content": "<p>The data is served directly from the Transport NSW API. Data processing for visualisation is managed by the Institute of Sustainable Futures at the University of Technology Sydney (UTS).</p>"
},
{
"name": "Disclaimer",
"content": "<p>Although every effort has been made to ensure the quality of the data, neither the Institute for Sustainable Futures nor the NSW Roads and Maritime Services can guarantee the accuracy of the data and does not accept responsibility for any consequences arising from its use.</p>"
}
],
"infoSectionOrder": [
"Data Description",
"Data Updates",
"Data Supplier and Processing",
"Disclaimer"
],
"url": "https://api.transport.nsw.gov.au/v1/roads/spatial?format=csv&q=%0A%20%20%20%20%20%20SELECT%0A%20%20%20%20%20%20%20%20REF.STATION_ID%2C%0A%20%20%20%20%20%20%20%20NAME%2C%0A%20%20%20%20%20%20%20%20LGA%2C%0A%20%20%20%20%20%20%20%20SUBURB%2C%0A%20%20%20%20%20%20%20%20CASE%20VEHICLE_CLASSIFIER%20WHEN%200%20THEN%20true%20ELSE%20false%20END%20AS%20HAS_VEHICLE_CLASSIFIER%2C%0A%20%20%20%20%20%20%20%20ROAD_FUNCTIONAL_HIERARCHY%20AS%20ROAD_TYPE%2C%0A%20%20%20%20%20%20%20%20WGS84_LATITUDE%20AS%20LATITUDE%2C%0A%20%20%20%20%20%20%20%20WGS84_LONGITUDE%20AS%20LONGITUDE%2C%0A%20%20%20%20%20%20%20%20YEAR%2C%0A%20%20%20%20%20%20%20%20CASE%0A%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'0'%20THEN%20'BOTH'%0A%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'1'%20THEN%20'NORTH'%0A%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'3'%20THEN%20'EAST'%0A%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'5'%20THEN%20'SOUTH'%0A%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'7'%20THEN%20'WEST'%0A%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'9'%20THEN%20'NORTH%20TO%20SOUTH'%0A%20%20%20%20%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'10'%20THEN%20'EAST%20TO%20WEST'%0A%20%20%20%20%20%20%20%20END%20AS%20PRIMARY_DIRECTION%2C%0A%20%20%20%20%20%20%20%20SUM(CASE%20CLASSIFICATION_TYPE%20WHEN%20'UNCLASSIFIED'%20THEN%20TRAFFIC_COUNT%20ELSE%200%20END)%20AS%20UNCLASSIFIED_COUNT%2C%0A%20%20%20%20%20%20%20%20SUM(CASE%20CLASSIFICATION_TYPE%20WHEN%20'ALL%20VEHICLES'%20THEN%20TRAFFIC_COUNT%20ELSE%200%20END)%20AS%20ALL_VEHICLES_COUNT%2C%0A%20%20%20%20%20%20%20%20SUM(CASE%20CLASSIFICATION_TYPE%20WHEN%20'LIGHT%20VEHICLES'%20THEN%20TRAFFIC_COUNT%20ELSE%200%20END)%20AS%20LIGHT_VEHICLES_COUNT%2C%0A%20%20%20%20%20%20%20%20SUM(CASE%20CLASSIFICATION_TYPE%20WHEN%20'HEAVY%20VEHICLES'%20THEN%20TRAFFIC_COUNT%20ELSE%200%20END)%20AS%20HEAVY_VEHICLES_COUNT%0A%20%20%20%20%20%20FROM%20road_traffic_counts_station_reference%20REF%0A%20%20%20%20%20%20JOIN%20road_traffic_counts_yearly_summary%20SUMM%20ON%20REF.STATION_KEY%3DSUMM.STATION_KEY%0A%20%20%20%20%20%20WHERE%20YEAR%20IN%20('2015'%2C'2016'%2C'2017'%2C'2018'%2C'2019')%0A%20%20%20%20%20%20%20%20AND%20PERIOD%3D'ALL%20DAYS'%0A%20%20%20%20%20%20%20%20AND%20TRAFFIC_DIRECTION_SEQ%20IN%20('0'%2C%20'1')%0A%20%20%20%20%20%20GROUP%20BY%20REF.STATION_ID%2CVEHICLE_CLASSIFIER%2CNAME%2CLGA%2CSUBURB%2CWGS84_LATITUDE%2CWGS84_LONGITUDE%2CYEAR%2CROAD_FUNCTIONAL_HIERARCHY%2CDIRECTION_SEQ%0A%20%20",
"columns": [
{
"name": "has_vehicle_classifier",
"type": "hidden"
},
{
"name": "lga",
"type": "hidden",
"title": "Local Government Area"
},
{
"name": "suburb",
"type": "hidden",
"title": "Suburb"
},
{
"name": "station_id",
"type": "hidden"
},
{
"name": "name",
"type": "hidden"
},
{
"name": "road_type",
"title": "Road Type"
},
{
"name": "primary_direction",
"type": "hidden"
},
{
"name": "unclassified_count",
"title": "Unclassified Vehicles count"
},
{
"name": "all_vehicles_count",
"title": "All Vehicles count"
},
{
"name": "light_vehicles_count",
"title": "Light Vehicles count"
},
{
"name": "heavy_vehicles_count",
"title": "Heavy Vehicles count"
}
],
"styles": [
{
"id": "unclassified_count",
"color": {
"binMaximums": [
0,
1000,
5000,
10000,
20000,
30000,
50000,
70000
]
}
},
{
"id": "all_vehicles_count",
"color": {
"binMaximums": [
0,
1000,
5000,
10000,
20000,
30000,
50000,
70000
]
}
},
{
"id": "light_vehicles_count",
"color": {
"binMaximums": [
0,
1000,
5000,
10000,
20000,
30000,
50000,
70000
]
}
},
{
"id": "heavy_vehicles_count",
"color": {
"binMaximums": [
0,
1000,
5000,
10000,
20000
]
}
}
],
"defaultStyle": {
"color": {
"colorPalette": "YlOrBr"
}
},
"featureInfoTemplate": {
"template": "<h4 style=\"margin-top:10px;margin-bottom:5px;\">{{name}}</h4>\n Station ID: {{station_id}}<br/>\n LGA: {{lga}}<br/>\n SUBURB: {{suburb}}<br/>\n ROAD TYPE: {{road_type}}<br/>\n PRIMARY DIRECTION CAPTURED: {{primary_direction}}<br/>\n\n <h4 style=\"margin-top:10px;margin-bottom:5px;\">{{year}} Average Daily Traffic Counts - Both Directions</h4>\n Light Vehicles Count: {{light_vehicles_count}}<br/>\n Heavy Vehicles Count: {{heavy_vehicles_count}}<br/>\n All Vehicles Count (light + heavy): {{all_vehicles_count}}<br/>\n\n Unclassified Count: {{unclassified_count}}<br/>\n <br/><br/>\n\n <h5 style=\"margin-top:5px;margin-bottom:5px;\">Daily History - Primary Direction</h5>\n <chart\n id=\"{{name}}\"\n title=\"{{name}}\"\n sources=\"https://api.transport.nsw.gov.au/v1/roads/spatial?format=csv&q=%0A%20%20%20%20%20SELECT%20TO_CHAR(HOURLY.DATE%20%3A%3A%20DATE%2C%20'YYYY-MM-DD')%20AS%20DATE%2C%0A%20%20%20%20%20CASE%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'0'%20THEN%20'BOTH'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'1'%20THEN%20'NORTH'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'3'%20THEN%20'EAST'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'5'%20THEN%20'SOUTH'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'7'%20THEN%20'WEST'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'9'%20THEN%20'NORTHBOUND-SOUTHBOUND'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'10'%20THEN%20'EASTBOUND-WESTBOUND'%0A%20%20%20%20END%20AS%20PRIMARY_DIRECTION%2C%0A%20%20%20%20SUM(CASE%20TRAFFIC_DIRECTION_SEQ%20WHEN%20'0'%20THEN%20DAILY_TOTAL%20ELSE%200%20END)%20AS%20PRIMARY_DIRECTION_COUNT%2C%0A%20%20%20%20SUM(CASE%20TRAFFIC_DIRECTION_SEQ%20WHEN%20'1'%20THEN%20DAILY_TOTAL%20ELSE%200%20END)%20AS%20OPPOSITE_DIRECTION__COUNT%0A%20%20%20%20FROM%20road_traffic_counts_station_reference%20REF%0A%20%20%20%20%20%20JOIN%20road_traffic_counts_hourly_permanent%20HOURLY%20ON%20REF.STATION_KEY%3DHOURLY.STATION_KEY%0A%20%20%20%20%20%20WHERE%20DATE%20BETWEEN%20'2019-01-01'%20AND%20CURRENT_DATE%0A%20%20%20%20 {{#terria.urlEncodeComponent}}AND STATION_ID='{{station_id}}' GROUP BY HOURLY.DATE,DIRECTION_SEQ{{/terria.urlEncodeComponent}},https://api.transport.nsw.gov.au/v1/roads/spatial?format=csv&q=%0A%20%20%20%20%20SELECT%20TO_CHAR(HOURLY.DATE%20%3A%3A%20DATE%2C%20'YYYY-MM-DD')%20AS%20DATE%2C%0A%20%20%20%20SUM(CASE%20CLASSIFICATION_SEQ%20WHEN%20'0'%20THEN%20DAILY_TOTAL%20ELSE%200%20END)%20AS%20UNCLASSIFIED_COUNT%2C%0A%20%20%20%20SUM(CASE%20CLASSIFICATION_SEQ%20WHEN%20'1'%20THEN%20DAILY_TOTAL%20ELSE%200%20END)%20AS%20ALL_VEHICLES_COUNT%2C%0A%20%20%20%20SUM(CASE%20CLASSIFICATION_SEQ%20WHEN%20'2'%20THEN%20DAILY_TOTAL%20ELSE%200%20END)%20AS%20LIGHT_VEHICLES_COUNT%2C%0A%20%20%20%20SUM(CASE%20CLASSIFICATION_SEQ%20WHEN%20'3'%20THEN%20DAILY_TOTAL%20ELSE%200%20END)%20AS%20HEAVY_VEHICLES_COUNT%0A%20%20%20%20FROM%20road_traffic_counts_station_reference%20REF%0A%20%20%20%20%20%20JOIN%20road_traffic_counts_hourly_permanent%20HOURLY%20ON%20REF.STATION_KEY%3DHOURLY.STATION_KEY%0A%20%20%20%20%20%20WHERE%20DATE%20BETWEEN%20'2019-01-01'%20AND%20CURRENT_DATE%0A%20%20%20%20 {{#terria.urlEncodeComponent}}AND STATION_ID='{{station_id}}' GROUP BY HOURLY.DATE{{/terria.urlEncodeComponent}}\"\n source-names='Chart By Traffic Direction, Chart By Vehicle Type'\n downloads=\"proxy/https://api.transport.nsw.gov.au/v1/roads/spatial?format=csv&q=%0A%20%20%20%20%20SELECT%20TO_CHAR(HOURLY.DATE%20%3A%3A%20DATE%2C%20'YYYY-MM-DD')%20AS%20DATE%2C%0A%20%20%20%20%20CASE%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'0'%20THEN%20'BOTH'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'1'%20THEN%20'NORTH'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'3'%20THEN%20'EAST'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'5'%20THEN%20'SOUTH'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'7'%20THEN%20'WEST'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'9'%20THEN%20'NORTHBOUND-SOUTHBOUND'%0A%20%20%20%20%20%20WHEN%20DIRECTION_SEQ%3D'10'%20THEN%20'EASTBOUND-WESTBOUND'%0A%20%20%20%20END%20AS%20PRIMARY_DIRECTION%2C%0A%20%20%20%20SUM(CASE%20TRAFFIC_DIRECTION_SEQ%20WHEN%20'0'%20THEN%20DAILY_TOTAL%20ELSE%200%20END)%20AS%20PRIMARY_DIRECTION_COUNT%2C%0A%20%20%20%20SUM(CASE%20TRAFFIC_DIRECTION_SEQ%20WHEN%20'1'%20THEN%20DAILY_TOTAL%20ELSE%200%20END)%20AS%20OPPOSITE_DIRECTION__COUNT%0A%20%20%20%20FROM%20road_traffic_counts_station_reference%20REF%0A%20%20%20%20%20%20JOIN%20road_traffic_counts_hourly_permanent%20HOURLY%20ON%20REF.STATION_KEY%3DHOURLY.STATION_KEY%0A%20%20%20%20%20%20WHERE%20DATE%20BETWEEN%20'2019-01-01'%20AND%20CURRENT_DATE%0A%20%20%20%20 {{#terria.urlEncodeComponent}}AND STATION_ID='{{station_id}}' GROUP BY HOURLY.DATE,DIRECTION_SEQ{{/terria.urlEncodeComponent}}\"\n download-names='Current chart'\n ></chart>\n "
},
"id": "cC2wWx",
"shareKeys": [
"Root Group/Average Daily Traffic Volume"
]
}
],
"corsDomains": [
"aremi.d61.io",
"aremi.data61.io",
"datacube.org.au",
"dea.ga.gov.au",
"gsky.nci.org.au",
"lsa.geohub.sa.gov.au",
"network-opportunity-maps.s3-ap-southeast-2.amazonaws.com",
"network-opportunity-maps.s3.amazonaws.com",
"programs.communications.gov.au",
"spatial.industry.nsw.gov.au",
"uts-nom.herokuapp.com"
],
"homeCamera": {
"west": 112,
"south": -48,
"east": 155,
"north": -5
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment