badwaterbay / intelli-trip-planner Goto Github PK
View Code? Open in Web Editor NEWRESTful API that intelligently recommends road trip routes, built with Python Flask and MongoDB.
License: BSD 3-Clause "New" or "Revised" License
RESTful API that intelligently recommends road trip routes, built with Python Flask and MongoDB.
License: BSD 3-Clause "New" or "Revised" License
The database can be implemented with SQ: (PostgreSQL or MySQL) or noSQL (such as MongoDB), whichever makes the most sense.
The database will be implemented with MongoDB.
Because it is difficult to pre-define the schema, given that:
Therefore, a noSQL database (such as MongoDB) is an ideal choice.
The database should include at least the following info:
Sub-issue of #15
Is your feature request related to a problem? Please describe.
Currently, the app can only calculate the optimal route by duration, aka, fastest route. I’d like to see a feature that can find the shortest route.
Initialize npm and add precommit hook to workflow (prettier, eslint, pretty-quick)
In src/app/app.js
, remove all console.log()
in app.js, including the ones that are commented out.
For example, remove console.log(response);
in line 37.
Currently, the optimization algorithm finds the shortest route, assuming that you don’t return back to the origin and you may end up at any destination at the end of the trip.
Task:
Add an option to return back to 'origin' at the end of the route, and account for that route’s duration in the algorithm.
Rewrite existing for-loops in src/html/app/intelligent-trip-planner/Apps.js with JavaScript’s forEach() method and/or arrow notations, wherever appropriate.
As far as I remember, most for-loops (if not all) can be rewritten with object-oriented and/or functional styles.
For example:
for (let i = 0; i < foodArray.length; i++) {
console.log(`i value: ${i} | Food Name:`, foodArray[i]);
}
// Result:
// i value: 0 | Food Name: { name: 'Burrito' }
// i value: 1 | Food Name: { name: 'Pizza' }
// i value: 2 | Food Name: { name: 'Burger' }
// i value: 3 | Food Name: { name: 'Pasta' }
The code above can be rewritten as:
foodArray.forEach((food, index) => {
console.log(`i value: ${index} | Food Name:`, food);
});
// Result:
// i value: 0 | Food Name: { name: 'Burrito' }
// i value: 1 | Food Name: { name: 'Pizza' }
// i value: 2 | Food Name: { name: 'Burger' }
// i value: 3 | Food Name: { name: 'Pasta' }
Add a Google Map and draw the route on the map
A distance matrix is a matrix of distances/durations between any 2 locations among a number of locations this.
The task is to add a small distance matrix, so that we can start develop the core functionalities, such as recommending trip routes.
Frankly, the existing UI is ugly. It barely has any CSS rules.
Tasks:
This is an open question. You can improve the UI to your taste.
This is also up for discussion.
If you're interested in working on this issue, please contact me. I have designed the data schema and some data in CSV files.
Is your feature request related to a problem? Please describe.
Design a small database for testing and development. For example, a limited number of National Parks or state parks in a given state.
Create a small database of 10-20 attractions, so that we can use it to develop core algorithms that can recommend road trip routes.
The area around Las Vegas is an ideal choice. There are many natural attractions within ~4 hours of driving, including Grand Canyon National Park, Death Valley National Park, Zion National Park, Bryce Canyon National Park, Horseshoe Bend, and Antelope Canyon.
Describe the solution you'd like
The database can be implemented in SQL (such as PostgreSQL or MySQL) or noSQL (such as MongoDB).
The database will be implemented with MongoDB.
Because it is difficult to pre-define the schema, given that:
Therefore, a noSQL database (such as MongoDB) is an ideal choice.
The database will include at least the following info:
Is your feature request related to a problem? Please describe.
Currently, the app only shows the most optimal route (fastest route).
Feature request: I want the web app to show me top 5 most optimal routes, instead of just 1.
We probably need to modify or rewrite existing logic to implement this feature.
If there are fewer than 5 total possible routes, show all possible routes.
In Python, range(0, x)
is equivalent to range(x)
, with x
being an integer.
Replace all range(0, x)
instances with range(x)
in all files in this repo.
At least, the following file contains range(0, x)
:
Please check if any other file contains range(0, x)
instances.
Please refer to contributing guidelines for environment setup and workflow.
Should you have any questions, please don't hesitate to comment under this issue.
Completing this issue will simplify our code.
In App.js, replace all var
with let
declarations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.