Skip to content

Commit

Permalink
Add data for agriculture land use area and handle condition for geogr…
Browse files Browse the repository at this point in the history
…aphy area which have no corresponding data
  • Loading branch information
amitness committed Jul 21, 2019
1 parent ca5fea4 commit 7f3994e
Show file tree
Hide file tree
Showing 9 changed files with 7,675 additions and 9 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ wazimap[gdal]==0.8.2
GDAL==2.1.3
Shapely==1.5.17
whitenoise==3.3.1
SQLAlchemy==1.2.19
62 changes: 62 additions & 0 deletions sql/agriculture_land_use.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

--
-- PostgreSQL database dump
--

-- Dumped from database version 9.5.14
-- Dumped by pg_dump version 9.5.14

SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;


ALTER TABLE
IF EXISTS ONLY public.agriculture_land_use
DROP CONSTRAINT
IF EXISTS agriculture_land_use_pkey;
DROP TABLE IF EXISTS public.agriculture_land_use;


SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: agriculture_land_use; Type: TABLE; Schema: public; Owner: wazimap_np
--

CREATE TABLE public.agriculture_land_use
(
geo_level character varying(15) NOT NULL,
geo_code character varying(10) NOT NULL,
"Agricultural land use area" character varying(128) NOT NULL,
total integer NOT NULL
);


ALTER TABLE public.agriculture_land_use
OWNER TO wazimap_np;

--
-- Data for Name: agriculture_land_use; Type: TABLE DATA; Schema: public; Owner: wazimap_np
--

\copy public.agriculture_land_use ("Agricultural land use area",total,geo_code,geo_level) FROM 'sql/csv/agricultural-land-use-area.csv' DELIMITER ',' CSV HEADER;

--
-- Name: agriculture_land_use_pkey; Type: CONSTRAINT; Schema: public; Owner: wazimap_np
--

ALTER TABLE ONLY public.agriculture_land_use
ADD CONSTRAINT agriculture_land_use_pkey PRIMARY KEY (geo_level, geo_code, "Agricultural land use area");


--
-- PostgreSQL database dump complete
--
Loading

0 comments on commit 7f3994e

Please sign in to comment.