View Source Fmcsa
web-scraper-for-fmcsa-dot-gov
Web scraper for fmcsa.dot.gov.
This Tool Was Created To Fetch Public Information Related To Registered Motor Carriers In The United States from the Federal Motor Carrier Safety Administration
installation
Installation
If available in Hex, the package can be installed
by adding fmcsa
to your list of dependencies in mix.exs
:
def deps do
[
{:fmcsa, "~> 1.0.0"}
]
end
usage
Usage
iex:> {_,response }= Fmcsa.fetch_companies_by_state("AZ")
iex:> {company, url} = List.first(response)
iex:> url |> Fmcsa.fetch_company_profile()
{:ok, %{...}}
daily sync can be done via:
iex:> Fmcsa.all("SYNC")
{:ok, %{...}}
synced data can be dumped:
iex:> {_,response }= Fmcsa.fetch_companies_by_state("AZ")
iex:> company_response = List.first(response)
iex:> Fmcsa.Company.Server.show_profile(company_response)
{:ok, %{...}}
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/fmcsa.