+ All Categories
Home > Documents > DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN...

DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN...

Date post: 11-Jan-2016
Category:
Upload: philippa-palmer
View: 227 times
Download: 9 times
Share this document with a friend
22
DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1
Transcript
Page 1: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

DRIVER CountyQCEW Public Data

SQL1Import 2

CSVImport 1

County GDP Wage

New 3

Import NAICS OCEAN

Import Census

Zips

Final Sums New 1

Page 2: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

SQL 1

AREA_NALL1 – AREA_NALL30NONP1 – NONP4

NONPFIPS1 – NONPFIPS30STATESALL1 – STATESALL30

STATEFIPSALL1 – STATEFIPSALL30

Create Macro VARS for Program – to Run data

based on Value of Parameter during

Execution

Page 3: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

area_n States statefips_a

02000 AK 02

01000 AL 01

06000 CA 06

09000 CT 09

10000 DE 10

12000 FL 12

13000 GA 13

15000 HI 15

17000 IL 17

18000 IN 18

22000 LA 22

25000 MA 25

24000 MD 24

23000 ME 23

26000 MI 26

27000 MN 27

28000 MS 28

37000 NC 37

33000 NH 33

34000 NJ 34

36000 NY 36

39000 OH 39

41000 OR 41

42000 PA 42

44000 RI 44

45000 SC 45

48000 TX 48

51000 VA 51

53000 WA 53

55000 WI 55

FIPS SAS DATASET CONTENTS:AREA_N = 5 BYTES USED AS AREA, FIPS

STATES = 2 BYTES USED AS STATE ABREVIATIONSTATEFIPS_A = 2 BYTES STATE IDENTIFIER IN FIPS

When ITERATION = 1 then the following will be resolved in the macro variables:

AREA_NALL1 = 02000STATESALL1 = AKSTATEFIPSALL1 = 02

This is because these are the values in the FIRST ROW of the SAS Dataset.

When ITERATION = 2 then the following will be resolved in the macro variables:

AREA_NALL1 = 01000STATESALL1 = ALSTATEFIPSALL1 = 01

This is because these are the values in the SECOND ROW of the SAS Dataset.

NOTE1:

Macro Variable : &OFIPS contains 30 2 byte Numeric FIPS CODE for States in Ocean Economy

Page 4: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

Industry Code and Ocean Indicator File

This data contains INDUSTRY CODE and Y N

Indicator of whether CODE is OCEAN Y, or Not N.

N

Y

DO NOT Use Industry Code

Use Industry Code

INDUSTRY CODE data is located in TABLES Directory with name: INDUSTRY_CODES.xls.

SAS Dataset: INDUSTRY_CODES is located in SASDatasetsInputs directory.

*If a change needs to be made to the table ensure to update the SAS Dataset.

*NOTE2: Macro Variable &OCN_CDS contains list of all Industry Codes with Y

Page 5: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

4 Y5 Y7 Y8 Y9 Y10 N11 Y14 N15 N16 N17 N18 N19 Y20 N21 N22 Y23 N24 Y26 Y27 N28 N

29 N30 N31 N32 N33 N34 N35 Y37 N38 N39 Y40 N41 N42 N43 Y44 Y45 N46 N47 N48 N49 N50 N

51 N52 N53 N54 N56 N57 N59 N60 N61 Y62 N64 N65 N66 N68 N69 N70 N71 Y75 Y76 Y77 N78 N

Industry Code and Y N Indicator if Used in Ocean Economy Report

Page 6: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

22 10 Utilities23 11 Construction42 34 Wholesale44 35 Retail45 35 Retail55 62 Management61 66 Education81 77 Other Services92 78 Government

111 4 Crop and Animal112 4 Crop and Animal113 5 Forestry Fishing114 5 Forestry Fishing115 5 Forestry Fishing211 7 Oil and Gas212 8 Mining213 9 Mining Support321 14 Wood Products327 15 Nonmetallic Mfg331 16 Primary Metals332 17 Fabricated Metals333 18 Machinery334 19 Computer and Electronics335 20 Electrical337 23 Furniture339 24 Misc Mfg

