Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from pulp import *
import pandas as pd
import numpy as np
import time
'''
# You can uncomment this code block if you would like to import
@d3netxer
d3netxer / osmnx_create_od.ipynb
Created March 31, 2018 18:52
osmnx_create_od.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Instructions to manually install OpenStreetMap-Carto and Kosmtik

I had trouble launching a desktop version of Ubuntu 16.04 on vagrant. On top of this, it takes me a long time to build a base image using Packer. Instead my strategy will be to create and launch a base 16.04 desktop using only VirtualBox. I will first manually record the steps to install all of the required software. Once everything works, I will try automating everything just by using Ansible.

tip: Inserting the Guest Images disk was not working on Ubuntu 16.04. Read this link for more info: https://forums.virtualbox.org/viewtopic.php?f=6&t=85186 What I did was follow these steps:

  1. Clean install and ran apt-get update && apt-get dist-upgrade followed with a reboot.
  2. Rename /lib/modules/4.13.0-16-generic/kernel/ubuntu/vbox to vbox.old and reboot the guest.
@d3netxer
d3netxer / data-gov-csw-howto.rst
Created January 23, 2018 23:26 — forked from kalxas/data-gov-csw-howto.rst
Data.gov CSW HowTo
@d3netxer
d3netxer / Installing_OSMNX.md
Last active January 12, 2018 20:57
Installing_OSMNX.md

I first created an Ubuntu 16.04.3 desktop virtual box. It will need a decent amount of storage space, probably at least 15GB (I did 100GB).

Then I installed mini-conda. You need to download the installation file (I used wget), then install it (ex. bash Miniconda-3-latest-linux-x86_64.sh)

Now after reopening the terminal, you should be able to use conda and issue the following commands:

conda config --add channels conda-forge
conda create --yes -c conda-forge -n OSMNX python=3.6 osmnx

Install latest QGIS on Ubuntu 16.04

  1. Create a new Virtual Box with the latest Ubuntu desktop iso
  2. start up box and make sure Guest Additions are installed to have copy and paste between guest and host machines
  3. Follow these commands (from https://gis.stackexchange.com/questions/133033/installing-latest-qgis-version-on-ubuntu)

** If you are using another version of Ubuntu such as 18.04, replace 'xenial' with the proper Ubuntu version name (e.g., 'bionic' for ubuntu 18.04).

sudo sh -c 'echo "deb http://qgis.org/debian xenial main" >> /etc/apt/sources.list' 

Installing QGIS Server on Ubuntu 16.04

sudo apt-get update

edited the /etc/apt/sources.list file and added:

deb https://qgis.org/debian xenial main deb-src https://qgis.org/debian xenial main

(I don't think this step is needed: sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable)