cal-itp / reports

GTFS data quality reports for California transit providers
https://reports.calitp.org
GNU Affero General Public License v3.0
7 stars 0 forks source link

feat: show report source URLs in a modal #232

Closed ryon closed 1 year ago

ryon commented 1 year ago

Description

Resolves #231

Type of change

How has this been tested?

Screenshots (optional)

Button to show modal

Screenshot 2023-03-03 at 7 51 48 PM

Modal when open

Screenshot 2023-03-03 at 7 52 01 PM
edasmalchi commented 1 year ago

thanks @ryon, this looks awesome! Source data is now available in prod, I think ideally each url would be listed in the modal next to its dataset name

 "feeds": [{
    "gtfs_dataset_name": "LA DOT Schedule",
    "string_url": "https://ladotbus.com/gtfs"
  }, {
    "gtfs_dataset_name": "LA DOT Alerts",
    "string_url": "https://ladotbus.com/gtfs-rt/alerts"
  }, {
    "gtfs_dataset_name": "LA DOT TripUpdates",
    "string_url": "https://ladotbus.com/gtfs-rt/tripupdates"
  }, {
    "gtfs_dataset_name": "LA DOT VehiclePositions",
    "string_url": "https://ladotbus.com/gtfs-rt/vehiclepositions"
  }]
Screenshot 2023-03-15 095805
ryon commented 1 year ago

Hi @edasmalchi, thanks! How might I get that data from... wherever it is, into my local project? I tried running both gsutil -m rsync -r gs://gtfs-data-test/report_gtfs_schedule outputs and gsutil -m rsync -r gs://gtfs-data/report_gtfs_schedule outputs, each of which synced a lot of JSON, but I don't see those new fields anywhere. I don't think I fully grasp the flow of data from end to end here.

I'm also having trouble running several of the commands in the readme, such as:

❯ make generate_parameters
python generate_index_report.py
Traceback (most recent call last):
  File "generate_index_report.py", line 19, in <module>
    ids_with_feeds = tbls.mart_gtfs_quality.idx_monthly_reports_site() >> collect()
  File "~/.local/lib/python3.8/site-packages/calitp/tables.py", line 37, in __getattr__
    raise AttributeError("No such attribute %s" % k)
AttributeError: No such attribute mart_gtfs_quality
make: *** [Makefile:17: generate_parameters] Error 1

If it's better to take this discussion elsewhere, please let me know.

ryon commented 1 year ago

The automated build script seems to be failing (KeyError: 'feeds'), but it does work for me locally. Does the GitHub Action pull in the newest data?

Screenshot 2023-03-24 at 6 13 18 PM
atvaccaro commented 1 year ago

Sorry I must've missed this; looking into it now with @charlie-costanzo.