GEOG 319/658 November 24, 2014. Planning Data & Metadata Geography Programming Feedback, repeat as needed.

Slides:



Advertisements
Similar presentations
AHEAD HTML Accessibility Topics: Keyboard Accessibility Content and Structure Links Headings and Lists Images in HTML Pages Tables Forms.
Advertisements

Issues in Designing a Confidentiality Preserving Model Server by Philip M Steel & Arnold Reznek.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Database management system (DBMS)  a DBMS allows users and other software to store and retrieve data in a structured way  controls the organization,
PHP Hypertext Preprocessor Information Systems 337 Prof. Harry Plantinga.
Course for teachers covering: HTML, CSS, JavaScript, JQuery PHP, PHP/MySQL
1 Topic 6 Processing Form Input. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction Form.
GIS Level 2 MIT GIS Services
Geodatabase basic. The geodatabase The geodatabase is a collection of geographic datasets of various types used in ArcGIS and managed in either a file.
HED 460 Geographic Information Systems Cartographers Geographers Business managers Marketing strategists Financial analysts Professional planners.
Multiple Tiers in Action
GIS A geographic information system. A GIS is most often associated with a map. A GIS is most often associated with a map. The map is a display of a data.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Lecture 5 Geocoding. What is geocoding? the process of transforming a description of a location—such as a pair of coordinates, an address, or a name of.
Lecture 4 Geodatabases. Geodatabases Outline  Data types  Geodatabases  Data table joins  Spatial joins  Field calculator  Calculate geometry 
Preventing SQL Injection ~example of SQL injection $user = $_POST[‘user’]; $pass = $_POST[‘pass’]; $query = DELETE FROM Users WHERE user = ‘$user’ AND.
Web Programming – Java Script Association of Computing Activities Computer Science and Engineering Indian Institute of Technology Kanpur.
Attribute Data in GIS Data in GIS are stored as features AND tabular info Tabular information can be associated with features OR Tabular data may NOT be.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
JavaScript is a client-side scripting language. Programs run in the web browser on the client's computer. (PHP, in contrast, is a server-side scripting.
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
FUNCTIONS AND STORED PROCEDURES & FUNCTIONS AND PROTECTING A DB AND PHP (Chapters 9, 15, 18)
CSCI 6962: Server-side Design and Programming Java Server Faces Components and Tags.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
GIS Tutorial 1 Lecture 4 Geodatabases. Outline  Data types  Geodatabases  Data table joins  Spatial joins  Field calculator  Calculate geometry.
Accessing MySQL with PHP IDIA 618 Fall 2014 Bridget M. Blodgett.
Intro to GIS and ESRI Trainers: Randy Jones, GIS Technician, Douglas County Jon Fiskness, GISP GIS Coordinator, City of Superior.
JavaScript – Quiz #9 Lecture Code:
PHP and MySQL CS How Web Site Architectures Work  User’s browser sends HTTP request.  The request may be a form where the action is to call PHP.
Microsoft Access Database Software.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
GIS 1 GIS Lecture 4 Geodatabases Copyright – Kristen S. Kurland, Carnegie Mellon University.
Damian Tamayo Tutorial DTM Data Generator Fall 2008 CIS 764.
PHP Form Introduction Getting User Information Text Input.
Web Design: Basic to Advanced Techniques Fall 2010 Mondays 7-9pm 200 Sutardja-Dai Hall Introduction to PHP.
Security Considerations Steve Perry
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
Intro to GIS & Pictometry Trainers: Randy Jones, GIS Technician, Douglas County Jon Fiskness, GISP GIS Coordinator, City of Superior.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
Form Handling IDIA 618 Fall 2014 Bridget M. Blodgett.
PHP Error Handling & Reporting. Error Handling Never allow a default error message or error number returned by the mysql_error() and mysql_errno() functions.
Javascript JavaScript is what is called a client-side scripting language:  a programming language that runs inside an Internet browser (a browser is also.
Server-Side Solutions Steve Perry
U.S. Census Data & TIGER/Line Files
CSC 405: Web Application Engineering II8.1 Web programming using PHP What have we learnt? What have we learnt? Underlying technologies of database supported.
Creating Databases applications for the Web: week 2 Basic HTML review, forms HW: Identify unique source for asp, php, Open Source, MySql, Access.
How Web Database Architectures Work CPS181s April 8, 2003.
Use of Standardized Metadata to Find, Select and Access Statistical Data - Experience of Statistics Canada - Joint UNECE/Eurostat/OECD Work Session on.
A Demographic Profile of Texas Counties in the Hill Country Alliance Prepared by: Texan Demographics Consulting Group.
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
Forest Inventory Mapmaker Pat Miles NE FIA Users Group Meeting.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Thematic Mapping with Google Maps. "US-KS":{code:"US-KS", name:"Kansas", center:{lat: ,lng: },
Data Storage & Editing GEOG370 Instructor: Christine Erlien.
Unit 4 Working with data. Form Element HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons,
HTML LAYOUTS. CONTENTS Layouts Example Layout Using Element Example Using Table Example Output Summary Exercise.
INTRODUCTION ABOUT DIV Most websites have put their content in multiple columns. Multiple columns are created by using or elements. The div element is.
Introduction to GIS Programming Final Project Submitted by Todd Lenkin Geography 375 Spring of 2011 American River College.
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
Databases.
Geography 385 Introduction to ArcGIS Web Application Design
Web Systems Development (CSC-215)
In Class Programming BIS1523 – Lecture 11.
Web Maps with Leaflet GEOG 319/658 November 24, 2014.
Tutorial 6 PHP & MySQL Li Xu
PHP Forms and Databases.
Presentation transcript:

GEOG 319/658 November 24, 2014

Planning Data & Metadata Geography Programming Feedback, repeat as needed

Start by outlining the project: What is the purpose of the map? Who are the intended users? What features are needed?

Gather data Gather or produce metadata Design and create MySQL tables

Define geographic scope/scale of map Determine required map layers Collect boundaries or XY data Convert boundary data, as needed

Write code Write more code Test Write more code

Relational database with 4 tables for data 1 table for metadata 1 table for boundaries

Social Characteristics (DP2) GEOID GEOID2 GEOLABEL HC01_VC03 … HC04_VC209 Economic Characteristics (DP3) GEOID GEOID2 GEOLABEL HC01_VC04 … HC04_VC175 Housing Characteristics (DP4) GEOID GEOID2 GEOLABEL HC01_VC03 … HC04_VC199 Demographic Characteristics (DP5) GEOID GEOID2 GEOLABEL HC01_VC03 … HC04_VC98 Metadata File Type Variable Description Units dec_places Universe Topic Detail1…Detail4 Boundaries GEOIDTXT GEOIDNUM Name INTPTLAT INTPTLON COORDINATES COORDINATES2

Social Characteristics (DP2) GEOID GEOID2 GEOLABEL HC01_VC03 … HC04_VC209 Economic Characteristics (DP3) GEOID GEOID2 GEOLABEL HC01_VC04 … HC04_VC175 Housing Characteristics (DP4) GEOID GEOID2 GEOLABEL HC01_VC03 … HC04_VC199 Demographic Characteristics (DP5) GEOID GEOID2 GEOLABEL HC01_VC03 … HC04_VC98 Metadata File Type Variable Description Units dec_places Universe Topic Detail1…Detail4 Boundaries GEOIDTXT GEOIDNUM Name INTPTLAT INTPTLON COORDINATES COORDINATES2

SELECT * FROM ACS12_METADATA Returns all 2,035 rows and 12 columns in this table

SELECT Description FROM ACS12_METADATA WHERE FILE="DP02" AND variable="HC01_VC03";

SELECT a.namelsad, b.HC01_VC03, c.* FROM GeoJSON_Tracts AS a, ACS12_5YR_DP02 AS b, ACS12_METADATA AS c WHERE b.geoid2= AND b.geoid2=a.geoidnum AND c.variable="HC01_VC03" AND c.file="DP02"

GeoJSON is a format for communicating geographic data that includes some properties and pairs of coordinates. A point can be simply represented as [ , ]

A line can be represented as [ [-105, 40], [-110, 45], [-115, 55] ]

A polygon can be represented as [[ [ , 48.99], [-97.22, 48.98], [-96.58, 45.94], [ , 45.94], [ , 48.99] ]]

Link to the Leaflet CSS

Link to the Leaflet JavaScript

Put a div element where you want the map on the page.

Start putting elements on you map. Background tile Point Circle Polygon Popup Event Set view and scale

PHP works inside HTML and generates the page on the fly. The simplest example is:

SAFETY PRECAUTION – if you allow users to enter anything, your application is open to hacking or malicious use. To help prevent misuse, escape potentially harmful characters and validate input.

Connect to MySQL Run addslashes Check for and validate user input HTML/Javascript to set up page with Leaflet Query MySQL Use PHP to write Javascript for Leaflet based on query results

var KCMOtracts =[{ "type": "Feature", "properties": { "STATEFP": "20", "COUNTYFP": "059", "TRACTCE": "954100", "GEOIDTXT": " ", "GEOID2": , "GEOLABEL": "Census Tract 9541, Franklin County, Kansas", "LABEL": "6,935 +/-312 ", "VALUE": 6935}, "geometry": { "type": "Polygon", "coordinates": [ [ [ , ], [ , ], …, [ , ] ] ] } }, … (repeat for 534 remaining Census Tracts)

Xan Wedel Senior Research Data Engineer Institute for Policy & Social Research 607 Blake Hall