NeighborhoodInfoDC / General

General purpose data sets and formats
0 stars 0 forks source link

Step 2: create StantonCommons.sas #44

Closed maggiesu0725 closed 6 years ago

maggiesu0725 commented 6 years ago

@rpitingolo step 2 ready for review

rpitingolo commented 6 years ago

@maggiesu0725 thanks. I'll review.

rpitingolo commented 6 years ago

@maggiesu0725 I batched submitted stantoncommons.sas. Please keep this branch open and continue on to step 3.

rpitingolo commented 6 years ago

@maggiesu0725 I see your commits now and will review.

ptatian commented 6 years ago

@rpitingolo Rob, what is the status on this review? We need to get this wrapped up. Thanks

rpitingolo commented 6 years ago

@ptatian Understand. I'm checking on this.

maggiesu0725 commented 6 years ago

@rpitingolo weighting files are ready for review

rpitingolo commented 6 years ago

@maggiesu0725 I'm getting errors on all the programs. Did you get ERROR: [Calc_weights_from_blocks] Invalid or missing value of geography (geo2=STANTONCOMMONS) when you ran them?

rpitingolo commented 6 years ago

@ptatian can you please take a look at the error we're getting in the /weights/ programs? (error pasted above). We did all the previous steps so I'm stumped as to why it's not working.

ptatian commented 6 years ago

@rpitingolo @maggiesu0725 OK. I’ll have a look. It will be later today or tomorrow.

rpitingolo commented 6 years ago

@ptatian @maggiesu0725 Sure. Thanks

ptatian commented 6 years ago

@rpitingolo @maggiesu0725 The error message is being generated by the _%Calc_weights_fromblocks() macro, from this section of code:

  %if %sysfunc( putc( &geo2, $geoval. ) ) ~= %then %do;
    %let geo2suf = %sysfunc( putc( &geo2, $geosuf. ) );
    %let geo2name = %sysfunc( putc( &geo2, $geoslbl. ) );
    %let geo2dlbl = %sysfunc( putc( &geo2, $geodlbl. ) );
    %let geo2fmt = %sysfunc( putc( &geo2, $geoafmt. ) );
    %let geo2vfmt = %sysfunc( putc( &geo2, $geovfmt. ) );
  %end;
  %else %do;
    %err_mput( macro=Calc_weights_from_blocks, msg=Invalid or missing value of geography (geo2=&geo2). )
    %goto exit_macro;
  %end;

The key is the %if statement, which is checking whether the value passed to geo2= is the name of a valid geography based on the $geoval. format. It appears the $geoval. format has not yet been updated to include the STANTONCOMMONS geography. $geoval. is updated by Prog\Geo_level_formats.sas. This program needs to be batch submitted on L: to update the format. Once you do that, the weight programs should run properly.

Let me know if you have any other questions.

ptatian commented 6 years ago

@maggiesu0725 @rpitingolo Just as another note, branch names on GitHub are case sensitive so, in the future, please use only lowercase letters when creating branch names. Thank you.

maggiesu0725 commented 6 years ago

@rpitingolo I updated and ran the geo_level_formats file but it seems the geo levels are not updated since the weight program is giving me the same error.

rpitingolo commented 6 years ago

@maggiesu0725 OK. Let me take a look.

rpitingolo commented 6 years ago

@maggiesu0725 there are a bunch of errors in the Geo_level_formats.sas log. I am trying to troubleshoot.

rpitingolo commented 6 years ago

@ptatian Hi Peter. We are getting reapting values errors because of the highlighted cells in this file L:\Libraries\General\Doc\Geographic levels.xlsx

I honestly can't remember why we added the metro area block, bg and tract formats. Do we use them? It seems like the data to format macro won't work if there are duplicate rows like we have now. Thanks.

ptatian commented 6 years ago

OK, I'll take a look.

ptatian commented 6 years ago

@rpitingolo I'm out of the Excel file. As we agreed, we'll just delete the redundant metro versions of the block, block group, and tract geographic levels. One set is sufficient. Thanks!

rpitingolo commented 6 years ago

@ptatian got it. Thanks!

rpitingolo commented 6 years ago

@maggiesu0725 this looks good now. Please merge this pull request, do a final batch submission of the weights programs on L and close the issue. Thanks!