Giter VIP home page Giter VIP logo

marsja / jupyter Goto Github PK

View Code? Open in Web Editor NEW
104.0 10.0 124.0 5.57 MB

Repository containing Jupyter Notebooks for most of the blog posts on my blog. For example, there are data visualization, data manipulation, and data analysis code examples in the Notebooks

Home Page: https://www.marsja.se

Jupyter Notebook 100.00%
jupyter-notebooks pandas-dataframe-tutorial repeated-measures-anova anova rpy2 data-visualization rpy2-tutorial

jupyter's Introduction

Jupyter notebooks

In this folder you will find Jupyter Notebooks containing code examples for many of my blogposts (https://www.marsja.se). There are also notebooks containing the code for some of my Videos on my YouTube Channel. The main theme of the blog posts, right now, is data visualization, manipulation, and analysis using Python. For instance, you will find Pandas tutorials, Seaborn tutorials, and Statsmodels tutorials (e.g., Python ANOVA).

Pandas DataFrame Tutorial: Jupyter Notebooks

Here are different Notebooks containing the code examples for some of the Pandas Tutorials:

Working with DataFrame

Here you will find Jupyter notebooks, both R and Python right now, that focuses on how to work with data in specific ways.

Data Visualization in Python: Code Examples

Note books for different Data Visualization Tutorials:

Data Visualization in R: Code examples

Rpy2 Tutorial: Code Examples

For some data analysis techniques we may want to use R. This because it may not yet be implemented in Python. Here are some Jupyter Notebooks for one Python package called Rpy2:

Python Data Analysis Tutorials

In this section, we find the code examples, in the form of Jupyter Notebooks, for the Python data analysis tutorials;

Descriptive Statistics in Python

Here, there are some Jupyter Notebooks for carrying out summary statistics using Python, Pandas, Scipy, and other useful Python packages

T-test

ANOVA in Python and R

Here we have Python ANOVA Notebooks. There is also one Notebook for carrying out ANOVA using R.

Python ANOVA (Between Groups)

Python ANOVA (Within Group)

MANOVA in Python

Other

Tutorials, guides, and how tos (both Python and R) that doesn't fit into the above categories

jupyter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyter's Issues

Scraper is broken "How to Convert Python HTML to Jupyter NB" references a missing tag... https://github.com/marsja/jupyter/blob/master/convert_html_jupyter_notebook_tutorial.ipynb

The example on the website below does not work, because the article calls out a tag "post-content" that does not exist in the WordPress page.

The example does not scrape anything because "post-content" is missing from the Response object. The result of the "get_data()" function is a None object.

https://www.marsja.se/converting-html-to-a-jupyter-notebook/
https://github.com/marsja/jupyter/blob/master/convert_html_jupyter_notebook_tutorial.ipynb

The article needs to be updated so that the scraper actually works.

Here's where the article references the tag to parse.

5. Getting the Code Elements from the HTML

In the last step, we are creating a Python function called get_code. This function will take two arguments. First, the beautifulsoup object, we earlier created, and the content_class to search for content in. In the case, of this particular WordPress, blog this will be "post-content"


rpy2: unable to install packages

File: rpy2 tutorial example code.ipynb

This bit of code:

packageNames = ('afex', 'emmeans')
utils = rpackages.importr('utils')
utils.chooseCRANmirror(ind=1)

packnames_to_install = [x for x in packageNames if not rpackages.isinstalled(x)]

if len(packnames_to_install) > 0:
    utils.install_packages(StrVector(packnames_to_install))

results in this error:

R[write to console]: Installing packages into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

R[write to console]: Warning in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  :
R[write to console]: 
 
R[write to console]:  'lib = "/usr/local/lib/R/site-library"' is not writable

R[write to console]: Error in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  : 
  unable to install packages

R[write to console]: In addition: 
R[write to console]: Warning messages:

R[write to console]: 1: 
R[write to console]: In (function (package, help, pos = 2, lib.loc = NULL, character.only = FALSE,  :
R[write to console]: 
 
R[write to console]:  libraries ‘/usr/local/lib/R/site-library’, ‘/usr/lib/R/site-library’ contain no packages

R[write to console]: 2: 
R[write to console]: In (function (package, help, pos = 2, lib.loc = NULL, character.only = FALSE,  :
R[write to console]: 
 
R[write to console]:  libraries ‘/usr/local/lib/R/site-library’, ‘/usr/lib/R/site-library’ contain no packages

---------------------------------------------------------------------------
RRuntimeError                             Traceback (most recent call last)
<ipython-input-13-8999ff1bff9e> in <module>
      6 
      7 if len(packnames_to_install) > 0:
----> 8     utils.install_packages(StrVector(packnames_to_install))

/opt/anaconda3/lib/python3.7/site-packages/rpy2/robjects/functions.py in __call__(self, *args, **kwargs)
    190                 kwargs[r_k] = v
    191         return (super(SignatureTranslatedFunction, self)
--> 192                 .__call__(*args, **kwargs))
    193 
    194 

/opt/anaconda3/lib/python3.7/site-packages/rpy2/robjects/functions.py in __call__(self, *args, **kwargs)
    119             else:
    120                 new_kwargs[k] = conversion.py2rpy(v)
--> 121         res = super(Function, self).__call__(*new_args, **new_kwargs)
    122         res = conversion.rpy2py(res)
    123         return res

/opt/anaconda3/lib/python3.7/site-packages/rpy2/rinterface_lib/conversion.py in _(*args, **kwargs)
     26 def _cdata_res_to_rinterface(function):
     27     def _(*args, **kwargs):
---> 28         cdata = function(*args, **kwargs)
     29         # TODO: test cdata is of the expected CType
     30         return _cdata_to_rinterface(cdata)

/opt/anaconda3/lib/python3.7/site-packages/rpy2/rinterface.py in __call__(self, *args, **kwargs)
    771                     error_occured))
    772             if error_occured[0]:
--> 773                 raise embedded.RRuntimeError(_rinterface._geterrmessage())
    774         return res
    775 

RRuntimeError: Error in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  : 
  unable to install packages

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.