Code Monkey home page Code Monkey logo

Comments (6)

gtnx avatar gtnx commented on August 19, 2024

Hi shivaram
Thanks for contributing. Could you make a pull request?
Thanks

from pandas-highcharts.

shivramp avatar shivramp commented on August 19, 2024

I have emailed you

the modified core.py and a sample usage python program.

from pandas-highcharts.

shivramp avatar shivramp commented on August 19, 2024

Hi Guillaume Thomas,
Attached is the updated core,py

Work with Python 3Made APIs more generic cab called by pandas or non-panda by passing X_LIST and Y_LIST to be plotted as two separate list.Added support for 'pie' plot.
A sample usage / help program :===================================================================#!/usr/local/bin/python3.4

Note : This Example is run through "ipython nootebook", need to run "ipython nootebook"# using the Python 3 version installed in your machine.

import pandas as pdfrom urllib.request import urlopenfrom IPython.display import display, display_pretty, Javascript, HTMLfrom py_hicharts import serialize

df = pd.read_csv( urlopen('http://www.quandl.com/api/v1/datasets/ODA/DEU_PCPIPCH.csv?column=1'))

df["Date"] = df["Date"].apply(lambda x: int(x[:4]))df = df.sort("Date")#print(df) ; print ('\n')

x_list = df['Date'].tolist() # If this does not work try df['Date'].get_values().tolist() inp_list = df['Value'].tolist()output_json_dict = {}
output_json_dict = serialize(inp_list, "germany rate", output_json_dict, title="Germany inflation rate", x_title="collection year", x_categories=x_list, y_title="Inflation rate", render_to="chart1")

This is to show that you can add different y-serieschart = serialize(inp_list, "new germany rate", output_json_dict, "add_series", "get_new_hichart")

display(HTML("""

<script type="text/javascript">%(chart)s</script>""" % locals()))

pie chart examplepie_name_list = ["Firefox", "IE", "Chrome", "Saafari", "Opera", "Others"]pie_value_list = [45, 26.8, 12.8, 8.5, 6.2, 0.7]

output_json_dict={} chart = serialize(pie_value_list, "Browsershare", output_json_dict, "get_new_hichart", title="Browsershare", x_title="Browser names", x_categories=pie_name_list, y_title="browser use percentage", kind="pie",render_to="chart5")

display(HTML("""
<script type="text/javascript">%(chart)s</script>""" % locals()))

Date: Wed, 4 Mar 2015 15:33:14 -0800
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [pandas-highcharts] Upgrading to Python 3 and adding support for pie chart (#11)

Hi shivaram

Thanks for contributing. Could you make a pull request?

Thanks


Reply to this email directly or view it on GitHub.

from pandas-highcharts.

shivramp avatar shivramp commented on August 19, 2024

Hi Guillaume.

I am not familiar with pull request, let me know what I need to do.
I have given you all changes I did.

from pandas-highcharts.

gtnx avatar gtnx commented on August 19, 2024

Please read this about pull requests.
I added support for py3.4. If it's ok for you, could you close the issue?

from pandas-highcharts.

gtnx avatar gtnx commented on August 19, 2024

I added support for pie chart. I close the issue

from pandas-highcharts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.