311 NA 26 Food312 NA 26 Food313 NA 27 Textiles314 NA 27 Textiles315 NA 28 Apparel316 NA 28 Apparel322 NA 29 Paper323 NA 30 Printing324 NA 31 Petroleum Mfg325 NA 32 Chemicals326 NA 33 Plastics481 NA 37 Air Transport482 NA 38 Rail Transport483 NA 39 Water Transport484 NA 40 Truck Transport485 NA 41 Transit486 NA 42 Pipelines487 NA 43 Other Transport488 NA 43 Other Transport492 NA 43 Other Transport493 NA 44 Warehousing511 NA 46 Warehousing512 NA 47 Motion Pictures515 NA 48 Broadcasting and Telecom517 NA 48 Broadcasting and Telecom518 NA 49 Info and Data Processing519 NA 49 Info and Data Processing521 NA 51 Federal Reserve522 NA 51 Federal Reserve523 NA 52 Securities524 NA 53 Insurance525 NA 54 Funds and Trusts531 NA 56 Real Estate532 NA 57 Rental and Leasing533 NA 57 Rental and Leasing

2 and 3 Digit NAICS Codes and GDP CODE Mapping.

Page 7: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

561 64 Admin and Support562 65 Waste Management621 68 Amulatory Health622 69 Hospitals and Nursing623 69 Hospitals and Nursing624 70 Social Assistance711 71 Arts and Museums712 71 Arts and Museums713 71 Amusements Gambling Recreation721 75 Accomodations722 76 Food Services

3361 21 Motor Vehicle3362 21 Motor Vehicle3363 21 Motor Vehicle3364 22 Other Trans Equip3365 22 Other Trans Equip3366 22 Other Trans Equip3369 22 Other Trans Equip

5411 59 Legal5415 60 Computer Systems Design5412 61 Other Prof Sci and Tech Services5413 61 Other Prof Sci and Tech Services5414 61 Other Prof Sci and Tech Services5416 61 Other Prof Sci and Tech Services5417 61 Other Prof Sci and Tech Services5418 61 Other Prof Sci and Tech Services5419 61 Other Prof Sci and Tech Services

3 and 4 Digit NAICS Codes and GDP CODE Mapping.

Page 8: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

Data from NAICSOCEAN.CSV file Located in TABLES Directory

Ocean Indicator Ocean Sector NAICS Code NOEP_ICODE NOEP_SCODE OCEAN_SCODE OCEAN_ICODE

Marine Related Construction Construction 237990 CO01 CO00 10 11Total Construction 999999 CO00 CO00 10 99Fish Hatcheries & Aquaculture Living Resources 112511 LR04 LR00 20 22Fish Hatcheries & Aquaculture Living Resources 112512 LR04 LR00 20 22Fish Hatcheries & Aquaculture Living Resources 112519 LR04 LR00 20 22Fishing Living Resources 114111 LR03 LR00 20 21Fishing Living Resources 114112 LR03 LR00 20 21Fishing Living Resources 114119 LR03 LR00 20 21Total Living Resources 999999 LR00 LR00 20 99Seafood Processing Living Resources 311711 LR01 LR00 20 23Seafood Processing Living Resources 311712 LR01 LR00 20 23Seafood Markets Living Resources 445220 LR05 LR00 20 24Oil & Gas Exploration Minerals 211111 MI02 MI00 30 32Oil & Gas Exploration Minerals 211112 MI02 MI00 30 32Limestone, Sand & Gravel Minerals 212321 MI04 MI00 30 31Limestone, Sand & Gravel Minerals 212322 MI04 MI00 30 31Oil & Gas Exploration Minerals 213111 MI02 MI00 30 32Oil & Gas Exploration Minerals 213112 MI02 MI00 30 32Total Minerals 999999 MI00 MI00 30 99Oil & Gas Exploration Minerals 541360 MI02 MI00 30 32Total Ocean Economy 999999 AL00 AL00 90 99

Page 9: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

Scenic Water Tours Tourism & Recreation 487210 TO09 TO00 50 56Amusement & Recreation Services Tourism & Recreation 487990 TO08 TO00 50 58Amusement & Recreation Services Tourism & Recreation 532292 TO08 TO00 50 58Amusement & Recreation Services Tourism & Recreation 611620 TO08 TO00 50 58Zoos & Aquaria Tourism & Recreation 712130 TO10 TO00 50 59Zoos & Aquaria Tourism & Recreation 712190 TO10 TO00 50 59Marinas Tourism & Recreation 713930 TO02 TO00 50 55Amusement & Recreation Services Tourism & Recreation 713990 TO08 TO00 50 58Hotels & Lodging Places Tourism & Recreation 721110 TO06 TO00 50 53Hotels & Lodging Places Tourism & Recreation 721191 TO06 TO00 50 53RV Parks & Campgrounds Tourism & Recreation 721211 TO07 TO00 50 54Eating & Drinking Places Tourism & Recreation 722110 TO04 TO00 50 52Eating & Drinking Places Tourism & Recreation 722211 TO04 TO00 50 52Eating & Drinking Places Tourism & Recreation 722212 TO04 TO00 50 52Eating & Drinking Places Tourism & Recreation 722213 TO04 TO00 50 52Warehousing Transportation 4931 TR01 TR00 60 65Search & Navigation Equipment Transportation 334511 TR03 TR00 60 64Marine Freight Transportation 483111 TR02 TR00 60

