-
Notifications
You must be signed in to change notification settings - Fork 0
data for internet access Analysis #42 #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
maggiesu0725
wants to merge
19
commits into
master
Choose a base branch
from
analysis-#42
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
0ec5a82
initial setup
maggiesu0725 65c5c16
map
maggiesu0725 8bcdd91
create program to make maps
maggiesu0725 10a1ebb
distinguish internet and broadband access
maggiesu0725 01d4a2f
incorporate code to Rmarkdown document
maggiesu0725 9911dd1
add css for urban theme
maggiesu0725 760ef24
update internet access
maggiesu0725 38e6b18
blog
maggiesu0725 b01be19
minor change
maggiesu0725 74e3557
update code
maggiesu0725 201d024
update code
maggiesu0725 45b011a
minor fix
maggiesu0725 6b12567
minor update
maggiesu0725 53e5bb9
update maps and charts for blog
maggiesu0725 269a5e6
reorganize ideas
maggiesu0725 c43433b
missing semicolon on libname
lhendey b46ff32
Update Blog ideas_internet access.Rmd
lhendey 478e855
minor update
maggiesu0725 31b692a
more code on chart
maggiesu0725 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,3 +63,5 @@ Prog/Temp/ | |
| # Other | ||
| *.bat | ||
| Thumbs.db | ||
| .Rproj.user | ||
| .Rhistory | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,177 @@ | ||
| /************************************************************************** | ||
| Program: Internet Access.sas | ||
| Library: Requests | ||
| Project: NeighborhoodInfo DC | ||
| Author: Yipeng Su | ||
| Created: 3/13/19 | ||
| Version: SAS 9.4 | ||
| Environment: Local Windows session | ||
|
|
||
| Description: | ||
|
|
||
| **************************************************************************/ | ||
|
|
||
| %include "L:\SAS\Inc\StdLocal.sas"; | ||
|
|
||
| ** Define libraries **; | ||
| %DCData_lib( ACS ); | ||
| %DCData_lib (RegHsg); | ||
|
|
||
| %let year= 2013_17; | ||
|
|
||
| proc format; | ||
| value Jurisdiction | ||
| 0= "Total" | ||
| 1= "DC" | ||
| 2= "Charles County" | ||
| 3= "Frederick County " | ||
| 4="Montgomery County" | ||
| 5="Prince Georges " | ||
| 6="Arlington" | ||
| 7="Fairfax, Fairfax city and Falls Church" | ||
| 8="Loudoun" | ||
| 9="Prince William, Manassas and Manassas Park" | ||
| 10="Alexandria" | ||
| ; | ||
| run; | ||
|
|
||
| data ACSall; | ||
| set acs.Acs_&year._va_sum_tr_tr10 acs.Acs_&year._dc_sum_tr_tr10 acs.Acs_&year._md_sum_tr_tr10 acs.Acs_&year._wv_sum_tr_tr10; | ||
| keep geo2010 geoid totpop_&year. medhhincm_&year. popalonew_&year. popaloneb_&year. popaloneh_&year. popalonea_&year. popaloneaiom_&year. | ||
| Numdialup_&year. Numbroadbandall_&year. Numcellular_&year. Numcellularonly_&year. Numbroadband_&year. Numbroadbandonly_&year. Numsatellite_&year. | ||
| Numsatelliteonly_&year. Numotheronly_&year. Numaccesswosub_&year. Numnointernet_&year. Numwithinternet_&year. | ||
| county Jurisdiction hshldinc100000plus_&year. hshldincunder15000_&year. hshldinc15000to34999_&year. hshldinc35000to49999_&year. | ||
| hshldinc50000to74999_&year. hshldinc75000to99999_&year. Numwithinternet_&year. Numhhdefined_&year. numpopbroadbanda_&year. numpopbroadbandb_&year. numpopbroadbandh_&year. numpopbroadbandw_&year. | ||
| numpopbroadbandiom_&year. NumPopdialupA_&year. NumPopbroadbandA_&year. NumPopnointernetA_&year. NumPopnocomputerA_&year. | ||
| NumPopdialupB_&year. NumPopbroadbandB_&year. NumPopnointernetB_&year. NumPopnocomputerB_&year. | ||
| NumPopdialupH_&year. NumPopbroadbandH_&year. NumPopnointernetH_&year. NumPopnocomputerH_&year. | ||
| NumPopdialupW_&year. NumPopbroadbandW_&year. NumPopnointernetW_&year. NumPopnocomputerW_&year. | ||
| NumPopdialupIOM_&year. NumPopbroadbandIOM_&year. NumPopnointernetIOM_&year. NumPopnocomputerIOM_&year.; | ||
|
|
||
| county= substr(geo2010, 1,5); | ||
| ucounty=county; | ||
| geoid= geo2010; | ||
|
|
||
| %ucounty_jurisdiction | ||
| format Jurisdiction Jurisdiction. ; | ||
| run; | ||
|
|
||
|
|
||
| data InternetAcccess ; | ||
| set ACSall; | ||
| metro15 = put( county, $ctym15f. ); | ||
|
|
||
| percent100Kplus= hshldinc100000plus_&year./Numhhdefined_&year.; | ||
| percentunder15K= hshldincunder15000_&year./Numhhdefined_&year.; | ||
| percent15to50K= (hshldinc15000to34999_&year.+ hshldinc35000to49999_&year.)/Numhhdefined_&year.; | ||
| percent50to75K= hshldinc50000to74999_&year./Numhhdefined_&year.; | ||
| percent75Kto100K= hshldinc75000to99999_&year./Numhhdefined_&year.; | ||
| internetdenom= Numhhdefined_&year.; | ||
| pctinternetsub= Numwithinternet_&year. /internetdenom; | ||
| pctinternetwosub= Numaccesswosub_&year. /internetdenom; | ||
| pctnointernet= Numnointernet_&year./internetdenom; | ||
|
|
||
| run; | ||
|
|
||
| proc export data= InternetAcccess | ||
| outfile="&_dcdata_default_path\Requests\Prog\2019\Internet_access_tract.csv" | ||
| dbms=csv | ||
| replace; | ||
| run; | ||
|
|
||
| data BroadbandAcccess ; | ||
| set ACSall; | ||
|
|
||
| metro15 = put( county, $ctym15f. ); | ||
| pctbroadband= Numbroadband_&year./Numhhdefined_&year. ; | ||
| pctbroadbanda= numpopbroadbanda_&year./(NumPopdialupA_&year. + NumPopbroadbandA_&year. + NumPopnointernetA_&year. + NumPopnocomputerA_&year.); | ||
| pctbroadbandb= numpopbroadbandb_&year./(NumPopdialupB_&year. + NumPopbroadbandB_&year. + NumPopnointernetB_&year. + NumPopnocomputerB_&year.); | ||
| pctbroadbandh= numpopbroadbandh_&year. /(NumPopdialupH_&year. + NumPopbroadbandH_&year. + NumPopnointernetH_&year. + NumPopnocomputerH_&year.); | ||
| pctbroadbandw= numpopbroadbandw_&year. /(NumPopdialupW_&year. + NumPopbroadbandW_&year. + NumPopnointernetW_&year. + NumPopnocomputerW_&year.); | ||
| pctbroadbandiom= numpopbroadbandiom_&year./(NumPopdialupIOM_&year. + NumPopbroadbandIOM_&year. + NumPopnointernetIOM_&year. + NumPopnocomputerIOM_&year.); | ||
|
|
||
| percent100Kplus= hshldinc100000plus_&year./Numhhdefined_&year.; | ||
| percentunder15K= hshldincunder15000_&year./Numhhdefined_&year.; | ||
| percent15to50K= (hshldinc15000to34999_&year.+ hshldinc35000to49999_&year.)/Numhhdefined_&year.; | ||
| percent50to75K= hshldinc50000to74999_&year./Numhhdefined_&year.; | ||
| percent75Kto100K= hshldinc75000to99999_&year./Numhhdefined_&year.; | ||
| pctinternetsub= Numwithinternet_&year. /Numhhdefined_&year.; | ||
| pctinternetwosub= Numaccesswosub_&year. /Numhhdefined_&year.; | ||
| pctnointernet= Numnointernet_&year./Numhhdefined_&year.; | ||
|
|
||
|
|
||
| run; | ||
|
|
||
| proc export data= BroadbandAcccess | ||
| outfile="&_dcdata_default_path\Requests\Prog\2019\Broadband_access_tract.csv" | ||
| dbms=csv | ||
| replace; | ||
| run; | ||
|
|
||
|
|
||
| proc sort data= BroadbandAcccess ; | ||
| by metro15;run; | ||
|
|
||
| proc summary data = BroadbandAcccess; | ||
| var Numhhdefined_&year. medhhincm_&year. NumPopdialupA_&year. NumPopbroadbandA_&year. NumPopnointernetA_&year. NumPopnocomputerA_&year. | ||
| NumPopdialupB_&year. NumPopbroadbandB_&year. NumPopnointernetB_&year. NumPopnocomputerB_&year. NumPopdialupH_&year. NumPopbroadbandH_&year. NumPopnointernetH_&year. NumPopnocomputerH_&year. | ||
| NumPopdialupW_&year. NumPopbroadbandW_&year. NumPopnointernetW_&year. NumPopnocomputerW_&year. NumPopdialupIOM_&year. NumPopbroadbandIOM_&year. NumPopnointernetIOM_&year. NumPopnocomputerIOM_&year. Numbroadband_&year. | ||
| numpopbroadbanda_&year. numpopbroadbandiom_&year. numpopbroadbandb_&year. numpopbroadbandh_&year. numpopbroadbandw_&year. | ||
| hshldinc100000plus_&year. hshldincunder15000_&year. hshldinc15000to34999_&year. hshldinc35000to49999_&year. | ||
| hshldinc50000to74999_&year. hshldinc75000to99999_&year.; | ||
| by metro15; | ||
| output out = AccessinDMV sum = ; | ||
| run; | ||
| proc sort data= BroadbandAcccess; | ||
| by Jurisdiction;run; | ||
| proc summary data = BroadbandAcccess (where=(metro15= "47900")); | ||
| var Numhhdefined_&year. medhhincm_&year. Numbroadband_&year. | ||
| numpopbroadbanda_&year. numpopbroadbandiom_&year. numpopbroadbandb_&year. numpopbroadbandh_&year. numpopbroadbandw_&year. | ||
| hshldinc100000plus_&year. hshldincunder15000_&year. hshldinc15000to34999_&year. hshldinc35000to49999_&year. | ||
| hshldinc50000to74999_&year. hshldinc75000to99999_&year.; | ||
| by Jurisdiction; | ||
| output out = Accessbycounty sum = ; | ||
| run; | ||
| data accessbycounty2; | ||
| set Accessbycounty; | ||
| percent100Kplus= hshldinc100000plus_&year./Numhhdefined_&year.; | ||
| percentunder15K= hshldincunder15000_&year./Numhhdefined_&year.; | ||
| percent15to50K= (hshldinc15000to34999_&year.+ hshldinc35000to49999_&year.)/Numhhdefined_&year.; | ||
| percent50to75K= hshldinc50000to74999_&year./Numhhdefined_&year.; | ||
| percent75Kto100K= hshldinc75000to99999_&year./Numhhdefined_&year.; | ||
| pctbroadband= Numbroadband_&year./Numhhdefined_&year. ; | ||
|
|
||
| run; | ||
|
|
||
| proc sort data=BroadbandAcccess; | ||
| by geo2010;run; | ||
|
|
||
| proc summary data = BroadbandAcccess (where=(metro15= "47900")); | ||
| var Numbroadband_&year. medhhincm_&year. popalonew_&year. popaloneb_&year. popaloneh_&year. popalonea_&year. | ||
| numpopbroadbanda_&year. numpopbroadbandiom_&year. numpopbroadbandb_&year. numpopbroadbandh_&year. numpopbroadbandw_&year. | ||
| hshldinc100000plus_&year. hshldincunder15000_&year. hshldinc15000to34999_&year. hshldinc35000to49999_&year. | ||
| hshldinc50000to74999_&year. hshldinc75000to99999_&year. Numhhdefined_&year. Numwithinternet_&year. Numaccesswosub_&year. Numnointernet_&year. ; | ||
| by geo2010; | ||
| output out = Accessbytract_DMV sum = ; | ||
| run; | ||
|
|
||
| data Accessbytract2_DMV; | ||
| set Accessbytract_DMV; | ||
|
|
||
| percent100Kplus= hshldinc100000plus_&year./Numhhdefined_&year.; | ||
| percentunder15K= hshldincunder15000_&year./Numhhdefined_&year.; | ||
| percent15to50K= (hshldinc15000to34999_&year.+ hshldinc35000to49999_&year.)/Numhhdefined_&year.; | ||
| percent50to75K= hshldinc50000to74999_&year./Numhhdefined_&year.; | ||
| percent75Kto100K= hshldinc75000to99999_&year./Numhhdefined_&year.; | ||
| broadbandaccess= Numbroadband_&year./Numhhdefined_&year.; | ||
| pctinternetsub= Numwithinternet_&year. /Numhhdefined_&year.; | ||
| pctinternetwosub= Numaccesswosub_&year. /Numhhdefined_&year.; | ||
| pctnointernet= Numnointernet_&year./Numhhdefined_&year.; | ||
|
|
||
| run; | ||
|
|
||
| proc export data= Accessbytract2_DMV | ||
| outfile="&_dcdata_default_path\Requests\Prog\2019\Internetbroadband_access_DMVtract.csv" | ||
| dbms=csv | ||
| replace; | ||
| run; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.