Giter VIP home page Giter VIP logo

ptna-www's People

Contributors

kristjanesperanto avatar osm-tonie avatar patchi-osm avatar stefanb avatar strubbl avatar xinayder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ptna-www's Issues

change updating dates/time on results/xx/index.html

Current situaltion:

  • ptna-network.sh from ptna repository changes these index.html files after every single analysis run using sed command.
  • This has the effect, that those index.html files in GitHubare never up-to-date
  • This can be a problem, when the web server crashes and needs to be reinstalled
  • Before editing those index.html files, they have to be retrieved from web server (using rsync)
  • Installation of web server pages might not be possible from GitHub

Alternative:

  • let ptna-network.sh provide the required information in dedicated *.txt files (like: results/DE/BY/DE-BY-MVV-Analysis-details.txt)

  • replace results/xx/index.html by results/xx/index.php

  • let results/xx/index.php read the dedicated information files using PHP code

  • redirect from results/xx/index.html to results/xx/index.php using a JavaScript window.onload=window.open() or so.

  • start small with new and old dates in (UTC and local time) as well as new-or-old indicator

  • extend later to create the complete table row from those information files

    • this needs support from ptna-networks as well, specify all information in the settings.sh file of a 'network'
      • PREFIX
      • Overpass-API query to download data
      • name of the 'region'
      • Overpass-API query to show search area / region on map
      • clear text names of the 'networks'
      • URL of the 'networks'
      • name of the 'routes' data in the OSM wiki or in GitHub
      • location of the 'routes' data in the wiki or in GitHub
      • ...

relation.js

Hi Toni,

ich hab mal versucht die Relationsanalyse schneller zu machen. Glaub das Problem ist das zu viele DOM Aktionen stattfinden.. zu oft .innerHTML

Ich hab in der Datei die Funktion handleMember() ersetzt und addtable() zusätzlich erstellt. Faktor 40x schneller.. ich hab die Funktion handleMember() vereinfacht.. und ein paar Sachen rausgenommen.. die ich als unnötig finde ;-) Musst du wissen.. die alte Funktion ist sehr kompliziert, darum hab ich sie ersetzt. Vielleicht braucht man ein paar Sachen auch nicht mehr wenn es so schnell jetzt läuft.

script/relation.js

patch.js.txt

add analysis for GTFS data (based on PHP)

PTNA shall support analysis of GTFS data.
Start with DE-BY-MVV GTFS data.
A tool from gtfs repository shall prepare the original GTFS data for an optimized use in PTNA.

add links to PTNA analysis data on trips.php page

based on "ptna_analysis" in osm table of DB

  • search for the route_short_name and route_type in the corresponding results/xx/xx/xx-xx-xx-Analysis.html data for id="..." and data_ref="<route_short_name>"
  • provide links to those 'id'
    • example: results/DE/BY/DE-BY-MVV-Analysis.html#bus_210

fix mix of absolute and relative sizes

relation.phpuses

margin-left = margin-rght = 16px

Map is 50% and Tables are 49.146.

This fits well for 1920 px horizontal size with vertical scroll bar but not for smaller numbers, ...

Then, tables are positioned below the map :(

Make the relation analysis more responsive

Loading long/big routes with lots of members takes a while to analyze, whilc eht browser does not respond (on that page).
The for-loop shall be broken into pieces and iteration shall be done via setTimeout(handleMember,0, ...)

in routes.php add id= for each table row

In CreateGtfsRoutesEntry( $network ) code <tr id="..." ...>

where id is built our of 'type' and 'ref' in OSM terms, i.e. RouteType2OsmRoute( route_type ) and route_short_name|"not set' and if necessary a unique suffix

Similar to PTNA-Analysis

show available GTFS-version on top of gtfs/xxx.php pages

We can have

  • so called 'last' e.g. "DE-BY-MVV" which is a symbolic link to a "DE-BY-MVV-date" with the newest date
  • so called 'previous' e.g. "DE-BY-MVV-previous" which is a symbolic link to a "DE-BY-MVV-date" with the second newest date
  • so called 'long-term' e.g. "DE-BY-MVV-long-term" which is a symbolic link to a "DE-BY-MVV-date" with a specific date, the date of the last official time table change
  • the "DE-BY-MVV-date" data bases with being the release_date of the GTFS-Data

Present all available sources on the top of each gtfs/xxx.pgp page.
In a time line indicating the current one (handled on that page), linking to the routes.php page wit the appropriate network=.
Also showing where 'previous' and 'long-term' and DE-BY-MM are pointing to

Calculate number of trips per trip-variant

Roughly: number of days where service is provides multiplied by number of departures per day

ptna_trips has "list_service_ids" which includes a list of service_ids (corresponds to each departure time in list_departures)

calendar: for each relevant service_id find the number of service days (end_date - start_date) * (week_days with '1') / 7

calendar_dates: for each relevant service_id add the number of "exception_type == 1" and subtract the number of "exception_type == 2"

for this trip_id take the service_ids and their individual number out of "list_service_ids" and multiply those numbers with the individual number of service days per service_id

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.