how to make a chart on country map by using python - python

I want to make a chart on any country's map by using python. For example: To make a record of Covid-19 infected or death toll of a country on that country map, what type of module or how can I do it?

First of all you need a data set as far as I understand. Data you can use for corona virus,
Corona virus data set
Download the csv files here.
Later,
With phyton, you can learn how to transfer to excel.
csv to excel
To make a graphic, to examine here.
pyhton chart

Matplotlib and Seaborn can help you with necessarily this.

Related

Assigning regions to countries in python with help of Pandas (or maybe other modules)

May I know if there is a way to assign countries in my dataframe to create another column "Regions" (like Asia, America, Europe,etc)? I found someone using geopy to get the wanted info like the regions, but is it possible to do without geopy?
Thanks a lot.
You can create a custom website parser to extract data from a website of choice, or google for existing downloadable tables with such data like this for example, and then load it into pandas dataframe.

Importing non-TMY3 format weather data for use in pvlib simulation

So I'm busy working on a project where i need to implement a PV system in Python. The best resource for this seems to be the pvlib module but I am a bit stuck on getting the appropriate weather data for this.
I need a whole year worth off information for a specific location, in this case Cape Town South Africa.
I am trying to get a TMY3 file for this, because pvlib accommodates this nicely, but the only data I am able to find is only American locations from NREL (https://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/tmy3/by_state_and_city.html). I can't find a TMY for other locations.
Here is the Jupyter notebook tutorial I'm using: https://nbviewer.jupyter.org/github/pvlib/pvlib-python/blob/master/docs/tutorials/tmy_to_power.ipynb
I found weather data for this location on other sites but they aren't in the format pvlib is looking for. Does pvlib just accommodate for USA? What options do I have?
pvlib does not care where you get your weather data from or where you want to do your modeling. You've selected an example where pvlib uses TMY data available in the US, but other examples use different data sources and locations. See, for example, the Intro Tutorial documentation that uses simulated clear sky data (including a Berlin location). Or the forecast documentation that uses data from weather forecast models (some US only, but one global). If you can get your data into python, pvlib can use it.

How to find distribution of a grouped column with respect to another column in excel?

Excel newbie and aspiring Data analyst, I have this data and I want to find the distribution of City wise Shopping Experience. The column M has the shopping experience rated from 1 to 5.
What I tried
I am not able to google how to do this at all. I tried running correlation, but the in-built excel data analysis tool does not let me run it on non-numeric data, and I am not able to group the City cells either. I thought of replacing every city with numeric alias but I don't know how to do that either. How to search, or go ahead with this problem?
Update: I was thinking of some way to get this out of the cities column.
I am thinking this is better done in python.
How about something like this, have just taken the cities and data to show averageif, sumif and countif:
I used Data validation to provide the list to select from.

Creating Multiple Candlestick charts from a csv file

I am trying to create multiple candlestick charts for given date ranges which I have a list of in Excel. I have OHLC daily price data and need to use this data to create roughly 1100 charts.
I would like these charts to be in a printable format after they have been created.
Also, I would like horizontal lines on each chart, as specified prices.
Any help would be much appreciated.
I recommend you check out pypi for the python package index. Some useful packages you should look into are Pandas, MatPlotLib, and xlrd. If you have a specific question about code that you're working on, please come back and ask.

Hub and Spoke indication using Python

Situation
Our company generates waste from various locations in US. The waste is taken to different locations based on suppliers' treatment methods and facilities placed nationally.
Consider a waste stream A which is being generated from location X. Now the overall costs to take care of Stream A includes Transportation cost from our site as well treatment method. This data is tabulated.
What I want to achieve
I would like my python program to import excel table containing this data and plot the distance between our facility and treatment facility and also show in a hub-spoke type picture just like airlines do as well show data regarding treatment method as a color or something just like on google maps.
Can someone give me leads on where should I start or which python API or module that might best suite my scenario?
This is a rather broad question and perhaps not the best for SO.
Now to answer it: you can read excel's csv files with the csv module. Plotting is best done with matplotlib.pyplot.

Categories

Resources