Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • creating a table that sums enrollment by year by borough

    Hello, I am using Stata 17

    I am working on generating tables that show annual school enrollment (varname enroll_concat) by borough from 2008-2030. Would this be a variation of tab? sum? with options? I do not want frequencies, but would like to find out how many students were enrolled each year in each borough, the boroughs are repeated several times because the entries are by City. Thanks for any ideas on how to master tables!
    -----------------------
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input int year str14 city str26 borough float enroll_concat str42 district float bbedc str29 subregion
    2008 "Aleknagik"      "Dillingham Census Area"           33 "Southwest Region School District"           1 "Dillingham (On Road)"
    2009 "Aleknagik"      "Dillingham Census Area"           33 "Southwest Region School District"           1 "Dillingham (On Road)"
    2010 "Aleknagik"      "Dillingham Census Area"           31 "Southwest Region School District"           1 "Dillingham (On Road)"
    2011 "Aleknagik"      "Dillingham Census Area"           33 "Southwest Region School District"           1 "Dillingham (On Road)"
    2012 "Aleknagik"      "Dillingham Census Area"           27 "Southwest Region School District"           1 "Dillingham (On Road)"
    2013 "Aleknagik"      "Dillingham Census Area"           24 "Southwest Region School District"           1 "Dillingham (On Road)"
    2014 "Aleknagik"      "Dillingham Census Area"           26 "Southwest Region School District"           1 "Dillingham (On Road)"
    2015 "Aleknagik"      "Dillingham Census Area"           27 "Southwest Region School District"           1 "Dillingham (On Road)"
    2016 "Aleknagik"      "Dillingham Census Area"           26 "Southwest Region School District"           1 "Dillingham (On Road)"
    2017 "Aleknagik"      "Dillingham Census Area"           24 "Southwest Region School District"           1 "Dillingham (On Road)"
    2018 "Aleknagik"      "Dillingham Census Area"           24 "Southwest Region School District"           1 "Dillingham (On Road)"
    2019 "Aleknagik"      "Dillingham Census Area"           37 "Southwest Region School District"           1 "Dillingham (On Road)"
    2020 "Aleknagik"      "Dillingham Census Area"           32 "Southwest Region School District"           1 "Dillingham (On Road)"
    2021 "Aleknagik"      "Dillingham Census Area"           24 "Southwest Region School District"           1 "Dillingham (On Road)"
    2022 "Aleknagik"      "Dillingham Census Area"     26.47725 "Southwest Region School District"           1 "Dillingham (On Road)"
    2023 "Aleknagik"      "Dillingham Census Area"     26.64026 "Southwest Region School District"           1 "Dillingham (On Road)"
    2024 "Aleknagik"      "Dillingham Census Area"     26.64026 "Southwest Region School District"           1 "Dillingham (On Road)"
    2025 "Aleknagik"      "Dillingham Census Area"     26.64026 "Southwest Region School District"           1 "Dillingham (On Road)"
    2026 "Aleknagik"      "Dillingham Census Area"     26.80326 "Southwest Region School District"           1 "Dillingham (On Road)"
    2027 "Aleknagik"      "Dillingham Census Area"     26.80326 "Southwest Region School District"           1 "Dillingham (On Road)"
    2028 "Aleknagik"      "Dillingham Census Area"     26.80326 "Southwest Region School District"           1 "Dillingham (On Road)"
    2029 "Aleknagik"      "Dillingham Census Area"     26.80326 "Southwest Region School District"           1 "Dillingham (On Road)"
    2030 "Aleknagik"      "Dillingham Census Area"     26.96626 "Southwest Region School District"           1 "Dillingham (On Road)"
    2008 "Chignik Bay"    "Lake and Peninsula Borough"       14 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2009 "Chignik Bay"    "Lake and Peninsula Borough"       16 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2010 "Chignik Bay"    "Lake and Peninsula Borough"       20 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2011 "Chignik Bay"    "Lake and Peninsula Borough"       18 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2012 "Chignik Bay"    "Lake and Peninsula Borough"       14 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2013 "Chignik Bay"    "Lake and Peninsula Borough"        . "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2014 "Chignik Bay"    "Lake and Peninsula Borough"       16 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2015 "Chignik Bay"    "Lake and Peninsula Borough"       14 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2016 "Chignik Bay"    "Lake and Peninsula Borough"       15 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2017 "Chignik Bay"    "Lake and Peninsula Borough"       13 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2018 "Chignik Bay"    "Lake and Peninsula Borough"       13 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2019 "Chignik Bay"    "Lake and Peninsula Borough"       11 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2020 "Chignik Bay"    "Lake and Peninsula Borough"       14 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2021 "Chignik Bay"    "Lake and Peninsula Borough"       11 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2022 "Chignik Bay"    "Lake and Peninsula Borough" 14.48245 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2023 "Chignik Bay"    "Lake and Peninsula Borough" 14.42049 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2024 "Chignik Bay"    "Lake and Peninsula Borough" 14.34303 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2025 "Chignik Bay"    "Lake and Peninsula Borough" 14.26557 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2026 "Chignik Bay"    "Lake and Peninsula Borough" 14.26557 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2027 "Chignik Bay"    "Lake and Peninsula Borough" 14.25008 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2028 "Chignik Bay"    "Lake and Peninsula Borough" 14.25008 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2029 "Chignik Bay"    "Lake and Peninsula Borough" 14.23459 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2030 "Chignik Bay"    "Lake and Peninsula Borough" 14.23459 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2008 "Chignik Lagoon" "Lake and Peninsula Borough"       17 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2009 "Chignik Lagoon" "Lake and Peninsula Borough"       17 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2010 "Chignik Lagoon" "Lake and Peninsula Borough"       18 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2011 "Chignik Lagoon" "Lake and Peninsula Borough"       12 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2012 "Chignik Lagoon" "Lake and Peninsula Borough"       13 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2013 "Chignik Lagoon" "Lake and Peninsula Borough"       13 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2014 "Chignik Lagoon" "Lake and Peninsula Borough"       10 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2015 "Chignik Lagoon" "Lake and Peninsula Borough"       11 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2016 "Chignik Lagoon" "Lake and Peninsula Borough"       12 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2017 "Chignik Lagoon" "Lake and Peninsula Borough"       10 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2018 "Chignik Lagoon" "Lake and Peninsula Borough"       12 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2019 "Chignik Lagoon" "Lake and Peninsula Borough"       12 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2020 "Chignik Lagoon" "Lake and Peninsula Borough"       15 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2021 "Chignik Lagoon" "Lake and Peninsula Borough"       23 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2022 "Chignik Lagoon" "Lake and Peninsula Borough" 16.90011 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2023 "Chignik Lagoon" "Lake and Peninsula Borough" 17.32899 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2024 "Chignik Lagoon" "Lake and Peninsula Borough" 17.32899 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2025 "Chignik Lagoon" "Lake and Peninsula Borough" 17.75787 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2026 "Chignik Lagoon" "Lake and Peninsula Borough" 17.75787 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2027 "Chignik Lagoon" "Lake and Peninsula Borough" 18.18675 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2028 "Chignik Lagoon" "Lake and Peninsula Borough" 18.18675 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2029 "Chignik Lagoon" "Lake and Peninsula Borough" 18.61563 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2030 "Chignik Lagoon" "Lake and Peninsula Borough" 18.61563 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2008 "Chignik Lake"   "Lake and Peninsula Borough"       25 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2009 "Chignik Lake"   "Lake and Peninsula Borough"       17 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2010 "Chignik Lake"   "Lake and Peninsula Borough"       22 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2011 "Chignik Lake"   "Lake and Peninsula Borough"       25 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2012 "Chignik Lake"   "Lake and Peninsula Borough"       17 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2013 "Chignik Lake"   "Lake and Peninsula Borough"       23 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2014 "Chignik Lake"   "Lake and Peninsula Borough"       15 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2015 "Chignik Lake"   "Lake and Peninsula Borough"       13 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2016 "Chignik Lake"   "Lake and Peninsula Borough"       22 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2017 "Chignik Lake"   "Lake and Peninsula Borough"       21 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2018 "Chignik Lake"   "Lake and Peninsula Borough"       15 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2019 "Chignik Lake"   "Lake and Peninsula Borough"       19 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2020 "Chignik Lake"   "Lake and Peninsula Borough"       18 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2021 "Chignik Lake"   "Lake and Peninsula Borough"       15 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2022 "Chignik Lake"   "Lake and Peninsula Borough" 18.18343 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2023 "Chignik Lake"   "Lake and Peninsula Borough" 18.10763 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2024 "Chignik Lake"   "Lake and Peninsula Borough" 18.10763 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2025 "Chignik Lake"   "Lake and Peninsula Borough" 18.03182 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2026 "Chignik Lake"   "Lake and Peninsula Borough" 18.03182 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2027 "Chignik Lake"   "Lake and Peninsula Borough" 17.95602 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2028 "Chignik Lake"   "Lake and Peninsula Borough" 17.88021 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2029 "Chignik Lake"   "Lake and Peninsula Borough" 17.88021 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2030 "Chignik Lake"   "Lake and Peninsula Borough" 17.80441 "Lake and Peninsula Borough School District" 0 "Gulf Communities"    
    2008 "Dillingham"     "Dillingham Census Area"          507 "Dillingham City School District"            1 "Dillingham (On Road)"
    2009 "Dillingham"     "Dillingham Census Area"          478 "Dillingham City School District"            1 "Dillingham (On Road)"
    2010 "Dillingham"     "Dillingham Census Area"          490 "Dillingham City School District"            1 "Dillingham (On Road)"
    2011 "Dillingham"     "Dillingham Census Area"          493 "Dillingham City School District"            1 "Dillingham (On Road)"
    2012 "Dillingham"     "Dillingham Census Area"          534 "Dillingham City School District"            1 "Dillingham (On Road)"
    2013 "Dillingham"     "Dillingham Census Area"          536 "Dillingham City School District"            1 "Dillingham (On Road)"
    2014 "Dillingham"     "Dillingham Census Area"          469 "Dillingham City School District"            1 "Dillingham (On Road)"
    2015 "Dillingham"     "Dillingham Census Area"          456 "Dillingham City School District"            1 "Dillingham (On Road)"
    end
    ------------------
Working...
X