Python Mobile App
I am writing this post to document the process I'm about to journey on while developing my app with Python and the Kivy framework. I am planning on building an app that shows a certain population of individuals in a given area. I am not going to go into the specifics of the app just yet in fear that someone is either already working on this or will beat me to it. 😁
These will be a series of posts documenting the process all the way through a fully functioning application. This post is just a summary of the tools and frameworks I will be using along the way.
Python
I know that I am undoubtedly hearing some of you reading this saying "Python?!! For Mobile development? But...why?!" The short answer is simple, I love Python. I love the elegance of the language as well as the libraries and modules that have been created over the years. I want to create a data visualization application and I thought what better language to do that in than Python? Python is the language of choice for most Data Scientists and since this will be a data science project I will be using Python for both logical and graphical implementations of the application. Kivy is great for creating graphics with Python. More on Kivy later. If you are following along with this series later on and decide you want to mirror this project but with another language of your choice by all means I encourage you to do so. I believe that JavaScript has some pretty good Data Visualization libraries that one could put to use but I didn't want to have the hassle of pairing one of them up with React Native. That might be a painful experience that I am not quite ready to face.
Kivy
For those of you that are unaware of the Kivy framework it is a really great framework that has popped up in recent years for handling cross platform graphical user interface(GUI) design. It is built on OpenGL which means it can handle anything from 3D games to basic forms and everything in between. The library is a little bit of a hassle to setup the first time but once you have it installed you are ready to rock. I have used it in the past where I developed a neat Self Driving Car application to play around with my Self Driving Car algorithm that I was training to learn how to drive. Using Kivy I was able to create several buttons that allowed you to clear the screen, run the app or stop the app. You were also able to draw any kind of road you could think of with a route going from the top left corner to the bottom right corner and back. Doing this would force the car on the screen to find the best path.
Android Studio:
I am building this application on a Windows machine so I will be using Android Studio during the development process to handle emulating the device. I am using it because it will allow me the opportunity to test what I am building on an Android device which acts and functions just like an actual phone. If you have ever downloaded an emulator of your favorite old skool console to play on PC, in my case it would be the N64, they allow you to trick your computer into thinking that it is an actual N64 and you can then load and play some of your favorite games from that console era. Now macOS has a similar feature with Xcode called Simulator however from my experience I am not able to download anything from the App store whereas with the Android Emulator I have a fully working phone from browsing the web to installing apps through the Play store.
PyCharm:
I know above I mentioned Android Studio, which is an IDE similar to PyCharm, but that is only for the emulation process. I don't plan on writing code using Android Studio. I am not for certain but I don't believe Android Studio has support for Python or the Python Interpreter so I will be using PyCharm to handle the development with Kivy. I am choosing PyCharm over something like VS Code because with PyCharm I am able to create a virtual environment very easily for my Python projects which will help the application to live and not be affected by other projects or Python updates that I may install at a later date.
TensorFlow 2.0 and other Data Science Libraries:
Since this is a Data Science project after all I will be using the tools of the trade if you will. I will be using Jupyter Notebook, DataLore by JetBrains, or Google Colab for testing the datasets and handling all of the machine learning tasks which will then be implemented in the app once I have them all working properly in the sandbox environment that these tools help create.
PostgreSQL:
I have decided on the PostgreSQL database. I have become a huge fan of PostgreSQL as of late but I started out using MongoDB for anything database related in my projects. PgAdmin makes working with any database easy to use and the console commands you can run from the command line are extremely helpful. I haven't heard any comments over at dev.to but I was doing some database work on my own using a MongoDB instance with Robo3t and creating and manipulating the same database using PostgreSQL and PgAdmin and I found that I was able to accomplish tasks much faster with PostgreSQL vs Mongo. Plus if I want to publish this as a website with say Django I have experience using Postgres with Django.
Conclusion
This is going to be a really fun project. It will be a tough project as I am not sure how readily available the datasets are that I will need in order to complete the project, however I am pretty confident that I will be able to get something working and hopefully keep it up to date for the foreseeable future. Thanks.
Top comments (0)