How to use GeoPandas and Leaflet?

Image for post
Image for post
Photo by Марьян Блан | @marjanblan on Unsplash

There are several geographic libraries that are available for plotting location information on a map. I’ve previously written about the same topic here but since then I’ve used these libraries more extensively as well as got introduced to new ones. After using and examining several libraries, I found that GeoPandas and the Leaflet libraries are two of the most easy to use and highly customizable libraries. The code is available as a GitHub repo:

Dataset

The dataset is taken from Kaggle. It includes the population density (population per square Km) for various countries across the world. …


HDF5 to CSV conversion

Image for post
Image for post
Photo by Mr Cup / Fabien Barral on Unsplash

In my last article, I discussed the steps to download NASA data from GES DISC. The data files downloaded are in the HDF5 format. HDF5 is a file format, a technology, that enables the management of very large data collections. Thus, it is quite popular for storing information. For getting NASA’s data, please check the below article first:

Whenever I work with datasets, I’m most comfortable with CSV files. Thus, once I got the HDF5 files, I decided to look for ways to change them to CSV files. I found the package h5py in Python, which enables the reading in…


Accessing GES DISC data files

Image for post
Image for post
Photo by NASA on Unsplash

NASA provides an extensive library of data points that they’ve captured over the years from their satellites. These datasets include temperature, precipitation and more. NASA hosts this data on a website where you can search and grab information as needed, whether you want the data for the whole world or a specific area. The user can choose a certain range of dates, look for aggregate time frames (hours, days, months etc.). The possibilities are limitless.

In this article, let’s explore this huge resource and I’ll describe a step-by-step process to collect data from the website.

GES DISC

GES DISC stands for NASA…


Python lists are powerful 💪🏻

Image for post
Image for post
Photo by Emma Matthews Digital Content Production on Unsplash

Last week I started to go over some of the Python basics and decided that I would create a repository where I’d create a notebook for everything I revised. This shall enable me to go to a single place whenever I had to go over some topics again in the future.

Last week I went over Python lists and this article includes a portion of the things in the notebook, highlighting the key functions to be used with Python lists. I’ll continue to create these notebooks as and when I get a chance to go through other topics.

Reverse a list — []

We can…


Exploring face detection with masks

Image for post
Image for post

Yesterday, I was talking to a friend regarding developing a model that could detect masks on faces. Based on some insights she gave me, I started looking for datasets with masks. But then a question struck my mind!

Will we have to update all our face models to accommodate face detection with masks on?

I was intrigued to find the answer and honestly expected that my previous model would probably fail at this. Let’s see what I found in my research.

iPhone Face ID


Resize and concatenate images easily in Python

Image for post
Image for post
Photo by Hitesh Choudhary on Unsplash

I was recently working on a project that involved manipulating images so we could run an unsupervised machine learning algorithm on it. Being a Python fanboy, rather than going the Photoshop route, I decided to use Python and its libraries to do the manipulation for me.

In this article, I highlight how I used the Image sub module in PIL to create the images I needed for my project.

Gather images

I took two images for this article, both from Unsplash. I particularly used different sized images so we can access how different sized images might interact with one other.


COVID disparities across United States

Image for post
Image for post
COVIDMINDER

For the past one month, I’ve been actively working with my research team to explore the data around COVID and develop a visualization tool to understand the disparities across United States. We recently released the first iteration of the application COVIDMINDER which includes disparities in mortality rates, test cases, diabetes, and hospital beds across United States, with a special focus on New York.

In this post, we’ll explore the various tabs in some detail and see how the app was designed. Also, the application is constantly evolving and you might see many more features and tabs if you’re reading this…


Creating a progress bar in Python

Image for post
Image for post
Photo by Jungwoo Hong on Unsplash

For the past one month, I’ve been working with a fellow researcher to create a python package. Creating a python package involves some voila and some frustrating moments. While we’ll discuss the python package creation process some other time, today we’ll learn about progress bars in Python.

Need for progress bars

Honestly, if you work with minimal information (data) at a time, progress bars would never really enter your workflow. But for cases such as iterating over a dataset, encoding large sets of information, or training a model, progress bars can be very handy.

  1. They provide you with an estimate of the progress that…


Using Anaconda for Python virtual environments

Image for post
Image for post
Photo by National Cancer Institute on Unsplash

If you’ve been following me or have read a few of my articles, you must know that I am a big fan of Python Virtual Environments. I’ve written about this before as well which you can read here and since then almost all of my projects include requirements.txt file for anyone else to easily replicate my work.

I’ve worked with several virtual environment managers but never really gave much attention to Anaconda. However, now I need to work with the conda environments for my daily college work. Here, the recommended way to work is with virtual environments and my fellow…


Data, dashboards and the next step

Image for post
Image for post
Photo by CDC on Unsplash

On first thought, it might seem absurd how someone could have ever predicted such a pandemic or how today’s data may be used in the future but what most people don’t realize is that while COVID-19 is new, Coronavirus itself is not new (it has happened before and can happen again too). Coronavirus has long been discovered and what we hear about today, the COVID-19, is just another (in the layman terms) variation of it.

This article is based on inferences drawn on the data available as of March 23, 2020. I’ll enlist a few data sources, and dashboards. …

Karan Bhanot

Data science and Machine learning enthusiast. Technical Writer. Passionate Computer Science Engineer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store