vincent

Easiest way to plot data on country map with python

匆匆过客 提交于 2020-01-22 10:08:52
问题 Could not delete question. Please refer to question: Shade states of a country according to dictionary values with Basemap I want to plot data (number of sick people for a certain year) on each state of Mexico. I am using jupyter notebook. So far I have seen several options and tutorials, but none seem to seem to explicitly explain how to plot the map of a country. Below I explain some options/tutorial I have seen and why they have not worked (this I do just to argue that tutorials are not

Easiest way to plot data on country map with python

て烟熏妆下的殇ゞ 提交于 2020-01-22 10:08:29
问题 Could not delete question. Please refer to question: Shade states of a country according to dictionary values with Basemap I want to plot data (number of sick people for a certain year) on each state of Mexico. I am using jupyter notebook. So far I have seen several options and tutorials, but none seem to seem to explicitly explain how to plot the map of a country. Below I explain some options/tutorial I have seen and why they have not worked (this I do just to argue that tutorials are not

Unable to plot using Vincent,

纵饮孤独 提交于 2019-12-24 02:17:06
问题 Slightly related to: Unable plot with vincent in IPython, yet none of the suggested solutions work for me. I'm using an IPython Notebook, also the latest version. I'm using python 3.4 and just installed the latest version of Vincent. When I try to plot the example in the documentation: import json import vincent vincent.initialize_notebook() world_topo = r'world-countries.topo.json' geo_data = [{'name': 'countries', 'url': world_topo, 'feature': 'world-countries'}] vis = vincent.Map(geo_data

Creating a multiline graph using Vincent

折月煮酒 提交于 2019-12-21 21:39:59
问题 I am attempting to create a multiline graph using Vincent. I have a csv file with the following layout: ,wk1,wk2,wk3,wk4,wk5,wk6,wk7,wk8,wk9 Tom J,97,65,82,65,101,84,79,71,83 Lisa R,95,87,95,65,61,78,93,95,56 Rich F,51,111,50,119,84,77,73,84,60 Anne E,63,68,89,70,95,80,56,75,82 Dan M,83,95,36,115,79,79,65,55,69 Mack W,67,89,72,79,47,64,113,94,33 Here is my code: import pandas as pd import vincent df = pd.read_csv('weekscores.csv', index_col=0) lines = vincent.Line(df) lines.axis_titles(x=

Vincent plots are not showing up, not receiving errors

被刻印的时光 ゝ 提交于 2019-12-20 02:54:49
问题 For some reason I am getting the below when I try and plot something with Vincent: <IPython.core.display.HTML at 0x10db19650> <IPython.core.display.Javascript at 0x10db19d50> Here's the code: import pandas as pd import vincent data = pd.read_csv('kd.csv') pd.set_option('display.max_columns', None) df = pd.DataFrame(data=[data['Age'], data['FG'], data['FGA'], data['3P'], data['3PA']]) df = df.T df[['FG', 'FGA', '3P', '3PA']] = df[['FG', 'FGA', '3P', '3PA']].astype(float) line = vincent.Line(df

Why Python Vincent map visuzalization does not map data from Data Frame?

ぐ巨炮叔叔 提交于 2019-12-10 10:34:55
问题 I am using Python vincent map visualization with the use of this package introductory examples. I work in ipython notebook . I defined simple pandas DataFrame with country FIPS codes (taken from here). Then I tried to map DataFrame data with vincent map by these FIPS codes, but resulted visualization fails to colour countries in any manner . How can I make it work? country_data_tmp = pd.DataFrame({'country_names' : np.array(['Argentina', 'Armenia', 'Australia', 'Austria']), 'country_FIPS' :

Why Python Vincent map visuzalization does not map data from Data Frame?

荒凉一梦 提交于 2019-12-06 05:02:10
I am using Python vincent map visualization with the use of this package introductory examples . I work in ipython notebook . I defined simple pandas DataFrame with country FIPS codes (taken from here ). Then I tried to map DataFrame data with vincent map by these FIPS codes, but resulted visualization fails to colour countries in any manner . How can I make it work? country_data_tmp = pd.DataFrame({'country_names' : np.array(['Argentina', 'Armenia', 'Australia', 'Austria']), 'country_FIPS' : np.array(['032', '051', '036', '040']), 'my_rate' : np.array([0.254, 0.3456, 0.26, 0.357])}) country

Unable to display Vincent sample maps; no suggested solutions work

限于喜欢 提交于 2019-12-05 04:35:58
问题 This is the same question as each of these questions, but none of the suggested solutions are working for me. I'm trying to make a US State map in Python with the Vincent package, as shown in this tutorial. I'm using the Canopy editor. When I run this code, nothing shows up in my console. There are no errors that appear. I've placed us_states.topo.json in my Python working directory. I updated Canopy and Vincent. I'm using vincent.core.initialize_notebook() as well as vis.display() like some

Vincent plots are not showing up, not receiving errors

情到浓时终转凉″ 提交于 2019-12-01 20:26:00
For some reason I am getting the below when I try and plot something with Vincent: <IPython.core.display.HTML at 0x10db19650> <IPython.core.display.Javascript at 0x10db19d50> Here's the code: import pandas as pd import vincent data = pd.read_csv('kd.csv') pd.set_option('display.max_columns', None) df = pd.DataFrame(data=[data['Age'], data['FG'], data['FGA'], data['3P'], data['3PA']]) df = df.T df[['FG', 'FGA', '3P', '3PA']] = df[['FG', 'FGA', '3P', '3PA']].astype(float) line = vincent.Line(df) line.display() This happens in IPython and Ipython Notebook. Any idea why? Not sure if you found