61Marine Passenger Transportation Transportation 483112 TR04 TR00 60 62Marine Freight Transportation 483113 TR02 TR00 60

61Marine Passenger Transportation Transportation 483114 TR04 TR00 60 62Marine Transportation Services Transportation 488310 TR07 TR00 60 63Marine Transportation Services Transportation 488320 TR07 TR00 60 63Marine Transportation Services Transportation 488330 TR07 TR00 60 63Marine Transportation Services Transportation 488390 TR07 TR00 60 63Total Transportation 999999 TR00 TR00 60 99Total Ocean Economy Total 999999 AL00 AL00 90 99

Page 10: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

OCEAN SAS Dataset

Sorted by NAICS:Contains:OCEANINDOCEANSECTNAICSNOEP_ICODENOEP_SCODEOCEAN_ICODEOCEAN_SCODE

IMPORT_NAICS_OCEAN

NAICSOcean.csv INFILE STATEMENT IN SAS PROGRAM

Read Data from CSV into SAS Dataset

Contents of OCEAN Dataset

Note 3 Macro Variable &ONAICS created here is list of NAICS codes used in Ocean Economy Reporting.

Page 11: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

IMPORT1

INFILE STATEMENT IN SAS PROGRAMALLSTA09.csv

STPUB.ALLSTATE09

Read Data from CSV into SAS Dataset

Contains:AREAOWNNAICSYEARAGGLVLANNSTATESTABSEMPWAGESFIPS_STSTATEFIPSFIPSSTATE

Contents of STPUB.ALLSTATE09 Dataset

IF FIPS IN OCEAN FIPS LIST (&OFIPS) * See NOTE1 in SLIDE 3.

Page 12: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

IMPORT2_CSV

INFILE STATEMENT IN SAS PROGRAMGDP RGDP 09 ALL REVISED.CSV

STPUB.GDP09_ALL

Read Data from CSV into SAS Dataset

Contains:FIPSINDUSTRY_CODEGDPRGDP

Contents of STPUB.GDP09_ALL Dataset

IF FIPS IN OCEAN FIPS LIST (&OFIPS) * See NOTE1 in

SLIDE 3. AND INDUSTRY_CODE IN (&OCN_CDS) * See NOTE2 in SLIDE 4.

Page 13: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

COUNTY_GDP_WAGE_NEW3

INFILE STATEMENT IN SAS PROGRAMENOW_GEO_REFERENCE.CSV

ENOW

Read Data from CSV into SAS Dataset

Contains:FIPSCOUNTY_NAMEREGIONSTATE_FIPSCOUNTY_FIPSCZCTYFEMAWATERSHEDSHORESHORE100WAREHOUSEMINERALSURBANINFLUENCENONPRURALURBAN

Contents of ENOW Dataset

IF FIPS IN OCEAN FIPS LIST (&FIPS) * See NOTE1 in SLIDE 3. ITERATES FROM 1 TO 30 SO FIRST ITERATION WILL BE FOR 02- (AK Alaska)

STEP 1.

Note 1. Macro Variable &OAREAS is list of FIPS per STATE – Based on which iteration, 1-30. So for 02 (AK) will be list of AREAS for OCEAN Economy in AK.

Page 14: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

COUNTY_GDP_WAGE_NEW3

INFILE STATEMENT IN SAS PROGRAMCN02AK09.CSV

AK09_QCEWCTY

Read Data from CSV into SAS Dataset

Contains:AREAOWNNAICSYEARAGGLVLANNSTATESTABSEMPWAGESNAICS2NAICS3NAICS4COUNTY_NAMESTATEFIPS

Contents of AK09_QCEWCTY Dataset

IF AREA IN OCEAN AREA LIST (&OAREAS) * See Note 1

SLIDE 13. AND NAICS IN (&ONAICS) * See Note 3 in SLIDE 10.

STEP 2.

Page 15: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

COUNTY_GDP_WAGE_NEW3

