npm

npm’s 2019 JavaScript ecosystem survey analysis is now available! Get your copy here »

autocosts

6.0.16 • Public • Published

autocosts – car costs calculator

Build Status GitHub npm npm module downloads js-standard-style Dependency Status

This calculator allows users to find the true cost of owning a car. It will normally give them a good estimate of what they really need to spend on car ownership. As car payments and expenses come due throughout the year, it's often difficult to really get a good understanding of total spending on a car. This calculator also provides to the user, optionally, the car's full Financial Effort considering the user's income, further providing also optionally the equivalent public transport costs (bus, train, UBER, etc.), considering the user doesn't own a car.

Try it on your local machine

Install it and run it with the single command
npm i autocosts

it will open a http local server which you can access through http://localhost:3028

Website

https://autocosts.info

Playground

https://autocosts.info/XX

The list of available countries

https://autocosts.info/list

The translations are in corresponding json files, namely in the folder src/countries/.
The list of available countries is from the file src/countries/list.json

World statistics of Car Costs

https://autocosts.info/stats

How does it work?

Autocosts uses nodejs, expressjs and handlebars to supply a server application that renders a car costs calculator as a webpage loaded by any common browser.

The project is optimized for a web-based version, and for an APP developped in Apache Cordova. The 2 last letters on the URI stands for the 2-letter ISO country code, and not for the language, since for example United Kingdom and Australia have the same language but different realities concerning the taxes, the terms applied to automobile costs and the units for fuel efficiency. The translations/language files apply therefore only to the selected country.

The project already considers all the units and fuel efficiency cases, different in many countries. The variations for fuel efficiency are l/100km, km/l, mpg(US), mpg(imp) and for distance are km, miles and mil (Nordic mile=10km). More information can be found in the directory src/countries/.

For more information regarding how the costs are calculated, you can check the src/client/core/ which is based on the 12 items that form the car costs for any given country. Namely they are:

  • Standing costs
    • Depreciation
    • Car taxes
    • Insurance
    • Inspection
    • Car finance
  • Running costs
    • Fuel
    • Maintenance
    • Repairs and Improvements
    • Parking
    • Tolls
    • Fines
    • Car washes

Aditional services

Autocosts supports the following additional services, which can be enabled or disabled (default). After building with node build.js, run node bin/index.js -h for more information.

Database

Autocosts also supports code such that the user inputs might be stored into a mysql database. With the data from said database, it is also possible to make several statisitcal analysis, namely the average costs for each country, said statistical analysis having outlier removal techniques, such that such outliers do not distort the average.

Uber

Autocosts may use the UBER API, such that at the final repport, the user calculations can be compared with the equivalents costs if the user would use just UBER or combined with public transports.

Charts

Autocosts uses chartjs.org as it is free, open source and can be used offline.

PDF

Autocosts also allows the final report to be printed into a PDF report. It makes use of pdfmake npm package.

Credentials file

The credentials for the above services are in the JSON files stored in credentials/

Android APP

The Android APP can be found in Play Store. It uses Apache Cordova to convert JavaScript built code into APP built files (for example APK files in Android)

License

GNU GPLv3

Privacy

This calculator is and shall always be completely anonymous, as it doesn't request nor permanently store, any name, email, cookies, IP address nor any other personal information.

install

npm i autocosts

Downloadsweekly downloads

17

version

6.0.16

license

GPL-3.0

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability