Giter Club home page Giter Club logo

freemealdataparser's Introduction

FreeMealDataParser

Summary

This is a quick program written for OpenBrackets outreach efforts. It parses a spreadsheet of Free Meal Data from the California Department of Education website. The spreadsheet has per-school statistics, which are transformed into per-district statistics.

Process

The parser generates district_free_meal_percentages.txt, a list of all California school districts sorted by Free Meal percentages, and bay_area_sorted.txt, a list of just Bay Area school districts. Bay Area schools districts are determined with the bay_area_districts.txt list, which is from KRON4. The following code was used to scrape the district names.

const elems = document.querySelectorAll('a[rel="noreferrer noopener"] > strong, strong > a[rel="noreferrer noopener"]')
let s = "";
for (elem of elems) {
    if (elem.textContent.contains("District")) {
        s += elem.textContent + '\n'
    }
console.log(s)
}

The district names in the sheet and in the list are slightly different, so the parser checks if one of them is a substring of the other. This causes some issues, which have been manually dealt with. In particular, some districts match when they should not (e.g. "San Francisco" matching "South San Francisco"). Other districts do not match at all. Those required changing the names in the bay_area_districts.txt file. Here is a list of those changes:

  • Tamalpais Unified School District to Tamalpais Union High
  • Piner Olivet Union Elementary School District to Piner-Olivet Union Elementary School District
  • Moraga Unified School District to Moraga School District
  • Albany Unified School District to Albany City Unified School District
  • Piedmont Unified School District to Piedmont City Unified School District
  • Franklin-McKinley Union School District to Franklin-McKinley Elementary School District
  • Campbell Unified School District to Campbell Union School District
  • Mountain View Los Altos Union High School District to Mountain View-Los Altos Union High School District
  • Mt. Pleasant Elementary School District to Mount Pleasant Elementary School District
  • Live Oak School District split into Live Oak Unified School District and Live Oak Elementary School District

Once the bay_area_sorted.txt file was created, I took the top few from the sorted list as outreach targets. A few of the schools were skipped. Those schools are listed below, along with the reason for omission.

  • Bellevue Union is elementary school students.
  • Live Oak Elementary is mostly elementary school students but also has a middle school? Might be worth looking at?
  • Bayshore Elementary is one elementary school, I think.

freemealdataparser's People

Contributors

qpwoeirut avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.