Installing QGIS 3 on Ubuntu 16.04

QGIS 3.0 is out and from the blogs and tweets, it looks awesome. Some one asked me how to install QGIS 3.0 on Ubuntu 16.04, so here are the steps.

First, if you have previous version of qGIS, lets delete that

sudo apt-get autoremove qgis

sudo apt-get --purge remove qgis python-qgis qgis-plugin-grass

sudo apt-get autoremove

Now edit /etc/apt/sources.list by using the following command

sudo vi /etc/apt/sources.list

Note: Sudo is required because normal users do not have rights in /etc/apt/ folder.

Now this is where is trick is, instead of adding  debian or ubunutgis repositories add ubunutgis-nightly-release,  so add the following two lines in source. list

deb https://qgis.org/ubuntugis-nightly-release xenial main
deb-src https://qgis.org/ubuntugis-nightly-release xenial main

Rest is simple, first update

sudo apt-get update

and then install

sudo apt-get install qgis python-qgis qgis-plugin-grass saga

Thats it.

Some of the dependencies will not be there if we use ubuntugis-nightly-release repository reference.

Text Editors

In the last few years, I have tired many text editors like gedit, sublime, vi, vim and now Atom. You can read more about Atom on their website.

What I like about Atom is the packages, gedit and sublime also has packages (reference) for example I like cli panel in text editors, like Embedded Terminal in gedit

gedit

However, I needed a text editor that can support a cli and a webbrowser plugin (see the image below). Atom does that as it has a terminal-plus (don’t install it before you read the complete blog) and browser-plus.

Atom

Installation

Use the following commands on Ubunut to install Atom

sudo add-apt-repository ppa:webupd8team/atom

then

sudo apt update

sudo apt install atom

Packages

Some of the packages I like are (you can install them using atom builtin package manager or command line utility apm)

autocomplete-python 1.10.2
autocomplete-python-jedi
atom-bootstrap4 ver 1.4.0 

some other good autocomplete packages are

autocomplete-json

atom-django 0.3.2
django-templates

and some other packages

browser-plus 0.0.98
(open browser by using ctrl-alt-o)

emmet 2.4.3

linter-flake8 2.2.1

terminal-plus 0.14.5 (I had problems installing this one)

platformio-ide-terminal

Some Issue

Some installed packages could not be loaded because they contain native modules that were compiled for an earlier version of Atom like with terminal-plus package

Solution to terminal-plus package issue
https://github.com/jeremyramin/terminal-plus/issues/402

The solution worked on my unbunut 14 laptop, but I could not make it work on ubunut 16. I did some searching and then opted for “platformio-ide-terminal” as some one said it is not in development any more (the repo is at least one old https://github.com/jeremyramin/terminal-plus). The package “platformio-ide-terminal” works out of the box.

Note: For color change (in package setting), restart Atom after colors are changed.

if you want to remove atom, use the following command.

sudo apt remove --purge atom

What do you think, you want to give it a try.

Updates:

If you get an error like

Err:1 http://ppa.launchpad.net/webupd8team/atom/ubuntu xenial/main amd64 atom amd64 1.24.1-1~webupd8~0 
 Hash Sum mismatch

Do the following (reference)

sudo rm -rf /var/lib/apt/lists/*
sudo apt clean
sudo apt update

Principal Component Analysis 4 Dummies: Eigenvectors, Eigenvalues and Dimension Reduction

Nice one, simple explanation

George Dallas

Having been in the social sciences for a couple of weeks it seems like a large amount of quantitative analysis relies on Principal Component Analysis (PCA). This is usually referred to in tandem with eigenvalues, eigenvectors and lots of numbers. So what’s going on? Is this just mathematical jargon to get the non-maths scholars to stop asking questions? Maybe, but it’s also a useful tool to use when you have to look at data. This post will give a very broad overview of PCA, describing eigenvectors and eigenvalues (which you need to know about to understand it) and showing how you can reduce the dimensions of data using PCA. As I said it’s a neat tool to use in information theory, and even though the maths is a bit complicated, you only need to get a broad idea of what’s going on to be able to use it effectively.

View original post 1,535 more words

Install R on Ubuntu 12.04

R

Each time I install R, I have to read documentation. This time I decided to write my own small version of installation documentation. So here we go 🙂

Step 1 : Update your package repository so that you can get R 3.x

Use nano to open source.list (command below)

sudo nano /etc/apt/sources.list

Now update sources.list with the folling line (just insert at the bottom of file).

deb http://cran.rstudio.com/bin/linux/ubuntu precise/

and Ctrl X will take you out of nano, it will ask to save file say ‘Y’.

Add key to authenticate CRAN packages

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

otherwise you will get an error similar to this

W: GPG error: http://cran.rstudio.com precise/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY .................

Step 2: Now update packages by using the following command

sudo apt-get update

if you get message like

Reading package lists... Done

it means you are ready to go with installation. Run the command below

sudo apt-get install r-base

Now confirm by running R to see if it is working fine.

Good luck.

To install rgdal package, have a look at “Installing rgdal package for R3“.

To install R 3.2.0 on Ubuntu 140.4, following the instruction below.

http://cran.r-project.org/bin/linux/ubuntu/README