[Utopian-data] Switched the database to MySQL, added access_data() for query use and resolved several important issues.
utopian-io·@jestemkioskiem·
0.000 HBD[Utopian-data] Switched the database to MySQL, added access_data() for query use and resolved several important issues.
 [source](https://steemit.com/utopian-io/@vitruvianman/cinematic-intro-for-utopian-io-or-adobe-after-effect-and-premiere) # Utopian-data [github repository](https://github.com/utopian-io/utopian-data) ##### What is the project about? This tool uses https://api.steemit.com and [https://api.utopian.io/](https://api.utopian.io/api/stats) as well as coinmarketcap to fetch all the interesting Utopian related data that could in future be tied to it's growth and properly analyzed. It was created out of curiosity, but per demand of @wehmoen has now been rewritten to handle more data with a better database (MongoDB/MySQL over SQLite), as well as save more data than just liquid steem value of all Utopian accounts. As such, the code is now a part of the official Utopian-io company on Github. ### New Features ##### What feature(s) did you add? [66ddbde1](https://github.com/utopian-io/utopian-data/commit/6ddbde1a9700349f14c8addb83802dbbcfcca605), [f0f6acf](https://github.com/utopian-io/utopian-data/commit/f0f6acfc03ac72c834b2614f6ddb3ae4baeb6cb0), [d160fc4](https://github.com/utopian-io/utopian-data/commit/d160fc454f58ea9fa652f710ccd50291392c28af), [b1e2d59](https://github.com/utopian-io/utopian-data/commit/b1e2d59a7b307adb9037c6bba5c3ca5c3c60195f), [d5fc7e0](https://github.com/utopian-io/utopian-data/commit/d5fc7e01b7218dc98eac1014b6a8e0b305fc0cec), [45cc0d3](https://github.com/utopian-io/utopian-data/commit/45cc0d3bbe2648e28fde294774485237557b8ee7); ###### MySQL database - Switched MongoDB related code to MySQL code. The decision was made to drop support for MongoDB and moving it to a different branch, while changing all code to support MySQL. This will help a more broad public interact with the database, as SQL is far more popular than Mongo. ###### Other - Added ```access_data()``` for users that want to run this script in real time. The ```access_data()``` function takes in a SQL querry as an argument and returns the outcome of it, reducing the number of lines of code necessary to run every time it's requested. - Fixed an issue where timestamps wouldn't work and databases had to use unix instead. - Switched unix to UTC Timestamp. - Added more comments and improved code clarity ever so slightly. ##### The future! The database is currently being deployed in a form of an API that everyone will be able to connect to with HTTP requests. This is likely the last update to the project, but it's soon to be deployed on utopian.info in a form of interactive charts and graphs that you can hopefully put custom queries into. ##### How to contribute? You can contribute by Pull Requests on the official Github repository. You can also contact me on Discord at Jestemkioskiem#5566 to ask questions about this project and/or the code. <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@jestemkioskiem/utopian-data-switched-the-database-to-mysql-added-accessdata-for-query-use-and-resolved-several-important-issues">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>