Polyglot COVID-19 Dashboard. Covid-19 data visualization with Ruby, Python, Rails, Chartkick, and PostgreSQL. The application I describe in this article uses COVID-19 data. I have used Python and Ruby, to extract, translate, and load a PostgreSQL database.
As a developer, you will be seeing numerous articles on Big Data, containers, complex algorithms, caching, etc. But the reality is that a lot of us still have to solve simple problems, especially if one is a freelance programmer or working with small companies.
A simple use case is that of data, coming in spreadsheets or CSV files, have to be visualized in a simple dashboard. You and the customer agree to build it as a web application. There are plentiful ways, from PHP to the Java-based Metabase, of implementing the solution. Since I have experience with Ruby on Rails (RoR or just Rails) and it has extensive easy-to-use libraries, it's my first go-to choice to build a web application real quick.
I used two data sources. The country-level data are from the GitHub COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at John Hopkins University. For my country, India, the state-level data are from covid19india.org.
There are two main differences in the input data. The global data from CSSE gives the daily cumulative data up until that date in a CSV file. The covid19india data comes as daily incremental data in JSON. The data format I wanted was: place, confirmed, deaths, and recovered.
For the global data, place is the country name, and for India, it is the state name. In order to process the input data, I wrote two scripts in Python and three in Ruby; their functionality is described below.
gdc.py: This Python program takes the CSSE daily CSV file as the input. These files are named date wise, for example, 11-10-2020.csv.
Web scraping allows us to extract information from web pages. In this tutorial, you'll learn how to perform web scraping with Python and BeautifulSoup.The internet is an absolutely massive source of data. Unfortunately, the vast majority if it isn’t available in conveniently organized CSV files for download and analysis. If you want to capture data from many websites, you’ll need to try web scraping.
In the programming world, Data types play an important role. Each Variable is stored in different data types and responsible for various functions. Python had two different objects, and They are mutable and immutable objects.
Hire Python Developer from us for Scalable, Secure & Robust Python Web development Solutions. Strict NDA | 16+ Years Exp| 2500+ Clients| 450+ Experts
World Web Technology, a Ruby and Python Development Company shares the exclusive comparison between ROR and Python Django. The ultimate source to understand the specialties of both frameworks. Read More…
In this article, you're going to learn the basics of web scraping in python and we'll do a demo project to scrape quotes from a website.