USE FORMATS TO MAP GDPCODE TO NAICS 2 3 AND 4 IN SAS PROGRAM STEP 3.

AK09_QCEWCTY

NAICS3 &GDP_B FORMAT

NAICS2 &GDP_A FORMAT

NAICS4 &GDP_C FORMAT

NEW VARIABLE - GDPCODE

Page 16: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

COUNTY_GDP_WAGE_NEW3

STEP 4.MERGE OCEAN ENOW AND AK09_QCEWCTY IN SAS PROGRAM

AK09_QCEWCTY Merge By NAICS OCEAN Merge By FIPS ENOW

AK09_CTYOCEAN

Page 17: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

COUNTY_GDP_WAGE_NEW3

STEP 5.GET GDP RGDP AND WAGES TOTAL FOR STATE TOTAL

STPUB.ALLSTATE09

STPUB.GDP09_ALL

Where FIPS = 02 AK First Iteration

Where AREA = 02000 AK First Iteration

See Step 3 to Create GDP Code from NAICS 2 3 and 4

GDP_AK09

Statewage_AK09 Statewage_AK09

SUMMARY BY GDPCODE VAR WAGES

Page 18: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

COUNTY_GDP_WAGE_NEW3

STEP 6.MERGE GDP_AK09 with STATEWAGE_AK09 IN SAS PROGRAM

GDP_AK09 Merge By GDPCODE

STATEWAGE_AK09

GDPWAGES_AK09

Contains:GDPCODETOTGDPTOTRGDPTOTWAGES

Page 19: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

COUNTY_GDP_WAGE_NEW3

STEP 7.MERGE AK09_CTYOCEAN with GDPWAGES_AK09 IN SAS PROGRAM

AK09_CTYOCEAN Merge By GDPCODE

GDPWAGES_AK09

AK09_CTY

Contents of Data:AREA OWN NAICS YEAR AGGLVL ANNSTAT ESTABS EMP WAGES NAICS2 NAICS3NAICS4 FIPS STATE COUNTY_NAMEFLAG OCEANIND OCEANSECTNOEP_ICODE NOEP_SCODE OCEAN_ICODEOCEAN_SCODE REGION CZCTY FEMA WATERSHEDSHORE SHORE100 WAREHOUSE MINERALSURBANINFLUENCE NONP RURALURBANGDPCODE TOTGDP TOTRGDP TOTGAGES STATE

Page 20: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

Contents of Data:AREAOWNNAICSYEARAGGLVLANNSTATESTABSEMPWAGESNAICS2NAICS3NAICS4FIPSSTATECOUNTY_NAMEFLAGOCEANINDOCEANSECTNOEP_ICODENOEP_SCODEOCEAN_ICODEOCEAN_SCODEREGIONCZCTYFEMAWATERSHEDSHORESHORE100WAREHOUSEMINERALSURBANINFLUENCENONPRURALURBAN

SAS DATASETS: AK09_CTYOCEAN and CTYPUB.AK09_CTYOCEAN. SAME DATA IN BOTH.

Page 21: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

Contents of Data:

FIPS STATE COUNTY_NAME REGION OCEANSECT OCEANIND OCEAN_SCODENOEP_SCODE WAGES EMP ESTABS GDP RGDP FLAG CZCTY FEMA WATERSHED SHORE SHORE100 URBANINFLUENCE NONP RURALURBANWAREHOUSE MINERALS

SAS DATASETS: CTYPUB.AK09_CTY_DETAIL

Contents of Data:

FIPS STATE COUNTY_NAME REGION OCEANSECT OCEANIND OCEAN_SCODENOEP_SCODE WAGES EMP ESTABS GDP RGDP FLAG CZCTY FEMA WATERSHED SHORE SHORE100 URBANINFLUENCE NONP RURALURBANWAREHOUSE MINERALS

SAS DATASETS: CTYPUB.AK09_CTY_DETAIL1 - where:If oceanind = “Warehousing” and shore = 0 then delete;If ocean_scode = 30 and Minerals =1 then delete;If ocean_scode = 50 and shore = 1 and shore100 = 0 and nonp = 0 then delete;

Page 22: DRIVER County QCEW Public Data SQL1 Import 2 CSV Import 1 County GDP Wage New 3 Import NAICS OCEAN Import Census Zips Final Sums New 1.

COUNTY_GDP_WAGE_NEW3

SUMMARIZE AK09_CTY IN SAS PROGRAM STEP 8.

AK09_CTY

SUMMARIZE DATA

CTYPUB.AK09_CTY_DETAIL


Recommended