Code Monkey home page Code Monkey logo

cocoa's People

Contributors

odadoun avatar tjbtjbtjb avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

odadoun

cocoa's Issues

France et DomTom

on ne fait pas de distinguo entre France et DOMTOM. Du coup tout est centré sur la France metropolitaine ...

Almost no docstring given in covid19 functions

There's a lack of docstring in covid19, especially explaining the kwargs in those function.

As an example csv_to_pandas_index_location_date(), pandas_index_location_date_to_jhu_format().
Or even get_stats() where no docstring at all is given.

'world' from 'cocoa'

from cocoa import world as cw


ImportError Traceback (most recent call last)
in
----> 1 from cocoa import world as cw

ImportError: cannot import name 'world' from 'cocoa' (../cocoa/init.py)

Rhoooo : "UK" return everything except ... United Kindom

This is a Brexit stuff ?? :-)
/Users/dadoun/Programs/Python/CoCoA/cocoa/geo.py:171: UserWarning: Caution. More than one country match the key "UK" : ['Ukraine, ', 'Latvia, ', 'Uganda, ', 'Albania, ', 'Japan, ', 'Thailand, ', 'Tuvalu, ', 'Indonesia, ', 'Canada, ', 'Croatia, ', 'Philippines, ', 'Slovenia, ', 'Tanzania, United Republic of, ', 'Algeria, ', "Korea, Democratic People's Republic of, ", 'Korea, Republic of, ', 'Russian Federation, ', 'Bhutan, ', 'Micronesia, Federated States of, ', 'Iraq, ', 'Marshall Islands, ', 'Saudi Arabia, ', 'Dominica, ', 'Egypt, ', 'Cambodia, ', 'Morocco, ', 'Turkey, '], using first one.

', using first one.\n')

cc.plot reload database

using the front end cc.plot reload all the time the database and this is not needed (wasting time). This due to the fact that we don't to use constructor ...

countries with None geometries

Here JHU countries where there are no geometries
Are you aware of that ?
location geometry
3 Andorra None
7 Antigua and Barbuda None
17 Bahrain None
24 Barbados None
38 Comoros None
39 Cabo Verde None
46 Dominica None
69 Grenada None
91 Saint Kitts and Nevis None
98 Saint Lucia None
99 Liechtenstein None
106 Monaco None
109 Maldives None
111 Marshall Islands None
120 Mauritius None
148 Singapore None
152 San Marino None
156 Sao Tome and Principe None
162 Seychelles None
178 Holy See (Vatican City State) None
179 Saint Vincent and the Grenadines None

Value Error raised with cocoa.covid19.get_stats() function with the 'jhu' database

Consider the piece of code :

import cocoa.covid19 as co
jhu =  co.DataBase('jhu')
pd=jhu.get_stats(which='confirmed',type='Cumul',location='FRA',output='pandas')
pd.head()

We got the error output below. What's the trouble with the syntax ?

JHU aka Johns Hopkins database selected ...
Available keys words are :  ['deaths', 'confirmed', 'recovered']
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-cef69dad9529> in <module>
      1 jhu =  co.DataBase('jhu')
----> 2 pd=jhu.get_stats(which='confirmed',type='Cumul',location='FRA',output='pandas')
      3 pd.head()

~/Dropbox/Git/CoCoA/cocoa/covid19.py in get_stats(self, **kwargs)
    305             i+=1
    306         if output == "pandas":
--> 307             babypandas = pd.DataFrame(data[0])
    308             for i in range(1,len(clist)):
    309                 df=pd.DataFrame(data[i])

~/.local/lib/python3.8/site-packages/pandas/core/frame.py in __init__(self, data, index, columns, dtype, copy)
    433             )
    434         elif isinstance(data, dict):
--> 435             mgr = init_dict(data, index, columns, dtype=dtype)
    436         elif isinstance(data, ma.MaskedArray):
    437             import numpy.ma.mrecords as mrecords

~/.local/lib/python3.8/site-packages/pandas/core/internals/construction.py in init_dict(data, index, columns, dtype)
    252             arr if not is_datetime64tz_dtype(arr) else arr.copy() for arr in arrays
    253         ]
--> 254     return arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
    255 
    256 

~/.local/lib/python3.8/site-packages/pandas/core/internals/construction.py in arrays_to_mgr(arrays, arr_names, index, columns, dtype)
     62     # figure out the index, if necessary
     63     if index is None:
---> 64         index = extract_index(arrays)
     65     else:
     66         index = ensure_index(index)

~/.local/lib/python3.8/site-packages/pandas/core/internals/construction.py in extract_index(data)
    363             lengths = list(set(raw_lengths))
    364             if len(lengths) > 1:
--> 365                 raise ValueError("arrays must all be same length")
    366 
    367             if have_dicts:

ValueError: arrays must all be same length

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.