Coder Social home page Coder Social logo

gadm36_to_sql_and_csv's Introduction

Convert GADM36 Code List to usable SQL script and importable CSV data

Introduction

The GADM36 Code List is freely provided in these links:

List Name Information CSV File
Global, Region, Country here here
Global - Admin 1 here here
Global - Admin 2 here here
Global - Admin 3 here here

The problem is some people need to use these data with SQL. So I write the schema of necessary tables and some PowerShell script to generate tabular data for these tables, using SQLite 3.

Prerequisites

Command Line Shell For SQLite v3.37.0+

Run this line to check if you have sqlite3:

sqlite3 --version

SQLite v3.37.0+ is needed for STRICT table supports. If you do not have the Command Line Shell For SQLite in your system, refer to the official website for installation instruction.

Internet connection

Internet connection is necessary to download CSV files from FAO sites as mentioned in the Introduction.

Run

In PowerShell:

git clone https://github.com/hnthap/gadm36_to_sql_and_csv.git
Set-Location gadm36_to_sql_and_csv
./main.ps1

After it's done, you will have your resulted files appeared in the out/ directory.

Licenses

This reposity is licensed under MIT License. See the file LICENSE for more.

The GADM36 Code List data is licensed under CC BY 4.0 DEED of the Hand-in-Hand Initiative.

gadm36_to_sql_and_csv's People

Contributors

hnthap avatar

Watchers

 avatar

gadm36_to_sql_and_csv's Issues

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.