feat(ui): add SH, MV, BB, BE, ST, NW, HE, SN, TH, RP, SL, BY and BW analysis

This commit is contained in:
dancingCycle 2023-08-22 11:27:22 +02:00
parent 6f9c070890
commit d793376a96
3 changed files with 816 additions and 42 deletions

View File

@ -6,11 +6,37 @@ import {
getStopsCountGtfsDeHbNotDhid,
getStopsCountGtfsDeHhNotDhid,
getStopsCountGtfsDeNiNotDhid,
getStopsCountGtfsDeShNotDhid,
getStopsCountGtfsDeMvNotDhid,
getStopsCountGtfsDeBbNotDhid,
getStopsCountGtfsDeBeNotDhid,
getStopsCountGtfsDeStNotDhid,
getStopsCountGtfsDeNwNotDhid,
getStopsCountGtfsDeHeNotDhid,
getStopsCountGtfsDeSnNotDhid,
getStopsCountGtfsDeThNotDhid,
getStopsCountGtfsDeRpNotDhid,
getStopsCountGtfsDeSlNotDhid,
getStopsCountGtfsDeByNotDhid,
getStopsCountGtfsDeBwNotDhid,
getStopsCountGtfs,
getStopsCountGtfsDe,
getStopsCountGtfsDeHb,
getStopsCountGtfsDeHh,
getStopsCountGtfsDeNi
getStopsCountGtfsDeNi,
getStopsCountGtfsDeSh,
getStopsCountGtfsDeMv,
getStopsCountGtfsDeBb,
getStopsCountGtfsDeBe,
getStopsCountGtfsDeSt,
getStopsCountGtfsDeNw,
getStopsCountGtfsDeHe,
getStopsCountGtfsDeSn,
getStopsCountGtfsDeTh,
getStopsCountGtfsDeRp,
getStopsCountGtfsDeSl,
getStopsCountGtfsDeBy,
getStopsCountGtfsDeBw
} from '../utils/api';
export default function Home(){
@ -20,13 +46,38 @@ export default function Home(){
const [countStopsGtfsDeHb, setCountStopsGtfsDeHb] = useState('loading...');
const [countStopsGtfsDeHh, setCountStopsGtfsDeHh] = useState('loading...');
const [countStopsGtfsDeNi, setCountStopsGtfsDeNi] = useState('loading...');
const [countStopsGtfsDeSh, setCountStopsGtfsDeSh] = useState('loading...');
const [countStopsGtfsDeMv, setCountStopsGtfsDeMv] = useState('loading...');
const [countStopsGtfsDeBb, setCountStopsGtfsDeBb] = useState('loading...');
const [countStopsGtfsDeBe, setCountStopsGtfsDeBe] = useState('loading...');
const [countStopsGtfsDeSt, setCountStopsGtfsDeSt] = useState('loading...');
const [countStopsGtfsDeNw, setCountStopsGtfsDeNw] = useState('loading...');
const [countStopsGtfsDeHe, setCountStopsGtfsDeHe] = useState('loading...');
const [countStopsGtfsDeSn, setCountStopsGtfsDeSn] = useState('loading...');
const [countStopsGtfsDeTh, setCountStopsGtfsDeTh] = useState('loading...');
const [countStopsGtfsDeRp, setCountStopsGtfsDeRp] = useState('loading...');
const [countStopsGtfsDeSl, setCountStopsGtfsDeSl] = useState('loading...');
const [countStopsGtfsDeBy, setCountStopsGtfsDeBy] = useState('loading...');
const [countStopsGtfsDeBw, setCountStopsGtfsDeBw] = useState('loading...');
const [countStopsGtfsDeNotDhid, setCountStopsGtfsDeNotDhid] = useState('loading...');
const [countStopsGtfsDeHbNotDhid, setCountStopsGtfsDeHbNotDhid] = useState('loading...');
const [countStopsGtfsDeHhNotDhid, setCountStopsGtfsDeHhNotDhid] = useState('loading...');
const [countStopsGtfsDeNiNotDhid, setCountStopsGtfsDeNiNotDhid] = useState('loading...');
const [countStopsGtfsDeShNotDhid, setCountStopsGtfsDeShNotDhid] = useState('loading...');
const [countStopsGtfsDeMvNotDhid, setCountStopsGtfsDeMvNotDhid] = useState('loading...');
const [countStopsGtfsDeBbNotDhid, setCountStopsGtfsDeBbNotDhid] = useState('loading...');
const [countStopsGtfsDeBeNotDhid, setCountStopsGtfsDeBeNotDhid] = useState('loading...');
const [countStopsGtfsDeStNotDhid, setCountStopsGtfsDeStNotDhid] = useState('loading...');
const [countStopsGtfsDeNwNotDhid, setCountStopsGtfsDeNwNotDhid] = useState('loading...');
const [countStopsGtfsDeHeNotDhid, setCountStopsGtfsDeHeNotDhid] = useState('loading...');
const [countStopsGtfsDeSnNotDhid, setCountStopsGtfsDeSnNotDhid] = useState('loading...');
const [countStopsGtfsDeThNotDhid, setCountStopsGtfsDeThNotDhid] = useState('loading...');
const [countStopsGtfsDeRpNotDhid, setCountStopsGtfsDeRpNotDhid] = useState('loading...');
const [countStopsGtfsDeSlNotDhid, setCountStopsGtfsDeSlNotDhid] = useState('loading...');
const [countStopsGtfsDeByNotDhid, setCountStopsGtfsDeByNotDhid] = useState('loading...');
const [countStopsGtfsDeBwNotDhid, setCountStopsGtfsDeBwNotDhid] = useState('loading...');
/*fetch countStopsGtfs in a JavaScript function*/
const fetchGtfs = async () => {
let count=await getStopsCountGtfs();
if(count > -1){
@ -34,7 +85,6 @@ export default function Home(){
}
};
/*fetch countStopsGtfsDe in a JavaScript function*/
const fetchGtfsDe = async () => {
let count=await getStopsCountGtfsDe();
if(count > -1){
@ -42,7 +92,6 @@ export default function Home(){
}
};
/*fetch countStopsGtfsDeHb in a JavaScript function*/
const fetchGtfsDeHb = async () => {
let count=await getStopsCountGtfsDeHb();
if(count > -1){
@ -50,7 +99,6 @@ export default function Home(){
}
};
/*fetch countStopsGtfsDeHh in a JavaScript function*/
const fetchGtfsDeHh = async () => {
let count=await getStopsCountGtfsDeHh();
if(count > -1){
@ -58,7 +106,6 @@ export default function Home(){
}
};
/*fetch countStopsGtfsDeNi in a JavaScript function*/
const fetchGtfsDeNi = async () => {
let count=await getStopsCountGtfsDeNi();
if(count > -1){
@ -66,7 +113,6 @@ export default function Home(){
}
};
/*fetch countStopsGtfsDeNotDhid in a JavaScript function*/
const fetchGtfsDeNotDhid = async () => {
let count=await getStopsCountGtfsDeNotDhid();
if(count > -1){
@ -74,7 +120,6 @@ export default function Home(){
}
};
/*fetch countStopsGtfsDeHbNotDhid in a JavaScript function*/
const fetchGtfsDeHbNotDhid = async () => {
let count=await getStopsCountGtfsDeHbNotDhid();
if(count > -1){
@ -82,7 +127,6 @@ export default function Home(){
}
};
/*fetch countStopsGtfsDeHhNotDhid in a JavaScript function*/
const fetchGtfsDeHhNotDhid = async () => {
let count=await getStopsCountGtfsDeHhNotDhid();
if(count > -1){
@ -90,11 +134,192 @@ export default function Home(){
}
};
/*fetch countStopsGtfsDeNiNotDhid in a JavaScript function*/
const fetchGtfsDeNiNotDhid = async () => {
let count=await getStopsCountGtfsDeNiNotDhid();
if(count > -1){
setCountStopsGtfsDeNiNotDhid((countStopsGtfsDeNiNotDhid) => count);
setCountStopsGtfsDeNiNotDhid(count);
}
};
const fetchGtfsDeShNotDhid = async () => {
let count=await getStopsCountGtfsDeShNotDhid();
if(count > -1){
setCountStopsGtfsDeShNotDhid(count);
}
};
const fetchGtfsDeSh = async () => {
let count=await getStopsCountGtfsDeSh();
if(count > -1){
setCountStopsGtfsDeSh(count);
}
};
const fetchGtfsDeMvNotDhid = async () => {
let count=await getStopsCountGtfsDeMvNotDhid();
if(count > -1){
setCountStopsGtfsDeMvNotDhid(count);
}
};
const fetchGtfsDeMv = async () => {
let count=await getStopsCountGtfsDeMv();
if(count > -1){
setCountStopsGtfsDeMv(count);
}
};
const fetchGtfsDeBbNotDhid = async () => {
let count=await getStopsCountGtfsDeBbNotDhid();
if(count > -1){
setCountStopsGtfsDeBbNotDhid(count);
}
};
const fetchGtfsDeBb = async () => {
let count=await getStopsCountGtfsDeBb();
if(count > -1){
setCountStopsGtfsDeBb(count);
}
};
const fetchGtfsDeBeNotDhid = async () => {
let count=await getStopsCountGtfsDeBeNotDhid();
if(count > -1){
setCountStopsGtfsDeBeNotDhid(count);
}
};
const fetchGtfsDeBe = async () => {
let count=await getStopsCountGtfsDeBe();
if(count > -1){
setCountStopsGtfsDeBe(count);
}
};
const fetchGtfsDeStNotDhid = async () => {
let count=await getStopsCountGtfsDeStNotDhid();
if(count > -1){
setCountStopsGtfsDeStNotDhid(count);
}
};
const fetchGtfsDeSt = async () => {
let count=await getStopsCountGtfsDeSt();
if(count > -1){
setCountStopsGtfsDeSt(count);
}
};
const fetchGtfsDeNwNotDhid = async () => {
let count=await getStopsCountGtfsDeNwNotDhid();
if(count > -1){
setCountStopsGtfsDeNwNotDhid(count);
}
};
const fetchGtfsDeNw = async () => {
let count=await getStopsCountGtfsDeNw();
if(count > -1){
setCountStopsGtfsDeNw(count);
}
};
const fetchGtfsDeHeNotDhid = async () => {
let count=await getStopsCountGtfsDeHeNotDhid();
if(count > -1){
setCountStopsGtfsDeHeNotDhid(count);
}
};
const fetchGtfsDeHe = async () => {
let count=await getStopsCountGtfsDeHe();
if(count > -1){
setCountStopsGtfsDeHe(count);
}
};
const fetchGtfsDeSnNotDhid = async () => {
let count=await getStopsCountGtfsDeSnNotDhid();
if(count > -1){
setCountStopsGtfsDeSnNotDhid(count);
}
};
const fetchGtfsDeSn = async () => {
let count=await getStopsCountGtfsDeSn();
if(count > -1){
setCountStopsGtfsDeSn(count);
}
};
const fetchGtfsDeThNotDhid = async () => {
let count=await getStopsCountGtfsDeThNotDhid();
if(count > -1){
setCountStopsGtfsDeThNotDhid(count);
}
};
const fetchGtfsDeTh = async () => {
let count=await getStopsCountGtfsDeTh();
if(count > -1){
setCountStopsGtfsDeTh(count);
}
};
const fetchGtfsDeRpNotDhid = async () => {
let count=await getStopsCountGtfsDeRpNotDhid();
if(count > -1){
setCountStopsGtfsDeRpNotDhid(count);
}
};
const fetchGtfsDeRp = async () => {
let count=await getStopsCountGtfsDeRp();
if(count > -1){
setCountStopsGtfsDeRp(count);
}
};
const fetchGtfsDeSlNotDhid = async () => {
let count=await getStopsCountGtfsDeSlNotDhid();
if(count > -1){
setCountStopsGtfsDeSlNotDhid(count);
}
};
const fetchGtfsDeSl = async () => {
let count=await getStopsCountGtfsDeSl();
if(count > -1){
setCountStopsGtfsDeSl(count);
}
};
const fetchGtfsDeByNotDhid = async () => {
let count=await getStopsCountGtfsDeByNotDhid();
if(count > -1){
setCountStopsGtfsDeByNotDhid(count);
}
};
const fetchGtfsDeBy = async () => {
let count=await getStopsCountGtfsDeBy();
if(count > -1){
setCountStopsGtfsDeBy(count);
}
};
const fetchGtfsDeBwNotDhid = async () => {
let count=await getStopsCountGtfsDeBwNotDhid();
if(count > -1){
setCountStopsGtfsDeBwNotDhid(count);
}
};
const fetchGtfsDeBw = async () => {
let count=await getStopsCountGtfsDeBw();
if(count > -1){
setCountStopsGtfsDeBw(count);
}
};
@ -106,11 +331,37 @@ export default function Home(){
fetchGtfsDeHb();
fetchGtfsDeHh();
fetchGtfsDeNi();
fetchGtfsDeSh();
fetchGtfsDeMv();
fetchGtfsDeBb();
fetchGtfsDeBe();
fetchGtfsDeSt();
fetchGtfsDeNw();
fetchGtfsDeHe();
fetchGtfsDeSn();
fetchGtfsDeTh();
fetchGtfsDeRp();
fetchGtfsDeSl();
fetchGtfsDeBy();
fetchGtfsDeBw();
fetchGtfsDeNotDhid();
fetchGtfsDeHbNotDhid();
fetchGtfsDeHhNotDhid();
fetchGtfsDeNiNotDhid();
fetchGtfsDeShNotDhid();
fetchGtfsDeMvNotDhid();
fetchGtfsDeBbNotDhid();
fetchGtfsDeBeNotDhid();
fetchGtfsDeStNotDhid();
fetchGtfsDeNwNotDhid();
fetchGtfsDeHeNotDhid();
fetchGtfsDeSnNotDhid();
fetchGtfsDeThNotDhid();
fetchGtfsDeRpNotDhid();
fetchGtfsDeSlNotDhid();
fetchGtfsDeByNotDhid();
fetchGtfsDeBwNotDhid();
/*use an empty dependency countStopsGtfs to ensure the hook is running only once*/
/*TODO study dependency countStopsGtfs: https://reactjs.org/docs/hooks-effect.html*/
}, []);
@ -127,7 +378,7 @@ export default function Home(){
</p>
<p>
Number of stops inside DE not compliant with the Global ID:&nbsp;
{countStopsGtfsDeNotDhid}
{countStopsGtfsDeNotDhid} ({countStopsGtfsDe !== 0 ? (countStopsGtfsDeNotDhid / countStopsGtfsDe * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-HB:&nbsp;
@ -135,7 +386,7 @@ export default function Home(){
</p>
<p>
Number of stops inside DE-HB not compliant with the Global ID:&nbsp;
{countStopsGtfsDeHbNotDhid} ({countStopsGtfsDeHb !== 0 ? (countStopsGtfsDeHbNotDhid / countStopsGtfsDeHb * 100).toFixed(2) : 'loading...'} %)
{countStopsGtfsDeHbNotDhid} ({countStopsGtfsDeHb !== 0 ? (countStopsGtfsDeHbNotDhid / countStopsGtfsDeHb * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-HH:&nbsp;
@ -143,7 +394,7 @@ export default function Home(){
</p>
<p>
Number of stops inside DE-HH not compliant with the Global ID:&nbsp;
{countStopsGtfsDeHhNotDhid} ({countStopsGtfsDeHh !== 0 ? (countStopsGtfsDeHhNotDhid / countStopsGtfsDeHh * 100).toFixed(2) : 'loading...'} %)
{countStopsGtfsDeHhNotDhid} ({countStopsGtfsDeHh !== 0 ? (countStopsGtfsDeHhNotDhid / countStopsGtfsDeHh * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-NI:&nbsp;
@ -151,7 +402,111 @@ export default function Home(){
</p>
<p>
Number of stops inside DE-NI not compliant with the Global ID:&nbsp;
{countStopsGtfsDeNiNotDhid} ({countStopsGtfsDeNi !== 0 ? (countStopsGtfsDeNiNotDhid / countStopsGtfsDeNi * 100).toFixed(2) : 'loading...'} %)
{countStopsGtfsDeNiNotDhid} ({countStopsGtfsDeNi !== 0 ? (countStopsGtfsDeNiNotDhid / countStopsGtfsDeNi * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-SH:&nbsp;
{countStopsGtfsDeSh}
</p>
<p>
Number of stops inside DE-SH not compliant with the Global ID:&nbsp;
{countStopsGtfsDeShNotDhid} ({countStopsGtfsDeSh !== 0 ? (countStopsGtfsDeShNotDhid / countStopsGtfsDeSh * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-MV:&nbsp;
{countStopsGtfsDeMv}
</p>
<p>
Number of stops inside DE-MV not compliant with the Global ID:&nbsp;
{countStopsGtfsDeMvNotDhid} ({countStopsGtfsDeMv !== 0 ? (countStopsGtfsDeMvNotDhid / countStopsGtfsDeMv * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-BB:&nbsp;
{countStopsGtfsDeBb}
</p>
<p>
Number of stops inside DE-BB not compliant with the Global ID:&nbsp;
{countStopsGtfsDeBbNotDhid} ({countStopsGtfsDeBb !== 0 ? (countStopsGtfsDeBbNotDhid / countStopsGtfsDeBb * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-BE:&nbsp;
{countStopsGtfsDeBe}
</p>
<p>
Number of stops inside DE-BE not compliant with the Global ID:&nbsp;
{countStopsGtfsDeBeNotDhid} ({countStopsGtfsDeBe !== 0 ? (countStopsGtfsDeBeNotDhid / countStopsGtfsDeBe * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-ST:&nbsp;
{countStopsGtfsDeSt}
</p>
<p>
Number of stops inside DE-ST not compliant with the Global ID:&nbsp;
{countStopsGtfsDeStNotDhid} ({countStopsGtfsDeSt !== 0 ? (countStopsGtfsDeStNotDhid / countStopsGtfsDeSt * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-NW:&nbsp;
{countStopsGtfsDeNw}
</p>
<p>
Number of stops inside DE-NW not compliant with the Global ID:&nbsp;
{countStopsGtfsDeNwNotDhid} ({countStopsGtfsDeNw !== 0 ? (countStopsGtfsDeNwNotDhid / countStopsGtfsDeNw * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-HE:&nbsp;
{countStopsGtfsDeHe}
</p>
<p>
Number of stops inside DE-HE not compliant with the Global ID:&nbsp;
{countStopsGtfsDeHeNotDhid} ({countStopsGtfsDeHe !== 0 ? (countStopsGtfsDeHeNotDhid / countStopsGtfsDeHe * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-SN:&nbsp;
{countStopsGtfsDeSn}
</p>
<p>
Number of stops inside DE-SN not compliant with the Global ID:&nbsp;
{countStopsGtfsDeSnNotDhid} ({countStopsGtfsDeSn !== 0 ? (countStopsGtfsDeSnNotDhid / countStopsGtfsDeSn * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-TH:&nbsp;
{countStopsGtfsDeTh}
</p>
<p>
Number of stops inside DE-TH not compliant with the Global ID:&nbsp;
{countStopsGtfsDeThNotDhid} ({countStopsGtfsDeTh !== 0 ? (countStopsGtfsDeThNotDhid / countStopsGtfsDeTh * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-RP:&nbsp;
{countStopsGtfsDeRp}
</p>
<p>
Number of stops inside DE-RP not compliant with the Global ID:&nbsp;
{countStopsGtfsDeRpNotDhid} ({countStopsGtfsDeRp !== 0 ? (countStopsGtfsDeRpNotDhid / countStopsGtfsDeRp * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-SL:&nbsp;
{countStopsGtfsDeSl}
</p>
<p>
Number of stops inside DE-SL not compliant with the Global ID:&nbsp;
{countStopsGtfsDeSlNotDhid} ({countStopsGtfsDeSl !== 0 ? (countStopsGtfsDeSlNotDhid / countStopsGtfsDeSl * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-BY:&nbsp;
{countStopsGtfsDeBy}
</p>
<p>
Number of stops inside DE-BY not compliant with the Global ID:&nbsp;
{countStopsGtfsDeByNotDhid} ({countStopsGtfsDeBy !== 0 ? (countStopsGtfsDeByNotDhid / countStopsGtfsDeBy * 100).toFixed(3) : 'loading...'} %)
</p>
<p>
Number of stops inside DE-BW:&nbsp;
{countStopsGtfsDeBw}
</p>
<p>
Number of stops inside DE-BW not compliant with the Global ID:&nbsp;
{countStopsGtfsDeBwNotDhid} ({countStopsGtfsDeBw !== 0 ? (countStopsGtfsDeBwNotDhid / countStopsGtfsDeBw * 100).toFixed(3) : 'loading...'} %)
</p>
<h3>
<Link to="/stops-non-compliant">

View File

@ -2,9 +2,6 @@ import axios from 'axios';
import config from './config';
/*
*get stops-count-gtfs
*/
export async function getStopsCountGtfs(){
//console.log('stops:getStopsCountGtfs() Start...');
@ -22,9 +19,6 @@ export async function getStopsCountGtfs(){
return count;
};
/*
*get stops-count-gtfs-de
*/
export async function getStopsCountGtfsDe(){
//console.log('stops:getStopsCountGtfsDe() Start...');
@ -42,9 +36,6 @@ export async function getStopsCountGtfsDe(){
return count;
};
/*
*get stops-count-gtfs-de-not-dhid
*/
export async function getStopsCountGtfsDeNotDhid(){
//console.log('stops:getStopsCountGtfsDeNotDhid() Start...');
@ -62,9 +53,6 @@ export async function getStopsCountGtfsDeNotDhid(){
return count;
};
/*
*get stops-count-gtfs-de-hb
*/
export async function getStopsCountGtfsDeHb(){
//console.log('stops:getStopsCountGtfsDeHb() Start...');
@ -82,9 +70,6 @@ export async function getStopsCountGtfsDeHb(){
return count;
};
/*
*get stops-count-gtfs-de-hb-not-dhid
*/
export async function getStopsCountGtfsDeHbNotDhid(){
//console.log('stops:getStopsCountGtfsDeHbNotDhid() Start...');
@ -102,9 +87,6 @@ export async function getStopsCountGtfsDeHbNotDhid(){
return count;
};
/*
*get stops-count-gtfs-de-hh-not-dhid
*/
export async function getStopsCountGtfsDeHhNotDhid(){
//console.log('stops:getStopsCountGtfsDeHhNotDhid() Start...');
@ -122,9 +104,6 @@ export async function getStopsCountGtfsDeHhNotDhid(){
return count;
};
/*
*get stops-count-gtfs-de-ni-not-dhid
*/
export async function getStopsCountGtfsDeNiNotDhid(){
//console.log('stops:getStopsCountGtfsDeNiNotDhid() Start...');
@ -142,9 +121,6 @@ export async function getStopsCountGtfsDeNiNotDhid(){
return count;
};
/*
*get stops-count-gtfs-de-hh
*/
export async function getStopsCountGtfsDeHh(){
//console.log('stops:getStopsCountGtfsDeHh() Start...');
@ -162,9 +138,6 @@ export async function getStopsCountGtfsDeHh(){
return count;
};
/*
*get stops-count-gtfs-de-ni
*/
export async function getStopsCountGtfsDeNi(){
//console.log('stops:getStopsCountGtfsDeNi() Start...');
@ -182,3 +155,445 @@ export async function getStopsCountGtfsDeNi(){
return count;
};
export async function getStopsCountGtfsDeSh(){
//console.log('stops:getStopsCountGtfsDeSh() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-sh`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeSh() Done.');
return count;
};
export async function getStopsCountGtfsDeMv(){
//console.log('stops:getStopsCountGtfsDeMv() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-mv`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeMv() Done.');
return count;
};
export async function getStopsCountGtfsDeBb(){
//console.log('stops:getStopsCountGtfsDeBb() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-bb`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeBb() Done.');
return count;
};
export async function getStopsCountGtfsDeBe(){
//console.log('stops:getStopsCountGtfsDeBe() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-be`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeBe() Done.');
return count;
};
export async function getStopsCountGtfsDeSt(){
//console.log('stops:getStopsCountGtfsDeSt() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-st`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeSt() Done.');
return count;
};
export async function getStopsCountGtfsDeNw(){
//console.log('stops:getStopsCountGtfsDeNw() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-nw`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeNw() Done.');
return count;
};
export async function getStopsCountGtfsDeHe(){
//console.log('stops:getStopsCountGtfsDeHe() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-he`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeHe() Done.');
return count;
};
export async function getStopsCountGtfsDeSn(){
//console.log('stops:getStopsCountGtfsDeSn() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-sn`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeSn() Done.');
return count;
};
export async function getStopsCountGtfsDeTh(){
//console.log('stops:getStopsCountGtfsDeTh() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-th`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeTh() Done.');
return count;
};
export async function getStopsCountGtfsDeRp(){
//console.log('stops:getStopsCountGtfsDeRp() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-rp`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeRp() Done.');
return count;
};
export async function getStopsCountGtfsDeSl(){
//console.log('stops:getStopsCountGtfsDeSl() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-sl`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeSl() Done.');
return count;
};
export async function getStopsCountGtfsDeBy(){
//console.log('stops:getStopsCountGtfsDeBy() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-by`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeBy() Done.');
return count;
};
export async function getStopsCountGtfsDeBw(){
//console.log('stops:getStopsCountGtfsDeBw() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-bw`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeBw() Done.');
return count;
};
export async function getStopsCountGtfsDeShNotDhid(){
//console.log('stops:getStopsCountGtfsDeShNotDhid() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-sh-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeShNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeMvNotDhid(){
//console.log('stops:getStopsCountGtfsDeMvNotDhid() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-mv-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeMvNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeBbNotDhid(){
//console.log('stops:getStopsCountGtfsDeBbNotDhid() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-bb-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeBbNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeBeNotDhid(){
//console.log('stops:getStopsCountGtfsDeBeNotDhid() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-be-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeBeNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeStNotDhid(){
//console.log('stops:getStopsCountGtfsDeStNotDhid() Start...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-st-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeStNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeNwNotDhid(){
//console.log('stops:getStopsCountGtfsDeNwNotDhid() Nwart...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-nw-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeNwNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeHeNotDhid(){
//console.log('stops:getStopsCountGtfsDeHeNotDhid() Heart...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-he-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeHeNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeSnNotDhid(){
//console.log('stops:getStopsCountGtfsDeSnNotDhid() Snart...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-sn-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeSnNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeThNotDhid(){
//console.log('stops:getStopsCountGtfsDeThNotDhid() Thart...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-th-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeThNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeRpNotDhid(){
//console.log('stops:getStopsCountGtfsDeRpNotDhid() Rpart...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-rp-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeRpNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeSlNotDhid(){
//console.log('stops:getStopsCountGtfsDeSlNotDhid() Slart...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-sl-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeSlNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeByNotDhid(){
//console.log('stops:getStopsCountGtfsDeByNotDhid() Byart...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-by-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeByNotDhid() Done.');
return count;
};
export async function getStopsCountGtfsDeBwNotDhid(){
//console.log('stops:getStopsCountGtfsDeBwNotDhid() Bwart...');
let count=null;
try {
//TODO handle errors: https://www.valentinog.com/blog/await-react/
const address = `${config.API}stops-count-gtfs-de-bw-not-dhid`;
const res = await axios.get(address);
count=res.data[0].count;
} catch (err) {
console.error('err.message: ' + err.message);
count=-1;
}
//console.log('stops:getStopsCountGtfsDeBwNotDhid() Done.');
return count;
};

View File

@ -5,6 +5,10 @@
"version": "0.0.5",
"main": "index.js",
"keywords": [
"public",
"transport",
"mobility",
"delfi",
"react",
"webpack"
],