Skip to content

COVID19-MAP with circular marks in every country using Python Folium with Choropleth Map (total cases & total recovered) and Heat Map (total death)

Notifications You must be signed in to change notification settings

mariobgsp/covid-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COVID19-MAP

A COVID-19 MAP based on Total Death and Total Active Cases on every country in the world by coursera project networks

here is the full line of code covid-map1.ipynb, the dashboard would look like this,

Code Breakdown

importing modules

Python modules that i used for this project including,

  • json to convert data from API
  • folium to generate map in this project
  • request & http.client to get Access of the Data via API
  • pandas to normalize the data

modules

Accessing and Normalize the Data

After importing modules, we're trying to acces Data via API the sites that i'm using for API is from covid19api.com using these line of code, to access data, to convert Data to JSON, and Normalize data using python pandas

load_database

imported dataframe would be like this,

dataframe_API

you can drop unnecessary columns to make data processing easier, but if you're not just don't (optional)

dropping_columns

Visualize Data

Generating Base Map

After that we're trying to generate base map using folium modules, using Stamen Terrain tiles, and trying to obtain geodata from here

generate_basemap full line of code at covid-map.ipynb

Generating Choropleth Map

Now we're trying to generate choropleth map too, the purpose of choropleth map is to provide an easy way to visualize how measurement (height) varies across a geographic area or show the level of variability region 1

generate_choropleth full line of code at covid-map.ipynb

and then we're trying to visualize circular markers which show the total confirmed and total recovered in every country, and merge it with choropleth map.

Datasets of longitude and latitude of every country you can get in here

generate_cm full line of code at covid-map.ipynb

Choropleth map with circular marker will look like this, the circular markers describe Total Confirmed Case & Total Recovered in every country. choropeth_with_cm full line of code at covid-map.ipynb

Generating Heat Map

Generating Base Map with Black and White colours to make heat map visualize better, and adding a heat map layer, the line of code would be like this,

baseforheat full line of code at covid-map.ipynb

generate_basemap_for_heatmap full line of code at covid-map.ipynb

Now we're adding Circular Marker to Heat Map, line of code would be like this,

heat_with_circlemarks full line of code at covid-map.ipynb

and the Final Heat Map which only showing total death, would be like this,

heatmap_totaldeath.jpg full line of code at covid-map.ipynb

End Line of Code

mariobgsp 
newbie to programming worlds
November 2020

About

COVID19-MAP with circular marks in every country using Python Folium with Choropleth Map (total cases & total recovered) and Heat Map (total death)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published