PTStations - MacOS App to gather the information on the Train Station of the Portuguese Railway system

Related tags

Audio PTStations
Overview

PTStations

A simple macOS app that gathers information on the Portuguese Railway train stations, and allows the user to export it as a JSON file.

The App was mostly done for personal use, it does not follow good design principles, and there's a lot of hard coded assumptions in it's code.

How to use

You can download the XLSX file with the list of Portuguese train stations here: https://dados.gov.pt/pt/datasets/estacoes-e-apeadeiros/

This file (as of Jan 5, 2022) is not completly up to date, but it's a start.

After loading the file into the app, you need to gather the Node IDs. These are gathered from the Infraestruturas de Portugal (IP) API. The search is not 100% accurate because the station names used in the file and in the API are not 100% match.

You can also gather the coordenates for a lot of the stations. The app will scrape the CP website to gather the needed information.

After gathering the NodeIDs the app will also allow you to scrape the IP website to gather amenities in each station.

An example of the end result can be found here: https://zeroloop.org/apis/train-stations/all.json

This is a static website, and will only ever return this JSON file.

JSON Structure

The JSON file will have the following structure:

[
    {
        "name": "Abrantes",
        "district": "SANTARÉM",
        "parish": "São Miguel do Rio Torto e Rossio ao Sul do Tejo",
        "municipality": "ABRANTES",
        "id": "569623FE-D78C-4FF1-814B-D5FCAB44236C",
        "nodeId": "9452001",
        "longitude": "-8.194491",
        "latitude": "39.440621",
        "line": "Linha da Beira Baixa",
        "amenities": [
            {
                "type": "airport",
                "title": "Lisboa",
                "value": "> 20 Km"
            },
            {
                "type": "pharmacy",
                "title": "Santos",
                "value": "< 1 Km"
            },
            {
                "type": "fireDepartment",
                "title": " Municipais de Abrantes",
                "value": "241 360 670"
            },
            {
                "type": "police",
                "title": "GNR de Abrantes",
                "value": "241 360 920"
            },
            {
                "type": "hospital",
                "title": " Dr. Manoel Constâncio",
                "value": "241 360 700"
            },
            {
                "type": "address",
                "title": "",
                "value": "Rua da Estação de Abrantes - Rossio ao Sul do Tejo - 2205-022 ABRANTES"
            }
        ]
    },
    ...
]

Every propery is a String, and all properties can be nil.

You might also like...
MuVis is a macOS, iOS, iPadOS app for real-time music visualization.
MuVis is a macOS, iOS, iPadOS app for real-time music visualization.

MuVis MuVis is an open-source multi-platform app (using SwiftUI, Swift, and Xcode) for music visualization. It renders informative (and musically usef

AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS, and tvOS.

AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS (including Catalyst), and tvOS. Installation To add AudioKit

AudioPlayer is a simple class for playing audio in iOS, macOS and tvOS apps.
AudioPlayer is a simple class for playing audio in iOS, macOS and tvOS apps.

AudioPlayer AudioPlayer is a simple class for playing audio in iOS, macOS and tvOS apps.

Swift audio synthesis, processing, & analysis platform for iOS, macOS and tvOS
Swift audio synthesis, processing, & analysis platform for iOS, macOS and tvOS

AudioKit AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS (including Catalyst), and tvOS. Installation To add AudioKit

A minimal chromatic tuner for iOS & macOS.
A minimal chromatic tuner for iOS & macOS.

Zen Tuner A minimal chromatic tuner. Works well with any instrument, whether it's woodwinds, brass, strings or voice. Dark Light Features Beautiful, c

🎶 Control Apple Music right from your macOS menu bar.
🎶 Control Apple Music right from your macOS menu bar.

About Music Bar is macOS application that places music controls right in your menu bar. Installation Download and unzip the latest release. Drag the a

An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.
An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.

A simple, intuitive audio framework for iOS and OSX. Deprecated EZAudio has recently been deprecated in favor of AudioKit. However, since some people

A sound fader for AVAudioPlayer written in Swift for iOS, tvOS and macOS.
A sound fader for AVAudioPlayer written in Swift for iOS, tvOS and macOS.

Cephalopod, a sound fader for AvAudioPlayer written in Swift - iOS, tvOS and macOS This library can help fading sounds in and out with AvAudioPlayer.

An original digital art work for macOS, iOS and web
An original digital art work for macOS, iOS and web

WordClock WordClock versions of various vintages, for various platforms. https://www.simonheys.com/wordclock/ Downloads Currently avaiaible to downloa

Owner
Joao Pires
Hi, my name is Joao and I'm an iOS Developer! I work in Swift but I also dabble in JavaScript, HTML, CSS, Lua and Python.
Joao Pires
Swift Radio is an open source radio station app with robust and professional features.

Swift Radio Swift Radio is an open source radio station app with robust and professional features. This is a fully realized Radio App built entirely i

Ahmed AlOtaibi 0 Oct 13, 2021
Nobetci Eczacim is open-source App Store Application which users can get pharmacy information and location easily and safely.

Pharmacy-On-Duty Nobetci Eczacim Project Description This project designed for make it easier for people to search for a pharmacy on duty. App Store A

Mert Demirtas 5 Sep 19, 2022
The application display album artwork with detailed information from the iTunes API.

Music-Info The application display album artwork with detailed information from the iTunes API. UIKit, CoreData, Foundation Navigation (TabBarControll

Andrey Alymov 0 Nov 5, 2021
Queue management system for AVSpeechSynthesizer

QHSpeechSynthesizerQueue Queue management system for AVSpeechSynthesizer Installation Cocoapods Add this to your Podfile: pod 'QHSpeechSynthesizerQueu

Quentin Hayot 42 Dec 17, 2021
Replace the system volume popup with a more subtle indicator.

Replace the volume popup with a more subtle way to display the volume when the user changes it with the volume rocker. Why and how The iOS default pop

Andrea Mazzini 1.2k Nov 21, 2022
MuVis is a macOS, iOS, iPadOS app for real-time music visualization.

MuVis MuVis is an open-source multiplatform app (using SwiftUI, Swift, and Xcode) for music visualization. It renders informative (and musically usefu

Keith Bromley 7 Oct 10, 2022
macOS app that allows the control of Spotify and AppleMusic/iTunes music playback from the menu bar.

PlayStatus is a simple macOS app that allows the control of Spotify, Apple Music(macOS 10.15+) and iTunes including iTunes Radio/Beats1 playback from

Nikhil Bolar 114 Dec 28, 2022
macOS app for Hype Machine

Plug Discover and listen to music from Hype Machine Download Requires macOS 10.15 or later. Screenshot FAQ Can I contribute localizations? We do not h

Wulkano 171 Jan 1, 2023
A macOS app to visualise your iTunes library as graphs.

iTunes Graphs iTunes Graphs is a Cocoa-based macOS app which visualises your iTunes library in a series of pie charts. Currently, it supports the foll

zac garby 46 Dec 26, 2022
A simple Spotify lyrics viewer menu bar app for macOS in Swift 3

lyricsify This is a simple macOS menu bar application that shows you the lyrics of current playing spotify track. All the lyricses are from Wikia webs

Mohamad Jahani 85 Dec 31, 2022